gallium/radeon: remove RADEON_HEAP_VRAM_GTT
authorMarek Olšák <marek.olsak@amd.com>
Thu, 30 Nov 2017 23:14:51 +0000 (00:14 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 5 Dec 2017 12:30:34 +0000 (13:30 +0100)
Only winsyses can set VRAM|GTT. Drivers shouldn't if they want to use
winsys allocators.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeon/radeon_winsys.h

index 7ab110a4cfd3a9ee40c89c1eb9415cd70dbdb775..1d59b282882c3d197ade08f9787e09f1aacc7841 100644 (file)
@@ -654,7 +654,6 @@ static inline void radeon_emit_array(struct radeon_winsys_cs *cs,
 enum radeon_heap {
     RADEON_HEAP_VRAM_NO_CPU_ACCESS,
     RADEON_HEAP_VRAM,
-    RADEON_HEAP_VRAM_GTT, /* combined heaps */
     RADEON_HEAP_GTT_WC,
     RADEON_HEAP_GTT,
     RADEON_MAX_SLAB_HEAPS,
@@ -667,8 +666,6 @@ static inline enum radeon_bo_domain radeon_domain_from_heap(enum radeon_heap hea
     case RADEON_HEAP_VRAM_NO_CPU_ACCESS:
     case RADEON_HEAP_VRAM:
         return RADEON_DOMAIN_VRAM;
-    case RADEON_HEAP_VRAM_GTT:
-        return RADEON_DOMAIN_VRAM_GTT;
     case RADEON_HEAP_GTT_WC:
     case RADEON_HEAP_GTT:
         return RADEON_DOMAIN_GTT;
@@ -687,7 +684,6 @@ static inline unsigned radeon_flags_from_heap(enum radeon_heap heap)
                RADEON_FLAG_NO_INTERPROCESS_SHARING;
 
     case RADEON_HEAP_VRAM:
-    case RADEON_HEAP_VRAM_GTT:
     case RADEON_HEAP_GTT_WC:
         return RADEON_FLAG_GTT_WC |
                RADEON_FLAG_NO_INTERPROCESS_SHARING;
@@ -707,7 +703,6 @@ static inline unsigned radeon_get_pb_cache_bucket_index(enum radeon_heap heap)
     case RADEON_HEAP_VRAM_NO_CPU_ACCESS:
         return 0;
     case RADEON_HEAP_VRAM:
-    case RADEON_HEAP_VRAM_GTT:
         return 1;
     case RADEON_HEAP_GTT_WC:
         return 2;
@@ -742,15 +737,14 @@ static inline int radeon_get_heap_index(enum radeon_bo_domain domain,
             return RADEON_HEAP_VRAM_NO_CPU_ACCESS;
         else
             return RADEON_HEAP_VRAM;
-    case RADEON_DOMAIN_VRAM_GTT:
-        return RADEON_HEAP_VRAM_GTT;
     case RADEON_DOMAIN_GTT:
         if (flags & RADEON_FLAG_GTT_WC)
             return RADEON_HEAP_GTT_WC;
         else
             return RADEON_HEAP_GTT;
+    default:
+        return -1;
     }
-    return -1;
 }
 
 #endif