From ed5b89c69cb037c5803c36050377c4b233fbf0b6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Christian=20K=C3=B6nig?= Date: Thu, 20 Jul 2017 23:58:19 +0200 Subject: [PATCH] drm/amdgpu: shadow and mn list are mutually exclusive MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Save some memory because only one of those is used at all times. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h index a401fe3bdd26..3b92d5236670 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h @@ -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; + }; }; /** -- 2.45.2