[PATCH v2 0/4] drm/vc4: Clean-up the BO seqnos

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This series introduces a series of clean-ups for BO reservations in
the VC4 driver. Currently, VC4 uses shared fences to track BO
reservations, similar to many other DRM devices. However, in addition
to DMA reservation objects, VC4 has been maintaining a separate seqno
tracking system for BOs to track job completion.

The seqno tracking system was implemented before DMA reservation
objects and was left in the code after DMA reservation's introduction.
This approach is now redundant, as job completion can be effectively
tracked using fences. Consequently, this series focuses on eliminating
seqnos from the BO implementation.

Patch Breakdown
===============

* Patch #1: Uses the DRM Exec to replace the open-coded implementation
of the functions `drm_gem_lock_reservations()` and
`drm_gem_unlock_reservations()` in the VC4 driver code. A straightforward
change with no functional changes.

* Patch #2: Implements the VC4 wait BO IOCTL using DMA reservations.
The new implementation closely mirrors the V3D approach and removes
the IOCTL's dependency on BO sequence numbers.

* Patch #3: The central piece of this patchset. It removes `bo->seqno`,
`bo->write_seqno`, and `exec->bin_dep_seqno` from the driver. As the
seqno tracking system is redundant, its deletion is relatively
straightforward. The only notable change is `vc4_async_set_fence_cb()`,
which now uses `dma_fence_add_callback()` to add the VC4 callback.

* Patch #4: Deletes the now-unused function `vc4_queue_seqno_cb()`.

Changes
=======

v1 -> v2: https://lore.kernel.org/dri-devel/20241206131706.203324-1-mcanal@xxxxxxxxxx/T/

* [1/4]: Use DRM Exec to replace the (un)lock reservation functions (Christian König)

Best Regards,
- Maíra

Maíra Canal (4):
  drm/vc4: Use DRM Execution Contexts
  drm/vc4: Use DMA Resv to implement VC4 wait BO IOCTL
  drm/vc4: Remove BOs seqnos
  drm/vc4: Remove `vc4_queue_seqno_cb()`

 drivers/gpu/drm/vc4/Kconfig        |   1 +
 drivers/gpu/drm/vc4/vc4_crtc.c     |  22 ++--
 drivers/gpu/drm/vc4/vc4_drv.h      |  26 ++---
 drivers/gpu/drm/vc4/vc4_gem.c      | 180 +++++++----------------------
 drivers/gpu/drm/vc4/vc4_validate.c |  11 --
 5 files changed, 64 insertions(+), 176 deletions(-)

-- 
2.47.1




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux