amdgpu: remove AMDGPU_GEM_CREATE_CPU_GTT_UC
authorJammy Zhou <Jammy.Zhou@amd.com>
Wed, 6 May 2015 10:45:57 +0000 (18:45 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 5 Aug 2015 17:47:49 +0000 (13:47 -0400)
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
include/drm/amdgpu_drm.h
tests/amdgpu/basic_tests.c

index 566eb07..415a861 100644 (file)
 #define AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED  (1 << 0)
 /* Flag that CPU access will not work, this VRAM domain is invisible */
 #define AMDGPU_GEM_CREATE_NO_CPU_ACCESS                (1 << 1)
-/* Flag that un-cached attributes should be used for GTT */
-#define AMDGPU_GEM_CREATE_CPU_GTT_UC           (1 << 2)
 /* Flag that USWC attributes should be used for GTT */
-#define AMDGPU_GEM_CREATE_CPU_GTT_WC           (1 << 3)
+#define AMDGPU_GEM_CREATE_CPU_GTT_USWC         (1 << 2)
 
 /* Flag mask for GTT domain_flags */
 #define AMDGPU_GEM_CREATE_CPU_GTT_MASK \
-       (AMDGPU_GEM_CREATE_CPU_GTT_WC | \
-        AMDGPU_GEM_CREATE_CPU_GTT_UC | \
+       (AMDGPU_GEM_CREATE_CPU_GTT_USWC | \
         AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED | \
         AMDGPU_GEM_CREATE_NO_CPU_ACCESS)
 
index c8c759f..6654e58 100644 (file)
@@ -146,7 +146,7 @@ static void amdgpu_memory_alloc(void)
        bo = gpu_mem_alloc(device_handle,
                        4096, 4096,
                        AMDGPU_GEM_DOMAIN_GTT,
-                       AMDGPU_GEM_CREATE_CPU_GTT_WC,
+                       AMDGPU_GEM_CREATE_CPU_GTT_USWC,
                        &bo_mc);
 
        r = amdgpu_bo_free(bo);
@@ -345,8 +345,7 @@ static void amdgpu_command_submission_sdma_write_linear(void)
        uint64_t bo_mc;
        volatile uint32_t *bo_cpu;
        int i, j, r, loop;
-       uint64_t gtt_flags[3] = {0, AMDGPU_GEM_CREATE_CPU_GTT_UC,
-                               AMDGPU_GEM_CREATE_CPU_GTT_WC};
+       uint64_t gtt_flags[2] = {0, AMDGPU_GEM_CREATE_CPU_GTT_USWC};
 
        pm4 = calloc(pm4_dw, sizeof(*pm4));
        CU_ASSERT_NOT_EQUAL(pm4, NULL);
@@ -365,7 +364,7 @@ static void amdgpu_command_submission_sdma_write_linear(void)
        CU_ASSERT_NOT_EQUAL(resources, NULL);
 
        loop = 0;
-       while(loop < 3) {
+       while(loop < 2) {
                /* allocate UC bo for sDMA use */
                bo = gpu_mem_alloc(device_handle,
                                sdma_write_length * sizeof(uint32_t),
@@ -428,8 +427,7 @@ static void amdgpu_command_submission_sdma_const_fill(void)
        uint64_t bo_mc;
        volatile uint32_t *bo_cpu;
        int i, j, r, loop;
-       uint64_t gtt_flags[3] = {0, AMDGPU_GEM_CREATE_CPU_GTT_UC,
-                               AMDGPU_GEM_CREATE_CPU_GTT_WC};
+       uint64_t gtt_flags[2] = {0, AMDGPU_GEM_CREATE_CPU_GTT_USWC};
 
        pm4 = calloc(pm4_dw, sizeof(*pm4));
        CU_ASSERT_NOT_EQUAL(pm4, NULL);
@@ -448,7 +446,7 @@ static void amdgpu_command_submission_sdma_const_fill(void)
        CU_ASSERT_NOT_EQUAL(resources, NULL);
 
        loop = 0;
-       while(loop < 3) {
+       while(loop < 2) {
                /* allocate UC bo for sDMA use */
                bo = gpu_mem_alloc(device_handle,
                                sdma_write_length, 4096,
@@ -509,8 +507,7 @@ static void amdgpu_command_submission_sdma_copy_linear(void)
        uint64_t bo1_mc, bo2_mc;
        volatile unsigned char *bo1_cpu, *bo2_cpu;
        int i, j, r, loop1, loop2;
-       uint64_t gtt_flags[3] = {0, AMDGPU_GEM_CREATE_CPU_GTT_UC,
-                               AMDGPU_GEM_CREATE_CPU_GTT_WC};
+       uint64_t gtt_flags[2] = {0, AMDGPU_GEM_CREATE_CPU_GTT_USWC};
 
        pm4 = calloc(pm4_dw, sizeof(*pm4));
        CU_ASSERT_NOT_EQUAL(pm4, NULL);
@@ -530,8 +527,8 @@ static void amdgpu_command_submission_sdma_copy_linear(void)
 
        loop1 = loop2 = 0;
        /* run 9 circle to test all mapping combination */
-       while(loop1 < 3) {
-               while(loop2 < 3) {
+       while(loop1 < 2) {
+               while(loop2 < 2) {
                        /* allocate UC bo1for sDMA use */
                        bo1 = gpu_mem_alloc(device_handle,
                                        sdma_write_length, 4096,