<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/imagination/pvr_queue.c, branch v7.2-rc1</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v7.2-rc1</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v7.2-rc1'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-05-19T11:47:19+00:00</updated>
<entry>
<title>drm/imagination: Add support for trace points</title>
<updated>2026-05-19T11:47:19+00:00</updated>
<author>
<name>Alexandru Dadu</name>
<email>alexandru.dadu@imgtec.com</email>
</author>
<published>2026-05-13T12:00:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c1079aebb4de218caa86c44f9a53700d1a582683'/>
<id>urn:sha1:c1079aebb4de218caa86c44f9a53700d1a582683</id>
<content type='text'>
Add support for workload submission trace points.

Co-developed-by: Donald Robson &lt;donald.robson@imgtec.com&gt;
Signed-off-by: Donald Robson &lt;donald.robson@imgtec.com&gt;
Signed-off-by: Alexandru Dadu &lt;alexandru.dadu@imgtec.com&gt;
Reviewed-by: Matt Coster &lt;matt.coster@imgtec.com&gt;
Link: https://patch.msgid.link/20260513-b4-pvr-trace-points-v1-1-81222d1a4c99@imgtec.com
Signed-off-by: Matt Coster &lt;matt.coster@imgtec.com&gt;
</content>
</entry>
<entry>
<title>drm/imagination: Don't timeout job if its fence has been signaled</title>
<updated>2026-05-19T11:40:15+00:00</updated>
<author>
<name>Brajesh Gupta</name>
<email>brajesh.gupta@imgtec.com</email>
</author>
<published>2026-05-19T08:25:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ee7cb742531432ec1bb29b996e3363aacd860054'/>
<id>urn:sha1:ee7cb742531432ec1bb29b996e3363aacd860054</id>
<content type='text'>
Verify the job’s fence in the timeout handler; if the firmware has since
signaled completion, then report NO HANG.

Signed-off-by: Brajesh Gupta &lt;brajesh.gupta@imgtec.com&gt;
Reviewed-by: Matt Coster &lt;matt.coster@imgtec.com&gt;
Link: https://patch.msgid.link/20260519-b4-context_reset-v2-2-931018a7131d@imgtec.com
Signed-off-by: Matt Coster &lt;matt.coster@imgtec.com&gt;
</content>
</entry>
<entry>
<title>drm/imagination: Remove drm_sched_init_args-&gt;num_rqs usage</title>
<updated>2026-04-17T12:43:29+00:00</updated>
<author>
<name>Tvrtko Ursulin</name>
<email>tvrtko.ursulin@igalia.com</email>
</author>
<published>2026-04-17T10:37:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f84d73d2a08498174d950ba5935930dd94df7d3c'/>
<id>urn:sha1:f84d73d2a08498174d950ba5935930dd94df7d3c</id>
<content type='text'>
Remove member no longer used by the scheduler core.

Signed-off-by: Tvrtko Ursulin &lt;tvrtko.ursulin@igalia.com&gt;
Cc: Frank Binns &lt;frank.binns@imgtec.com&gt;
Cc: Matt Coster &lt;matt.coster@imgtec.com&gt;
Cc: dri-devel@lists.freedesktop.org
Reviewed-by: Matt Coster &lt;matt.coster@imgtec.com&gt;
Signed-off-by: Philipp Stanner &lt;phasta@kernel.org&gt;
Link: https://patch.msgid.link/20260417103744.76020-21-tvrtko.ursulin@igalia.com
</content>
</entry>
<entry>
<title>drm/imagination: Minor improvements to job submission code documentation</title>
<updated>2026-04-08T10:17:14+00:00</updated>
<author>
<name>Alessio Belle</name>
<email>alessio.belle@imgtec.com</email>
</author>
<published>2026-03-30T07:56:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=62a36c2da774800bef893bc4bf8922fb9c07c1d0'/>
<id>urn:sha1:62a36c2da774800bef893bc4bf8922fb9c07c1d0</id>
<content type='text'>
Mixed list of clarifications and typo fixes.

Signed-off-by: Alessio Belle &lt;alessio.belle@imgtec.com&gt;
Reviewed-by: Brajesh Gupta &lt;brajesh.gupta@imgtec.com&gt;
Link: https://patch.msgid.link/20260330-job-submission-fixes-cleanup-v1-8-7de8c09cef8c@imgtec.com
Signed-off-by: Matt Coster &lt;matt.coster@imgtec.com&gt;
</content>
</entry>
<entry>
<title>drm/imagination: Update check to skip prepare_job() for fragment jobs</title>
<updated>2026-04-08T10:17:14+00:00</updated>
<author>
<name>Alessio Belle</name>
<email>alessio.belle@imgtec.com</email>
</author>
<published>2026-03-30T07:56:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5c81eb2970133ad073214eb1e5b0c34a1ae793eb'/>
<id>urn:sha1:5c81eb2970133ad073214eb1e5b0c34a1ae793eb</id>
<content type='text'>
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 &lt;alessio.belle@imgtec.com&gt;
Reviewed-by: Brajesh Gupta &lt;brajesh.gupta@imgtec.com&gt;
Link: https://patch.msgid.link/20260330-job-submission-fixes-cleanup-v1-7-7de8c09cef8c@imgtec.com
Signed-off-by: Matt Coster &lt;matt.coster@imgtec.com&gt;
</content>
</entry>
<entry>
<title>drm/imagination: Move repeated job fence check to its own function</title>
<updated>2026-04-08T10:17:14+00:00</updated>
<author>
<name>Alessio Belle</name>
<email>alessio.belle@imgtec.com</email>
</author>
<published>2026-03-30T07:56:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=402562e60c6c1b15ee359ba7ffed907baa886a99'/>
<id>urn:sha1:402562e60c6c1b15ee359ba7ffed907baa886a99</id>
<content type='text'>
This should make the code slightly clearer.

Signed-off-by: Alessio Belle &lt;alessio.belle@imgtec.com&gt;
Reviewed-by: Brajesh Gupta &lt;brajesh.gupta@imgtec.com&gt;
Link: https://patch.msgid.link/20260330-job-submission-fixes-cleanup-v1-6-7de8c09cef8c@imgtec.com
Signed-off-by: Matt Coster &lt;matt.coster@imgtec.com&gt;
</content>
</entry>
<entry>
<title>drm/imagination: Rename pvr_queue_fence_is_ufo_backed() to reflect usage</title>
<updated>2026-04-08T10:17:13+00:00</updated>
<author>
<name>Alessio Belle</name>
<email>alessio.belle@imgtec.com</email>
</author>
<published>2026-03-30T07:56:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c162e655092de8de2e0f7776d72919dd5e3b84f2'/>
<id>urn:sha1:c162e655092de8de2e0f7776d72919dd5e3b84f2</id>
<content type='text'>
This function is only used by the synchronization code to figure out if
a fence belongs to this driver.
Rename it to pvr_queue_fence_is_native() and update its documentation to
reflect its current purpose.

Signed-off-by: Alessio Belle &lt;alessio.belle@imgtec.com&gt;
Reviewed-by: Brajesh Gupta &lt;brajesh.gupta@imgtec.com&gt;
Link: https://patch.msgid.link/20260330-job-submission-fixes-cleanup-v1-4-7de8c09cef8c@imgtec.com
Signed-off-by: Matt Coster &lt;matt.coster@imgtec.com&gt;
</content>
</entry>
<entry>
<title>drm/imagination: Skip check on paired job fence during job submission</title>
<updated>2026-04-08T10:17:13+00:00</updated>
<author>
<name>Alessio Belle</name>
<email>alessio.belle@imgtec.com</email>
</author>
<published>2026-03-30T07:56:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=18998b3cb7595850b8b2da55adb3fdc7aef8bc22'/>
<id>urn:sha1:18998b3cb7595850b8b2da55adb3fdc7aef8bc22</id>
<content type='text'>
While submitting a paired fragment job, there is no need to manually
look for, and skip, the paired job fence, as the existing logic to
resolve dependencies to pvr_queue_fence objects will have failed to
resolve it already and continued with the next one.

Point this out where the fence is actually accessed and drop the related
check.

Signed-off-by: Alessio Belle &lt;alessio.belle@imgtec.com&gt;
Reviewed-by: Brajesh Gupta &lt;brajesh.gupta@imgtec.com&gt;
Link: https://patch.msgid.link/20260330-job-submission-fixes-cleanup-v1-3-7de8c09cef8c@imgtec.com
Signed-off-by: Matt Coster &lt;matt.coster@imgtec.com&gt;
</content>
</entry>
<entry>
<title>drm/imagination: Fit paired fragment job in the correct CCCB</title>
<updated>2026-04-08T10:17:13+00:00</updated>
<author>
<name>Alessio Belle</name>
<email>alessio.belle@imgtec.com</email>
</author>
<published>2026-03-30T07:56:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4baf9e70cb756d78dd56419f8baee2978a72d0c3'/>
<id>urn:sha1:4baf9e70cb756d78dd56419f8baee2978a72d0c3</id>
<content type='text'>
For geometry jobs with a paired fragment job, at the moment, the
DRM scheduler's prepare_job() callback:

- checks for internal (driver) dependencies for the geometry job;
- calls into pvr_queue_get_paired_frag_job_dep() to check for external
  dependencies for the fragment job (the two jobs are submitted together
  but the common scheduler code doesn't know about it, so this needs to
  be done at this point in time);
- calls into the prepare_job() callback again, but for the fragment job,
  to check its internal dependencies as well, passing the fragment job's
  drm_sched_job and the geometry job's drm_sched_entity / pvr_queue.

The problem with the last step is that pvr_queue_prepare_job() doesn't
always take the mismatched fragment job and geometry queue into account,
in particular when checking whether there is space for the fragment
command to be submitted, so the code ends up checking for space in the
geometry (i.e. wrong) CCCB.
The rest of the nested prepare_job() callback happens to work fine at
the moment as the other internal dependencies are not relevant for a
paired fragment job.

Move the initialisation of a paired fragment job's done fence and CCCB
fence to pvr_queue_get_paired_frag_job_dep(), inferring the correct
queue from the fragment job itself.

This fixes cases where prepare_job() wrongly assumed that there was
enough space for a paired fragment job in its own CCCB, unblocking
run_job(), which then returned early without writing the full sequence
of commands to the CCCB.

The above lead to kernel warnings such as the following and potentially
job timeouts (depending on waiters on the missing commands):

  [  552.421075] WARNING: drivers/gpu/drm/imagination/pvr_cccb.c:178 at pvr_cccb_write_command_with_header+0x2c4/0x330 [powervr], CPU#2: kworker/u16:5/63
  [  552.421230] Modules linked in:
  [  552.421592] CPU: 2 UID: 0 PID: 63 Comm: kworker/u16:5 Tainted: G        W           7.0.0-rc2-gc5d053e4dccb #39 PREEMPT
  [  552.421625] Tainted: [W]=WARN
  [  552.421637] Hardware name: Texas Instruments AM625 SK (DT)
  [  552.421655] Workqueue: powervr-sched drm_sched_run_job_work [gpu_sched]
  [  552.421744] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
  [  552.421766] pc : pvr_cccb_write_command_with_header+0x2c4/0x330 [powervr]
  [  552.421850] lr : pvr_queue_submit_job_to_cccb+0x57c/0xa74 [powervr]
  [  552.421923] sp : ffff800084c47650
  [  552.421936] x29: ffff800084c47740 x28: 0000000000000df8 x27: ffff800088a77000
  [  552.421979] x26: 0000000000000030 x25: ffff800084c47680 x24: 0000000000001000
  [  552.422017] x23: ffff800084c47820 x22: 1ffff00010988ecc x21: 0000000000000008
  [  552.422055] x20: 0000000000000208 x19: ffff000006ad5a88 x18: 0000000000000000
  [  552.422093] x17: 0000000020020000 x16: 0000000000020000 x15: 0000000000000000
  [  552.422130] x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000
  [  552.422167] x11: 000000000000f2f2 x10: 00000000f3000000 x9 : 00000000f3f3f3f3
  [  552.422204] x8 : 00000000f2f2f200 x7 : ffff700010988ecc x6 : 0000000000000008
  [  552.422241] x5 : 0000000000000000 x4 : 1ffff0001114ee00 x3 : 0000000000000000
  [  552.422278] x2 : 0000000000000007 x1 : 0000000000000fff x0 : 000000000000002f
  [  552.422316] Call trace:
  [  552.422330]  pvr_cccb_write_command_with_header+0x2c4/0x330 [powervr] (P)
  [  552.422411]  pvr_queue_submit_job_to_cccb+0x57c/0xa74 [powervr]
  [  552.422486]  pvr_queue_run_job+0x3a4/0x990 [powervr]
  [  552.422562]  drm_sched_run_job_work+0x580/0xd48 [gpu_sched]
  [  552.422623]  process_one_work+0x520/0x1288
  [  552.422657]  worker_thread+0x3f0/0xb3c
  [  552.422679]  kthread+0x334/0x3d8
  [  552.422706]  ret_from_fork+0x10/0x20

Fixes: eaf01ee5ba28 ("drm/imagination: Implement job submission and scheduling")
Cc: stable@vger.kernel.org
Signed-off-by: Alessio Belle &lt;alessio.belle@imgtec.com&gt;
Reviewed-by: Brajesh Gupta &lt;brajesh.gupta@imgtec.com&gt;
Link: https://patch.msgid.link/20260330-job-submission-fixes-cleanup-v1-2-7de8c09cef8c@imgtec.com
Signed-off-by: Matt Coster &lt;matt.coster@imgtec.com&gt;
</content>
</entry>
<entry>
<title>drm/imagination: Count paired job fence as dependency in prepare_job()</title>
<updated>2026-04-08T10:17:12+00:00</updated>
<author>
<name>Alessio Belle</name>
<email>alessio.belle@imgtec.com</email>
</author>
<published>2026-03-30T07:56:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9cd74f935306cd857f46686975c43383e1d95f94'/>
<id>urn:sha1:9cd74f935306cd857f46686975c43383e1d95f94</id>
<content type='text'>
The DRM scheduler's prepare_job() callback counts the remaining
non-signaled native dependencies for a job, preventing job submission
until those (plus job data and fence update) can fit in the job queue's
CCCB.

This means checking which dependencies can be waited upon in the
firmware, i.e. whether they are backed by a UFO object, i.e. whether
their drm_sched_fence::parent has been assigned to a
pvr_queue_fence::base fence. That happens when the job owning the fence
is submitted to the firmware.

Paired geometry and fragment jobs are submitted at the same time, which
means the dependency between them can't be checked this way before
submission.

Update job_count_remaining_native_deps() to take into account the
dependency between paired jobs.

This fixes cases where prepare_job() underestimated the space left in
an almost full fragment CCCB, wrongly unblocking run_job(), which then
returned early without writing the full sequence of commands to the
CCCB.

The above lead to kernel warnings such as the following and potentially
job timeouts (depending on waiters on the missing commands):

  [  375.702979] WARNING: drivers/gpu/drm/imagination/pvr_cccb.c:178 at pvr_cccb_write_command_with_header+0x2c4/0x330 [powervr], CPU#1: kworker/u16:3/47
  [  375.703160] Modules linked in:
  [  375.703571] CPU: 1 UID: 0 PID: 47 Comm: kworker/u16:3 Tainted: G        W           7.0.0-rc2-g817eb6b11ad5 #40 PREEMPT
  [  375.703613] Tainted: [W]=WARN
  [  375.703627] Hardware name: Texas Instruments AM625 SK (DT)
  [  375.703645] Workqueue: powervr-sched drm_sched_run_job_work [gpu_sched]
  [  375.703741] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
  [  375.703764] pc : pvr_cccb_write_command_with_header+0x2c4/0x330 [powervr]
  [  375.703847] lr : pvr_queue_submit_job_to_cccb+0x578/0xa70 [powervr]
  [  375.703921] sp : ffff800084a97650
  [  375.703934] x29: ffff800084a97740 x28: 0000000000000958 x27: ffff80008565d000
  [  375.703979] x26: 0000000000000030 x25: ffff800084a97680 x24: 0000000000001000
  [  375.704017] x23: ffff800084a97820 x22: 1ffff00010952ecc x21: 0000000000000008
  [  375.704056] x20: 00000000000006a8 x19: ffff00002ff7da88 x18: 0000000000000000
  [  375.704093] x17: 0000000020020000 x16: 0000000000020000 x15: 0000000000000000
  [  375.704132] x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000
  [  375.704168] x11: 000000000000f2f2 x10: 00000000f3000000 x9 : 00000000f3f3f3f3
  [  375.704206] x8 : 00000000f2f2f200 x7 : ffff700010952ecc x6 : 0000000000000008
  [  375.704243] x5 : 0000000000000000 x4 : 1ffff00010acba00 x3 : 0000000000000000
  [  375.704279] x2 : 0000000000000007 x1 : 0000000000000fff x0 : 000000000000002f
  [  375.704317] Call trace:
  [  375.704331]  pvr_cccb_write_command_with_header+0x2c4/0x330 [powervr] (P)
  [  375.704411]  pvr_queue_submit_job_to_cccb+0x578/0xa70 [powervr]
  [  375.704487]  pvr_queue_run_job+0x3a4/0x990 [powervr]
  [  375.704562]  drm_sched_run_job_work+0x580/0xd48 [gpu_sched]
  [  375.704623]  process_one_work+0x520/0x1288
  [  375.704658]  worker_thread+0x3f0/0xb3c
  [  375.704680]  kthread+0x334/0x3d8
  [  375.704706]  ret_from_fork+0x10/0x20
  [  375.704736] ---[ end trace 0000000000000000 ]---

Fixes: eaf01ee5ba28 ("drm/imagination: Implement job submission and scheduling")
Cc: stable@vger.kernel.org
Signed-off-by: Alessio Belle &lt;alessio.belle@imgtec.com&gt;
Reviewed-by: Brajesh Gupta &lt;brajesh.gupta@imgtec.com&gt;
Link: https://patch.msgid.link/20260330-job-submission-fixes-cleanup-v1-1-7de8c09cef8c@imgtec.com
Signed-off-by: Matt Coster &lt;matt.coster@imgtec.com&gt;
</content>
</entry>
</feed>
