[PATCH 4/8] drm/amdgpu: shadow and mn list are mutal exclusive
Christian König
deathsimple at vodafone.de
Thu Jul 27 15:44:00 UTC 2017
From: Christian König <christian.koenig at amd.com>
Save some memory because only on of those is used at all times.
TODO: Should we use an union here or just a single field?
Signed-off-by: Christian König <christian.koenig at amd.com>
---
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 a401fe3..3b92d52 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.7.4
More information about the amd-gfx
mailing list