From: sashiko-bot@kernel.org
To: "Sidong Yang" <sidong.yang@furiosa.ai>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 3/3] accel/rocket: Wait for read fences in rocket_ioctl_prep_bo()
Date: Fri, 04 Dec 2026 17:52:08 +0000 [thread overview]
Message-ID: <sashiko-outbox-250351@kernel.org> (raw)
In-Reply-To: <20261204174009.274509-4-sidong.yang@furiosa.ai>
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 <sidong.yang@furiosa.ai>
> 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 <sidong.yang@furiosa.ai>
[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/20261204174009.274509-1-sidong.yang@furiosa.ai?part=3
prev parent reply other threads:[~2026-12-04 17:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` [PATCH v2 1/3] accel/rocket: Fix iommu_map_sgtable() return handling in create_bo 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 ` [PATCH v2 3/3] accel/rocket: Wait for read fences in rocket_ioctl_prep_bo() Sidong Yang
2026-12-04 17:52 ` sashiko-bot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-250351@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=sidong.yang@furiosa.ai \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox