OSDN Git Service

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 a401fe3..3b92d52 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;
+       };
 };
 
 /**