Commit cdb73451 authored by Tvrtko Ursulin's avatar Tvrtko Ursulin Committed by Philipp Stanner
Browse files

drm/imagination: Use the drm_sched_job_has_dependency helper



Instead of manually peeking into the DRM scheduler implementation details
lets use the previously added helper.

Signed-off-by: default avatarTvrtko Ursulin <tvrtko.ursulin@igalia.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Danilo Krummrich <dakr@redhat.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Philipp Stanner <pstanner@redhat.com>
Cc: Frank Binns <frank.binns@imgtec.com>
Cc: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: default avatarMatt Coster <matt.coster@imgtec.com>
Signed-off-by: default avatarPhilipp Stanner <phasta@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20250113103341.43914-2-tvrtko.ursulin@igalia.com
parent 51678bb9
Loading
Loading
Loading
Loading
+3 −9
Original line number Diff line number Diff line
@@ -597,8 +597,6 @@ update_job_resvs_for_each(struct pvr_job_data *job_data, u32 job_count)
static bool can_combine_jobs(struct pvr_job *a, struct pvr_job *b)
{
	struct pvr_job *geom_job = a, *frag_job = b;
	struct dma_fence *fence;
	unsigned long index;

	/* Geometry and fragment jobs can be combined if they are queued to the
	 * same context and targeting the same HWRT.
@@ -609,13 +607,9 @@ static bool can_combine_jobs(struct pvr_job *a, struct pvr_job *b)
	    a->hwrt != b->hwrt)
		return false;

	xa_for_each(&frag_job->base.dependencies, index, fence) {
	/* We combine when we see an explicit geom -> frag dep. */
		if (&geom_job->base.s_fence->scheduled == fence)
			return true;
	}

	return false;
	return drm_sched_job_has_dependency(&frag_job->base,
					    &geom_job->base.s_fence->scheduled);
}

static struct dma_fence *