Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] accel/rocket: Fixes trailer cites wrong commit for
  rocket_ioctl_prep_bo()
--

commit a970bdabf5bfb0b280ea79229cdb58bc77903830
Author: Sidong Yang <[email protected]>

> accel/rocket: Wait for read fences in rocket_ioctl_prep_bo()
>
> DRM_IOCTL_ROCKET_PREP_BO begins CPU ownership of a BO and has no
> read/write direction flag: userspace calls it before reading an output
> buffer as well as before overwriting an input buffer for reuse.
>
> Since commit 4d8cb7be620e ("accel/rocket: publish read fences for input
> buffers"), in-flight jobs attach DMA_RESV_USAGE_READ fences to their
> input BOs. Waiting only for DMA_RESV_USAGE_WRITE therefore returns
> immediately while an NPU job is still reading the buffer.
>
> Wait for DMA_RESV_USAGE_READ so PREP_BO waits for both write and read
> fences before transferring ownership back to the CPU.
>
> Fixes: 4d8cb7be620e ("accel/rocket: publish read fences for input buffers")
> Signed-off-by: Sidong Yang <[email protected]>

[Severity: Low]
Should the Fixes tag cite 525ad89dd904 ("accel/rocket: Add IOCTLs for
synchronizing memory accesses") instead?

Commit 4d8cb7be620e ("accel/rocket: publish read fences for input buffers")
only added read fences in rocket_job.c and did not introduce the bug in
rocket_ioctl_prep_bo().  The DMA_RESV_USAGE_WRITE wait in
rocket_ioctl_prep_bo() was introduced by 525ad89dd904 ("accel/rocket: Add
IOCTLs for synchronizing memory accesses"), and already missed read fences
such as those attached by a foreign PRIME importer reading an exported BO.

  Fixes: 525ad89dd904 ("accel/rocket: Add IOCTLs for synchronizing memory 
accesses")

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=3

Reply via email to