summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorTaimuraz Kaitmazov <taimuraz@kaitmazov.com>2026-08-20 01:44:58 +0300
committerLizhi Hou <lizhi.hou@amd.com>2026-09-17 13:09:10 -0700
commitb1da2a6cc13d66c03c364f7b72d5a343b3ccdb3c (patch)
treeb08b70c32c8de3309d84267612a5b4280590d589 /tools/perf/scripts/python/stackcollapse.py
parentf2751f8754ae7ca0bba1a9536e153c8cc3aa4aae (diff)
downloadlinux-b1da2a6cc13d66c03c364f7b72d5a343b3ccdb3c.tar.gz
linux-b1da2a6cc13d66c03c364f7b72d5a343b3ccdb3c.zip
accel/amdxdna: do not fail a sync for a BO with no debug context
amdxdna_drm_sync_bo_ioctl() calls amdxdna_hwctx_sync_debug_bo() for every FROM_DEVICE sync, which answers -EINVAL when the BO's assigned_hwctx names no context. Only a BO attached with ATTACH_DEBUG_BO is ever given one, so an ordinary read-back sync reports failure after its flush has already run. Ask for the debug sync only when the BO has a context. An unattached BO carries AMDXDNA_INVALID_CTX_HANDLE and hwctx ids are allocated above it, so the test is exact, -EINVAL keeps meaning that the named context is gone, and the handle is not resolved twice. The field is written under dev_lock and read here without it; the context is still resolved under that lock, so a racing attach only decides whether this sync sees the buffer. Fixes: 7ea046838021 ("accel/amdxdna: Support firmware debug buffer") Suggested-by: Lizhi Hou <lizhi.hou@amd.com> Signed-off-by: Taimuraz Kaitmazov <taimuraz@kaitmazov.com> Reviewed-by: Lizhi Hou <lizhi.hou@amd.com> Signed-off-by: Lizhi Hou <lizhi.hou@amd.com> Link: https://patch.msgid.link/20260819224458.257346-6-taimuraz@kaitmazov.com
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions