diff options
author | Chunming Zhou <David1.Zhou@amd.com> | 2016-08-16 23:41:30 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-08-22 13:47:20 -0400 |
commit | 0c4e7fa56112b0eaef0bf88b569608620e0465b8 (patch) | |
tree | 279d4fee9378ef0f3d560170548aa66c1feb59f9 /drivers/gpu/drm/amd/amdgpu/amdgpu.h | |
parent | 4c7e885506eaefc55c2b45293b52cae9ef797d67 (diff) |
drm/amdgpu: link all shadow bo V2
V2:
1. use mutex instead of spinlock for shadow list, since its process could
sleep.
2. move list_del to bo destroy phase.
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.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index 60030f951152..e30a0d6353cd 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h | |||
@@ -468,6 +468,7 @@ struct amdgpu_bo { | |||
468 | struct ttm_bo_kmap_obj dma_buf_vmap; | 468 | struct ttm_bo_kmap_obj dma_buf_vmap; |
469 | struct amdgpu_mn *mn; | 469 | struct amdgpu_mn *mn; |
470 | struct list_head mn_list; | 470 | struct list_head mn_list; |
471 | struct list_head shadow_list; | ||
471 | }; | 472 | }; |
472 | #define gem_to_amdgpu_bo(gobj) container_of((gobj), struct amdgpu_bo, gem_base) | 473 | #define gem_to_amdgpu_bo(gobj) container_of((gobj), struct amdgpu_bo, gem_base) |
473 | 474 | ||
@@ -2096,6 +2097,10 @@ struct amdgpu_device { | |||
2096 | struct kfd_dev *kfd; | 2097 | struct kfd_dev *kfd; |
2097 | 2098 | ||
2098 | struct amdgpu_virtualization virtualization; | 2099 | struct amdgpu_virtualization virtualization; |
2100 | |||
2101 | /* link all shadow bo */ | ||
2102 | struct list_head shadow_list; | ||
2103 | struct mutex shadow_list_lock; | ||
2099 | }; | 2104 | }; |
2100 | 2105 | ||
2101 | bool amdgpu_device_is_px(struct drm_device *dev); | 2106 | bool amdgpu_device_is_px(struct drm_device *dev); |