(I'm so sorry!) Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

drm/amdgpu: Add debugfs to drop UALink protocol messages

Introduce a debugfs-controlled bitmap, amdgpu_ualink_drop_msg_bitmap, where each bit corresponds to a value from enum AMDGPU_UALINK_PROTOCOL_MESSAGES (e.g. NPA-REQ, NPA-RSP, NPA-FAIL, NPA-REVOKE, NPA-RELEASE). When a bit is set, the next incoming message of that type is dropped in amdgpu_ualink_process_irq() and the bit is atomically cleared via test_and_clear_bit(), so subsequent incoming messages are processed normally. This allows exercising the UALink connection reset and recovery paths (NPA-RSP timeout on the importer, retransmit/teardown on the exporter, etc.) by injecting a single packet loss from userspace, e.g.: # drop one NPA-REQ echo 0x08 > /sys/kernel/debug/dri/0/amdgpu_ualink_drop_msg_bitmap # drop one NPA-RSP echo 0x10 > /sys/kernel/debug/dri/0/amdgpu_ualink_drop_msg_bitmap The bitmap lives in struct amdgpu_ualink_mgr and is exposed via debugfs_create_ulong() next to the existing amdgpu_ualink_test entry. Signed-off-by: Mukul Joshi <mukul.joshi@amd.com> Reviewed-by: Felix Kuehling <felix.kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


Author Mukul Joshi Committer Alex Deucher Date Commit Parent ec108785
+43
3 changed files
+43
3 changed files