[PATCH 04/19] drm/amdgpu: add shadow flag

Chunming Zhou David1.Zhou at amd.com
Fri Aug 5 09:38:31 UTC 2016


Indicate if need to sync between bo and shadow, where sync to where.

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 8c2ac1a..53b7039 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -481,6 +481,12 @@ struct amdgpu_bo_va {
 
 #define AMDGPU_GEM_DOMAIN_MAX		0x3
 
+enum amdgpu_shadow_flag {
+	AMDGPU_SHADOW_FLAG_SYNC_TO_NONE = 0,
+	AMDGPU_SHADOW_FLAG_SYNC_TO_PARENT,
+	AMDGPU_SHADOW_FLAG_SYNC_TO_SHADOW,
+};
+
 struct amdgpu_bo {
 	/* Protected by gem.mutex */
 	struct list_head		list;
@@ -507,6 +513,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 */
+	u32                             shadow_flag;
 
 	struct ttm_bo_kmap_obj		dma_buf_vmap;
 	struct amdgpu_mn		*mn;
-- 
1.9.1



More information about the amd-gfx mailing list