public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] drm/v3d: Fix indirect CSD jobs with zeroed workgroups
@ 2026-06-02 11:57 Maíra Canal
  2026-06-02 11:57 ` [PATCH v3 1/2] drm/v3d: Fix vaddr leak when indirect CSD has " Maíra Canal
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Maíra Canal @ 2026-06-02 11:57 UTC (permalink / raw)
  To: Melissa Wen, Iago Toral Quiroga, Jose Maria Casanova Crespo
  Cc: kernel-dev, dri-devel, stable, Maíra Canal

Hi,

Indirect CSD lets userspace defer the workgroup counts to a GPU buffer
that is only filled at runtime, so the counts are unknown at submission
time and can legitimately turn out to be zero.

However, exercing this case exposed two issues in the CSD path.

  1. Virtual address leaks when the indirect CSD has zeroed workgroups.

  2. CSD jobs with zeroed workgroups shouldn't be submitted to hardware.

This series intends to address both issues.

Best regards,
- Maíra

---
v1 -> v2: https://lore.kernel.org/r/20260530-v3d-fix-indirect-csd-v1-0-15533948663f@igalia.com

- [2/2] Don't check the whole cfg[0-2], check only the number of workgroups (Iago Toral)
- [2/2] Add a comment about how the HW interprets 0 (Iago Toral)

v2 -> v3: https://lore.kernel.org/r/20260601-v3d-fix-indirect-csd-v2-0-aaebf035b936@igalia.com

- [1/2, 2/2] Add Iago's R-b (Iago Toral)
- [2/2] Adjust the comment to make it more accurate (Iago Toral)

---
Maíra Canal (2):
      drm/v3d: Fix vaddr leak when indirect CSD has zeroed workgroups
      drm/v3d: Skip CSD when it has zeroed workgroups

 drivers/gpu/drm/v3d/v3d_sched.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
---
base-commit: ae0383e5a9a4b12d68c76c4769857def4665deff
change-id: 20260516-v3d-fix-indirect-csd-6806cf20a57a


^ permalink raw reply	[flat|nested] 9+ messages in thread
* [PATCH v4 0/2] drm/v3d: Fix indirect CSD jobs with zeroed workgroups
@ 2026-06-02 17:50 Maíra Canal
  2026-06-04  2:23 ` Claude review: " Claude Code Review Bot
  0 siblings, 1 reply; 9+ messages in thread
From: Maíra Canal @ 2026-06-02 17:50 UTC (permalink / raw)
  To: Melissa Wen, Iago Toral Quiroga, Jose Maria Casanova Crespo
  Cc: kernel-dev, dri-devel, stable, Maíra Canal

Hi,

Indirect CSD lets userspace defer the workgroup counts to a GPU buffer
that is only filled at runtime, so the counts are unknown at submission
time and can legitimately turn out to be zero.

However, exercing this case exposed two issues in the CSD path.

  1. Virtual address leaks when the indirect CSD has zeroed workgroups.

  2. CSD jobs with zeroed workgroups shouldn't be submitted to hardware.

This series intends to address both issues.

Tested with the following CTS tests:

 - dEQP-VK.compute.*.indirect_dispatch.upload_buffer.empty_command_x*
 - dEQP-VK.compute.*.indirect_dispatch.upload_buffer.empty_command_y*
 - dEQP-VK.compute.*.indirect_dispatch.upload_buffer.empty_command_z*

Best regards,
- Maíra

---
v1 -> v2: https://lore.kernel.org/r/20260530-v3d-fix-indirect-csd-v1-0-15533948663f@igalia.com

- [2/2] Don't check the whole cfg[0-2], check only the number of workgroups (Iago Toral)
- [2/2] Add a comment about how the HW interprets 0 (Iago Toral)

v2 -> v3: https://lore.kernel.org/r/20260601-v3d-fix-indirect-csd-v2-0-aaebf035b936@igalia.com

- [1/2, 2/2] Add Iago's R-b (Iago Toral)
- [2/2] Adjust the comment to make it more accurate (Iago Toral)

v3 -> v4: https://lore.kernel.org/r/20260602-v3d-fix-indirect-csd-v3-0-cc79e06e543c@igalia.com

- [2/2] Always rewrite CFG[0..2] from the indirect buffer to avoid
        preserving stale contents from user space.

---
Maíra Canal (2):
      drm/v3d: Fix vaddr leak when indirect CSD has zeroed workgroups
      drm/v3d: Skip CSD when it has zeroed workgroups

 drivers/gpu/drm/v3d/v3d_sched.c | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)
---
base-commit: ae0383e5a9a4b12d68c76c4769857def4665deff
change-id: 20260516-v3d-fix-indirect-csd-6806cf20a57a


^ permalink raw reply	[flat|nested] 9+ messages in thread
* [PATCH v2 0/2] drm/v3d: Fix indirect CSD jobs with zeroed workgroups
@ 2026-06-01 19:13 Maíra Canal
  2026-06-04  3:44 ` Claude review: " Claude Code Review Bot
  0 siblings, 1 reply; 9+ messages in thread
From: Maíra Canal @ 2026-06-01 19:13 UTC (permalink / raw)
  To: Melissa Wen, Iago Toral Quiroga, Jose Maria Casanova Crespo
  Cc: kernel-dev, dri-devel, stable, Maíra Canal

Hi,

Indirect CSD lets userspace defer the workgroup counts to a GPU buffer
that is only filled at runtime, so the counts are unknown at submission
time and can legitimately turn out to be zero.

However, exercing this case exposed two issues in the CSD path.

  1. Virtual address leaks when the indirect CSD has zeroed workgroups.

  2. CSD jobs with zeroed workgroups shouldn't be submitted to hardware.

This series intends to address both issues.

Best regards,
- Maíra

---
v1 -> v2: https://lore.kernel.org/r/20260530-v3d-fix-indirect-csd-v1-0-15533948663f@igalia.com

- [2/2] Don't check the whole cfg[0-2], check only the number of workgroups (Iago Toral)
- [2/2] Add a comment about how the HW interprets 0 (Iago Toral)

---
Maíra Canal (2):
      drm/v3d: Fix vaddr leak when indirect CSD has zeroed workgroups
      drm/v3d: Skip CSD when it has zeroed workgroups

 drivers/gpu/drm/v3d/v3d_sched.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
---
base-commit: 5ab62dd3687bcc2cc542b99385aabac5c996db6f
change-id: 20260516-v3d-fix-indirect-csd-6806cf20a57a


^ permalink raw reply	[flat|nested] 9+ messages in thread
* [PATCH 0/2] drm/v3d: Fix indirect CSD jobs with zeroed workgroups
@ 2026-05-30 19:51 Maíra Canal
  2026-06-04  5:15 ` Claude review: " Claude Code Review Bot
  0 siblings, 1 reply; 9+ messages in thread
From: Maíra Canal @ 2026-05-30 19:51 UTC (permalink / raw)
  To: Melissa Wen, Iago Toral Quiroga, Jose Maria Casanova Crespo
  Cc: kernel-dev, dri-devel, stable, Maíra Canal

Hi,

Indirect CSD lets userspace defer the workgroup counts to a GPU buffer
that is only filled at runtime, so the counts are unknown at submission
time and can legitimately turn out to be zero.

However, exercing this case exposed two issues in the CSD path.

  1. Virtual address leaks when the indirect CSD has zeroed workgroups.

  2. CSD jobs with zeroed workgroups shouldn't be submitted to hardware.

This series intends to address both issues.

Best regards,
- Maíra

---
Maíra Canal (2):
      drm/v3d: Fix vaddr leak when indirect CSD has zeroed workgroups
      drm/v3d: Skip CSD when it has zeroed workgroups

 drivers/gpu/drm/v3d/v3d_sched.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
base-commit: 5ab62dd3687bcc2cc542b99385aabac5c996db6f
change-id: 20260516-v3d-fix-indirect-csd-6806cf20a57a


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-06-04  5:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-02 11:57 [PATCH v3 0/2] drm/v3d: Fix indirect CSD jobs with zeroed workgroups Maíra Canal
2026-06-02 11:57 ` [PATCH v3 1/2] drm/v3d: Fix vaddr leak when indirect CSD has " Maíra Canal
2026-06-04  2:49   ` Claude review: " Claude Code Review Bot
2026-06-02 11:57 ` [PATCH v3 2/2] drm/v3d: Skip CSD when it " Maíra Canal
2026-06-04  2:49   ` Claude review: " Claude Code Review Bot
2026-06-04  2:49 ` Claude review: drm/v3d: Fix indirect CSD jobs with " Claude Code Review Bot
  -- strict thread matches above, loose matches on Subject: below --
2026-06-02 17:50 [PATCH v4 0/2] " Maíra Canal
2026-06-04  2:23 ` Claude review: " Claude Code Review Bot
2026-06-01 19:13 [PATCH v2 0/2] " Maíra Canal
2026-06-04  3:44 ` Claude review: " Claude Code Review Bot
2026-05-30 19:51 [PATCH 0/2] " Maíra Canal
2026-06-04  5:15 ` Claude review: " Claude Code Review Bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox