All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] accel/rocket: Fix BO creation and prep_bo handling
@ 2026-12-04 17:40 ` Sidong Yang
  0 siblings, 0 replies; 9+ messages in thread
From: Sidong Yang @ 2026-12-04 17:40 UTC (permalink / raw)
  To: Tomeu Vizoso, Oded Gabbay
  Cc: Heiko Stuebner, Jeff Hugo, Haoming Gao, Hu Xinyao, dri-devel,
	linux-rockchip, linux-kernel

This series fixes three bugs in drivers/accel/rocket/rocket_gem.c, based
on drm-misc-fixes:

1. Store iommu_map_sgtable() return values in ssize_t (avoiding int
   truncation and leaked IOMMU mappings on >= 2 GiB allocations), size
   the drm_mm node from gem_obj->size, and unmap short mappings on error.
2. Skip dma_sync_sgtable_for_cpu() in rocket_ioctl_prep_bo() when the
   fence wait fails.
3. Wait on DMA_RESV_USAGE_READ in rocket_ioctl_prep_bo() so PREP_BO also
   waits for in-flight jobs that published read fences on input BOs.

Tested on a ROCK 5B+ (RK3588).

Changes in v2:
- Dropped "Reject zero-sized BO creation". Its description was wrong
  (the ioctl already fails with -ENOSPC, nothing crashes) and Hu Xinyao's
  patch [1] covers it. On top of [1], 1/3 needs "git am -3".
- 1/3: rebased without that patch.
- 2/3: reworded the commit message, dropped Cc: stable.

v1: https://lore.kernel.org/r/20261128063844.1537615-1-sidong.yang@furiosa.ai
[1] https://lore.kernel.org/r/2287DB0FF71AB8B8+1796018957.205946-1-huxinyao@kylinsec.com.cn

Sidong Yang (3):
  accel/rocket: Fix iommu_map_sgtable() return handling in create_bo
  accel/rocket: Skip CPU cache sync when prep_bo wait fails
  accel/rocket: Wait for read fences in rocket_ioctl_prep_bo()

 drivers/accel/rocket/rocket_gem.c | 37 ++++++++++++++++++++-----------
 1 file changed, 24 insertions(+), 13 deletions(-)


base-commit: ae720e1e682846a3c23ba572d96a38f46709bef0
-- 
2.53.0


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

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

end of thread, other threads:[~2026-12-04 17:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04 17:40 [PATCH v2 0/3] accel/rocket: Fix BO creation and prep_bo handling Sidong Yang
2026-12-04 17:40 ` Sidong Yang
2026-12-04 17:40 ` [PATCH v2 1/3] accel/rocket: Fix iommu_map_sgtable() return handling in create_bo Sidong Yang
2026-12-04 17:40   ` Sidong Yang
2026-12-04 17:40 ` [PATCH v2 2/3] accel/rocket: Skip CPU cache sync when prep_bo wait fails Sidong Yang
2026-12-04 17:40   ` Sidong Yang
2026-12-04 17:40 ` [PATCH v2 3/3] accel/rocket: Wait for read fences in rocket_ioctl_prep_bo() Sidong Yang
2026-12-04 17:40   ` Sidong Yang
2026-12-04 17:52   ` sashiko-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.