aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu.h
diff options
context:
space:
mode:
authorChunming Zhou <David1.Zhou@amd.com>2016-08-04 03:47:50 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-08-16 10:43:14 -0400
commit478feaf6cc420e66c071c0a743b334abfe8f18c9 (patch)
tree2bbacbca2c4f18564c1bcf06a205235ab53d442f /drivers/gpu/drm/amd/amdgpu/amdgpu.h
parent1baa439fb2f4e586bf387cbbc515468ebb16e587 (diff)
drm/amdgpu: add shadow flag V2
Indicate if need to sync between bo and shadow, where sync to where. V2: Rename to backup_shadow Signed-off-by: Chunming Zhou <David1.Zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 26f6028bb72b..d18ae01bd339 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -480,6 +480,12 @@ struct amdgpu_bo_va {
480 480
481#define AMDGPU_GEM_DOMAIN_MAX 0x3 481#define AMDGPU_GEM_DOMAIN_MAX 0x3
482 482
483enum amdgpu_bo_shadow {
484 AMDGPU_BO_SHADOW_TO_NONE = 0,
485 AMDGPU_BO_SHADOW_TO_PARENT,
486 AMDGPU_BO_SHADOW_TO_SHADOW,
487};
488
483struct amdgpu_bo { 489struct amdgpu_bo {
484 /* Protected by gem.mutex */ 490 /* Protected by gem.mutex */
485 struct list_head list; 491 struct list_head list;
@@ -506,6 +512,8 @@ struct amdgpu_bo {
506 struct drm_gem_object gem_base; 512 struct drm_gem_object gem_base;
507 struct amdgpu_bo *parent; 513 struct amdgpu_bo *parent;
508 struct amdgpu_bo *shadow; 514 struct amdgpu_bo *shadow;
515 /* indicate if need to sync between bo and shadow */
516 enum amdgpu_bo_shadow backup_shadow;
509 517
510 struct ttm_bo_kmap_obj dma_buf_vmap; 518 struct ttm_bo_kmap_obj dma_buf_vmap;
511 struct amdgpu_mn *mn; 519 struct amdgpu_mn *mn;