drm/amdgpu: shadow and mn list are mutually exclusive
authorChristian König <christian.koenig@amd.com>
Thu, 20 Jul 2017 21:58:19 +0000 (23:58 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 15 Aug 2017 18:45:54 +0000 (14:45 -0400)
Save some memory because only one of those is used at all times.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_object.h

index a401fe3bdd26ca8e8b4d7c0d22e4f313c6af81a5..3b92d5236670fef4211cd208996c098b5680211a 100644 (file)
@@ -87,8 +87,11 @@ struct amdgpu_bo {
 
        struct ttm_bo_kmap_obj          dma_buf_vmap;
        struct amdgpu_mn                *mn;
-       struct list_head                mn_list;
-       struct list_head                shadow_list;
+
+       union {
+               struct list_head        mn_list;
+               struct list_head        shadow_list;
+       };
 };
 
 /**