diff options
author | Chunming Zhou <David1.Zhou@amd.com> | 2016-08-17 11:41:30 +0800 |
---|---|---|
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) | |
download | lwn-0c4e7fa56112b0eaef0bf88b569608620e0465b8.tar.gz lwn-0c4e7fa56112b0eaef0bf88b569608620e0465b8.zip |
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 { struct ttm_bo_kmap_obj dma_buf_vmap; struct amdgpu_mn *mn; struct list_head mn_list; + struct list_head shadow_list; }; #define gem_to_amdgpu_bo(gobj) container_of((gobj), struct amdgpu_bo, gem_base) @@ -2096,6 +2097,10 @@ struct amdgpu_device { struct kfd_dev *kfd; struct amdgpu_virtualization virtualization; + + /* link all shadow bo */ + struct list_head shadow_list; + struct mutex shadow_list_lock; }; bool amdgpu_device_is_px(struct drm_device *dev); |