Same five fixes as v4, with both review comments addressed.

Changes in v5:
  - patch 3: XDNA_DBG rather than XDNA_ERR, per Lizhi. An unprivileged
    caller can repeat it, which is the same reason patch 1 does not log
    at error level.
  - patch 5: reworked as Lizhi asked. The assigned_hwctx test moves into
    amdxdna_drm_sync_bo_ioctl(), which has the object already, so
    amdxdna_hwctx_sync_debug_bo() keeps -EINVAL for a context that is
    named but gone, and the handle is not resolved twice.
  - patches 1, 2 and 4 carry Lizhi's Reviewed-by, otherwise unchanged.

One behaviour change userspace can see, spelled out in patch 4: SYNC_BO
answers -EOPNOTSUPP for an imported BO, which on a carveout device is every
AMDXDNA_BO_DEV.

Patch 4 still needs "accel/amdxdna: return early from a zero-length
flush", which is now in drm-misc-fixes, so it wants that backmerged into
drm-misc-next. Patches 1, 2, 3 and 5 apply without it.

  https://lore.kernel.org/all/[email protected]/

v4: https://lore.kernel.org/all/[email protected]/

Built on drm-misc-next plus that commit, each commit on its own: x86_64
with DRM_ACCEL_AMDXDNA=m, clang 22.1.8, W=1, no warnings, checkpatch
--strict clean.

Taimuraz Kaitmazov (5):
  accel/amdxdna: refuse an I/O memory mapping of an imported BO
  accel/amdxdna: check the sync range for overflow on a device BO
  accel/amdxdna: do not warn when a sync request is rejected
  accel/amdxdna: refuse to flush an imported BO
  accel/amdxdna: do not fail a sync for a BO with no debug context

 drivers/accel/amdxdna/amdxdna_gem.c | 30 ++++++++++++++++++++---------
 1 file changed, 21 insertions(+), 9 deletions(-)

-- 
2.55.0

Reply via email to