diff options
| author | Christian König <[email protected]> | 2015-09-08 18:22:31 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2015-09-23 21:23:39 +0000 |
| commit | 4f839a243d3b0d8b1a14f4778a87ec4d8ddbf15f (patch) | |
| tree | 856d9a22af55ae4e8347c14c3d60cd235e79da72 /drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | |
| parent | drm/amdgpu: cleanup fence queue init v2 (diff) | |
| download | kernel-4f839a243d3b0d8b1a14f4778a87ec4d8ddbf15f.tar.gz kernel-4f839a243d3b0d8b1a14f4778a87ec4d8ddbf15f.zip | |
drm/amdgpu: more scheduler cleanups v2
Embed the scheduler into the ring structure instead of allocating it.
Use the ring name directly instead of the id.
v2: rebased, whitespace cleanup
Signed-off-by: Christian König <[email protected]>
Reviewed-by: Junwei Zhang <[email protected]>
Reviewed-by: Chunming Zhou<[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c index b57ca10a8533..4921de15b451 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c @@ -65,8 +65,14 @@ static bool amdgpu_sync_same_dev(struct amdgpu_device *adev, struct fence *f) if (a_fence) return a_fence->ring->adev == adev; - if (s_fence) - return (struct amdgpu_device *)s_fence->sched->priv == adev; + + if (s_fence) { + struct amdgpu_ring *ring; + + ring = container_of(s_fence->sched, struct amdgpu_ring, sched); + return ring->adev == adev; + } + return false; } |
