diff options
author | Christian König <christian.koenig@amd.com> | 2015-09-08 21:22:31 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-09-24 00:23:39 +0300 |
commit | 4f839a243d3b0d8b1a14f4778a87ec4d8ddbf15f (patch) | |
tree | 856d9a22af55ae4e8347c14c3d60cd235e79da72 /drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | |
parent | 5ec92a7692872d656cffe010920fb49c4f51d75f (diff) | |
download | linux-4f839a243d3b0d8b1a14f4778a87ec4d8ddbf15f.tar.xz |
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 <christian.koenig@amd.com>
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
Reviewed-by: Chunming Zhou<david1.zhou@amd.com>
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; } |