[PATCH 04/18] drm/amdgpu: add shadow flag V2

Chunming Zhou David1.Zhou at amd.com
Fri Aug 12 06:38:53 UTC 2016


Indicate if need to sync between bo and shadow, where sync to where.
V2:
Rename to backup_shadow

Change-Id: I74994dfad141da5c23a3598bb2e3df1253a195f7
Signed-off-by: Chunming Zhou <David1.Zhou at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 04c88de..38ed6c4 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -482,6 +482,12 @@ struct amdgpu_bo_va {
 
 #define AMDGPU_GEM_DOMAIN_MAX		0x3
 
+enum amdgpu_bo_shadow {
+	AMDGPU_BO_SHADOW_TO_NONE = 0,
+	AMDGPU_BO_SHADOW_TO_PARENT,
+	AMDGPU_BO_SHADOW_TO_SHADOW,
+};
+
 struct amdgpu_bo {
 	/* Protected by gem.mutex */
 	struct list_head		list;
@@ -508,6 +514,8 @@ struct amdgpu_bo {
 	struct drm_gem_object		gem_base;
 	struct amdgpu_bo		*parent;
 	struct amdgpu_bo		*shadow;
+	/* indicate if need to sync between bo and shadow */
+	enum amdgpu_bo_shadow           backup_shadow;
 
 	struct ttm_bo_kmap_obj		dma_buf_vmap;
 	struct amdgpu_mn		*mn;
-- 
1.9.1



More information about the amd-gfx mailing list