aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu.h
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2015-11-03 14:58:50 -0500
committerAlex Deucher <alexander.deucher@amd.com>2016-02-10 14:16:56 -0500
commit8d0a7cea824a2784150ef7f25a1e88f18a2a8f69 (patch)
tree488fbe4c708a7db0605571fdae60685fcdbbc4c8 /drivers/gpu/drm/amd/amdgpu/amdgpu.h
parent165e4e07c2cb91658c444ac4dab49473bfb3847b (diff)
drm/amdgpu: grab VMID before submitting job v5
This allows the scheduler to handle the dependencies on ID contention as well. v2: grab id only once v3: use a separate lock for the VMIDs v4: cleanup after semaphore removal v5: minor coding style change Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com> Acked-by: Alex Deucher <alexander.deucher@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.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 719bce615a2b..edfaae439b76 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -777,6 +777,7 @@ struct amdgpu_ib {
777 struct amdgpu_ring *ring; 777 struct amdgpu_ring *ring;
778 struct amdgpu_fence *fence; 778 struct amdgpu_fence *fence;
779 struct amdgpu_user_fence *user; 779 struct amdgpu_user_fence *user;
780 bool grabbed_vmid;
780 struct amdgpu_vm *vm; 781 struct amdgpu_vm *vm;
781 struct amdgpu_ctx *ctx; 782 struct amdgpu_ctx *ctx;
782 struct amdgpu_sync sync; 783 struct amdgpu_sync sync;
@@ -925,6 +926,9 @@ struct amdgpu_vm {
925}; 926};
926 927
927struct amdgpu_vm_manager { 928struct amdgpu_vm_manager {
929 /* protecting IDs */
930 struct mutex lock;
931
928 struct { 932 struct {
929 struct fence *active; 933 struct fence *active;
930 atomic_long_t owner; 934 atomic_long_t owner;