public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH v2 00/14] drm/v3d: Scheduler and submission fixes and refactoring
@ 2026-05-10 22:11 Maíra Canal
  2026-05-10 22:11 ` [PATCH v2 01/14] drm/v3d: Drop unused drm_encoder.h include from v3d_drv.h Maíra Canal
                   ` (14 more replies)
  0 siblings, 15 replies; 30+ messages in thread
From: Maíra Canal @ 2026-05-10 22:11 UTC (permalink / raw)
  To: Melissa Wen, Iago Toral, Tvrtko Ursulin, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	Christian König
  Cc: kernel-dev, dri-devel, Maíra Canal

This series addresses several issues in the v3d scheduler and submission
code. Most of the fixes were motivated by feedback in the vc4 scheduler
series [1], which inherited issues from v3d. Based on the issues found
there, this series addresses the issues in the v3d driver as well.

This series has cleanup patches, fixes, and finally, a refactoring of
the submission code, which allowed us to fix the atomicity of a submission.

- Cleanups and small improvements:
  - PATCH 1/14: "drm/v3d: Drop unused drm_encoder.h include from v3d_drv.h"
  - PATCH 3/14: "drm/v3d: Use inline lock for dma fence initialization"
  - PATCH 4/14: "drm/v3d: Replace spin_lock_irqsave() with spin_lock()"

- Fixes:
  - PATCH 2/14: "drm/v3d: Clear queue->active_job when v3d_fence_create() fails"
  - PATCH 5/14: "drm/v3d: Extract v3d_job_add_syncobjs() helper"
  - PATCH 6/14: "drm/v3d: Reject invalid syncobj handles in submit ioctls"
  - PATCH 13/14: "drm/v3d: Reject invalid out_sync handles in submit ioctls"

- Submission refactoring:
  - PATCH 7/14: "drm/v3d: Migrate BO reservation locking to DRM exec"
  - PATCH 8/14: "drm/v3d: Introduce struct v3d_submit and convert CL/TFU/CSD ioctls"
  - PATCH 9/14: "drm/v3d: Make v3d_get_cpu_indirect_csd_params() a pure parser"
  - PATCH 10/14: "drm/v3d: Convert submit helpers to operate on struct v3d_submit"
  - PATCH 11/14: "drm/v3d: Refactor CPU ioctl into unified submission chain"
  - PATCH 12/14: "drm/v3d: Split BO fence attach from syncobj output handling"
  - PATCH 14/14: "drm/v3d: Ensure atomic submissions in v3d_submit_jobs()" (Also a fix)

During the refactoring, I tried to break the conversion into small steps.
On the one hand, this helps reviewability; on the other hand, some things
may look unfinished at the end of a given commit. I tried to balance the
trade-off, but I'm happy to take split or squash requests during review.

[1] https://lore.kernel.org/dri-devel/20260205-vc4-drm-scheduler-v1-0-c6174fd7bbc1@igalia.com/T/

Best regards,
- Maíra

---
v1 -> v2: https://lore.kernel.org/r/20260413-v3d-sched-misc-fixes-v1-0-bac63a8ceb6c@igalia.com

- [2/14, 3/14, 5/14, 6/14] Add Tvrtko's R-b tag (Tvrtko Ursulin)
- [4/14] Use spin_lock() instead of spin_lock_irq() and change the commit message
  (Tvrtko Ursulin)
- [4/14] Use scoped_guard() instead of open-coding spin_(un)lock()
- [6/14] s/NULL/zero in the comments (Tvrtko Ursulin)
- [8/14] s/kcalloc(1, size, GFP_KERNEL)/kzalloc (Tvrtko Ursulin)
- [8/14] Save one atomic in v3d_attach_perfmon_to_jobs() by adding a conditional
  in the loop (Tvrtko Ursulin)
- [8/14] Zero is implied when initializing the struct v3d_submit (Tvrtko Ursulin)
- [8/14] Create v3d_submit_put_jobs() and v3d_submit_cleanup_jobs() (Tvrtko Ursulin)
- [9/14, 10/14, 11/14] NEW PATCHES: Trying to make the original patch
  "[PATCH 09/10] drm/v3d: Refactor CPU ioctl into unified submission chain"
  a bit easier to review.
- [10/14] Wrap drm_exec_fini() in a function v3d_submit_unlock_reservations()
  (Tvrtko Ursulin)
- [12/14] NEW PATCH: "drm/v3d: Split BO fence attach from syncobj output handling"
  - Split v3d_attach_fences_and_unlock_reservation() into different functions
    and fold parts of it into v3d_submit_jobs (Tvrtko Ursulin)
- [13/14] NEW PATCH: "drm/v3d: Reject invalid out_sync handles in submit ioctls"
  - Stop silently ignoring invalid syncobj handles (Tvrtko Ursulin)
- [14/14] Move the error path to a goto
- [14/14] Skip fence attachment and syncobj exportation to user-space if the
  submission has failed (Tvrtko Ursulin)

---
Maíra Canal (14):
      drm/v3d: Drop unused drm_encoder.h include from v3d_drv.h
      drm/v3d: Clear queue->active_job when v3d_fence_create() fails
      drm/v3d: Use inline lock for dma fence initialization
      drm/v3d: Replace spin_lock_irqsave() with spin_lock()
      drm/v3d: Extract v3d_job_add_syncobjs() helper
      drm/v3d: Reject invalid syncobj handles in submit ioctls
      drm/v3d: Migrate BO reservation locking to DRM exec
      drm/v3d: Introduce struct v3d_submit and convert CL/TFU/CSD ioctls
      drm/v3d: Make v3d_get_cpu_indirect_csd_params() a pure parser
      drm/v3d: Convert submit helpers to operate on struct v3d_submit
      drm/v3d: Refactor CPU ioctl into unified submission chain
      drm/v3d: Split BO fence attach from syncobj output handling
      drm/v3d: Reject invalid out_sync handles in submit ioctls
      drm/v3d: Ensure atomic submissions in v3d_submit_jobs()

 drivers/gpu/drm/v3d/Kconfig      |   1 +
 drivers/gpu/drm/v3d/v3d_drv.h    |  32 +-
 drivers/gpu/drm/v3d/v3d_fence.c  |   2 +-
 drivers/gpu/drm/v3d/v3d_irq.c    |  17 +-
 drivers/gpu/drm/v3d/v3d_sched.c  |  73 ++--
 drivers/gpu/drm/v3d/v3d_submit.c | 736 +++++++++++++++++++--------------------
 6 files changed, 435 insertions(+), 426 deletions(-)
---
base-commit: 19d584a634fe999786acfb0ac5289710cc84a5f6
change-id: 20260407-v3d-sched-misc-fixes-623739017e53


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

end of thread, other threads:[~2026-05-16  5:59 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-10 22:11 [PATCH v2 00/14] drm/v3d: Scheduler and submission fixes and refactoring Maíra Canal
2026-05-10 22:11 ` [PATCH v2 01/14] drm/v3d: Drop unused drm_encoder.h include from v3d_drv.h Maíra Canal
2026-05-16  5:59   ` Claude review: " Claude Code Review Bot
2026-05-10 22:11 ` [PATCH v2 02/14] drm/v3d: Clear queue->active_job when v3d_fence_create() fails Maíra Canal
2026-05-16  5:59   ` Claude review: " Claude Code Review Bot
2026-05-10 22:12 ` [PATCH v2 03/14] drm/v3d: Use inline lock for dma fence initialization Maíra Canal
2026-05-16  5:59   ` Claude review: " Claude Code Review Bot
2026-05-10 22:12 ` [PATCH v2 04/14] drm/v3d: Replace spin_lock_irqsave() with spin_lock() Maíra Canal
2026-05-16  5:59   ` Claude review: " Claude Code Review Bot
2026-05-10 22:12 ` [PATCH v2 05/14] drm/v3d: Extract v3d_job_add_syncobjs() helper Maíra Canal
2026-05-16  5:59   ` Claude review: " Claude Code Review Bot
2026-05-10 22:12 ` [PATCH v2 06/14] drm/v3d: Reject invalid syncobj handles in submit ioctls Maíra Canal
2026-05-16  5:59   ` Claude review: " Claude Code Review Bot
2026-05-10 22:12 ` [PATCH v2 07/14] drm/v3d: Migrate BO reservation locking to DRM exec Maíra Canal
2026-05-16  5:59   ` Claude review: " Claude Code Review Bot
2026-05-10 22:12 ` [PATCH v2 08/14] drm/v3d: Introduce struct v3d_submit and convert CL/TFU/CSD ioctls Maíra Canal
2026-05-16  5:59   ` Claude review: " Claude Code Review Bot
2026-05-10 22:12 ` [PATCH v2 09/14] drm/v3d: Make v3d_get_cpu_indirect_csd_params() a pure parser Maíra Canal
2026-05-16  5:59   ` Claude review: " Claude Code Review Bot
2026-05-10 22:12 ` [PATCH v2 10/14] drm/v3d: Convert submit helpers to operate on struct v3d_submit Maíra Canal
2026-05-16  5:59   ` Claude review: " Claude Code Review Bot
2026-05-10 22:12 ` [PATCH v2 11/14] drm/v3d: Refactor CPU ioctl into unified submission chain Maíra Canal
2026-05-16  5:59   ` Claude review: " Claude Code Review Bot
2026-05-10 22:12 ` [PATCH v2 12/14] drm/v3d: Split BO fence attach from syncobj output handling Maíra Canal
2026-05-16  5:59   ` Claude review: " Claude Code Review Bot
2026-05-10 22:12 ` [PATCH v2 13/14] drm/v3d: Reject invalid out_sync handles in submit ioctls Maíra Canal
2026-05-16  5:59   ` Claude review: " Claude Code Review Bot
2026-05-10 22:12 ` [PATCH v2 14/14] drm/v3d: Ensure atomic submissions in v3d_submit_jobs() Maíra Canal
2026-05-16  5:59   ` Claude review: " Claude Code Review Bot
2026-05-16  5:59 ` Claude review: drm/v3d: Scheduler and submission fixes and refactoring 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