mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
drm/imagination: Update check to skip prepare_job() for fragment jobs
By the time prepare_job() is called on a paired fragment job, the paired geometry job might already be finished and its PM reference dropped. Check the fragment job's PM reference instead which is a bit more likely to be still set. This is a very minor optimization. Signed-off-by: Alessio Belle <alessio.belle@imgtec.com> Reviewed-by: Brajesh Gupta <brajesh.gupta@imgtec.com> Link: https://patch.msgid.link/20260330-job-submission-fixes-cleanup-v1-7-7de8c09cef8c@imgtec.com Signed-off-by: Matt Coster <matt.coster@imgtec.com>
This commit is contained in:
parent
402562e60c
commit
5c81eb2970
|
|
@ -553,12 +553,13 @@ pvr_queue_prepare_job(struct drm_sched_job *sched_job,
|
|||
|
||||
if (job->type == DRM_PVR_JOB_TYPE_FRAGMENT && job->paired_job) {
|
||||
/*
|
||||
* This will be called on a paired fragment job after being
|
||||
* submitted to firmware. We can tell if this is the case and
|
||||
* bail early from whether run_job() has been called on the
|
||||
* geometry job, which would issue a pm ref.
|
||||
* This will be called on a paired fragment job after being submitted
|
||||
* to the firmware as part of the paired geometry job's submission.
|
||||
* We can tell if this is the case and bail early from whether run_job()
|
||||
* has been called on the geometry job, which would issue a pm ref on
|
||||
* this job as well.
|
||||
*/
|
||||
if (job->paired_job->has_pm_ref)
|
||||
if (job->has_pm_ref)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user