mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
drm: move amd_gpu_scheduler into common location
This moves and renames the AMDGPU scheduler to a common location in DRM in order to facilitate re-use by other drivers. This is mostly a straight forward rename with no code changes. One notable exception is the function to_drm_sched_fence(), which is no longer a inline header function to avoid the need to export the drm_sched_fence_ops_scheduled and drm_sched_fence_ops_finished structures. Reviewed-by: Chunming Zhou <david1.zhou@amd.com> Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
9ce6aae12c
commit
1b1f42d8fd
@@ -64,7 +64,7 @@ void amdgpu_sync_create(struct amdgpu_sync *sync)
|
||||
static bool amdgpu_sync_same_dev(struct amdgpu_device *adev,
|
||||
struct dma_fence *f)
|
||||
{
|
||||
struct amd_sched_fence *s_fence = to_amd_sched_fence(f);
|
||||
struct drm_sched_fence *s_fence = to_drm_sched_fence(f);
|
||||
|
||||
if (s_fence) {
|
||||
struct amdgpu_ring *ring;
|
||||
@@ -85,7 +85,7 @@ static bool amdgpu_sync_same_dev(struct amdgpu_device *adev,
|
||||
*/
|
||||
static void *amdgpu_sync_get_owner(struct dma_fence *f)
|
||||
{
|
||||
struct amd_sched_fence *s_fence = to_amd_sched_fence(f);
|
||||
struct drm_sched_fence *s_fence = to_drm_sched_fence(f);
|
||||
|
||||
if (s_fence)
|
||||
return s_fence->owner;
|
||||
@@ -248,7 +248,7 @@ struct dma_fence *amdgpu_sync_peek_fence(struct amdgpu_sync *sync,
|
||||
|
||||
hash_for_each_safe(sync->fences, i, tmp, e, node) {
|
||||
struct dma_fence *f = e->fence;
|
||||
struct amd_sched_fence *s_fence = to_amd_sched_fence(f);
|
||||
struct drm_sched_fence *s_fence = to_drm_sched_fence(f);
|
||||
|
||||
if (dma_fence_is_signaled(f)) {
|
||||
hash_del(&e->node);
|
||||
|
||||
Reference in New Issue
Block a user