Commit 7f06c236 authored by monk.liu's avatar monk.liu Committed by Alex Deucher

drm/amdgpu: move wait_queue_head from adev to ring (v2)

thus unnecessary wake up could be avoid between rings
v2:
move wait_queue_head to fence_drv from ring
Signed-off-by: default avatarmonk.liu <monk.liu@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
parent e2955155
...@@ -391,6 +391,7 @@ struct amdgpu_fence_driver { ...@@ -391,6 +391,7 @@ struct amdgpu_fence_driver {
struct amdgpu_irq_src *irq_src; struct amdgpu_irq_src *irq_src;
unsigned irq_type; unsigned irq_type;
struct delayed_work lockup_work; struct delayed_work lockup_work;
wait_queue_head_t fence_queue;
}; };
/* some special values for the owner field */ /* some special values for the owner field */
...@@ -2036,7 +2037,6 @@ struct amdgpu_device { ...@@ -2036,7 +2037,6 @@ struct amdgpu_device {
struct amdgpu_irq_src hpd_irq; struct amdgpu_irq_src hpd_irq;
/* rings */ /* rings */
wait_queue_head_t fence_queue;
unsigned fence_context; unsigned fence_context;
struct mutex ring_lock; struct mutex ring_lock;
unsigned num_rings; unsigned num_rings;
......
This diff is collapsed.
...@@ -342,6 +342,8 @@ int amdgpu_ring_init(struct amdgpu_device *adev, struct amdgpu_ring *ring, ...@@ -342,6 +342,8 @@ int amdgpu_ring_init(struct amdgpu_device *adev, struct amdgpu_ring *ring,
amdgpu_fence_driver_init_ring(ring); amdgpu_fence_driver_init_ring(ring);
} }
init_waitqueue_head(&ring->fence_drv.fence_queue);
r = amdgpu_wb_get(adev, &ring->rptr_offs); r = amdgpu_wb_get(adev, &ring->rptr_offs);
if (r) { if (r) {
dev_err(adev->dev, "(%d) ring rptr_offs wb alloc failed\n", r); dev_err(adev->dev, "(%d) ring rptr_offs wb alloc failed\n", r);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment