]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amd/ras: make UNIRAS CPER debugfs header legacy-compatible
authorXiang Liu <xiang.liu@amd.com>
Fri, 29 May 2026 14:10:09 +0000 (22:10 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 3 Jun 2026 17:50:39 +0000 (13:50 -0400)
commit7822e87bb77e906465c5d1e43818e1b34b59ee04
tree939ea322f42f9c63388a3121716e2c6dfadc99e2
parent0b57f1380c8d57c0a36effc17b236a653091a351
drm/amd/ras: make UNIRAS CPER debugfs header legacy-compatible

The UNIRAS CPER debugfs path returned a zeroed 12-byte prefix and used
file offset directly as the CPER record index. Legacy CPER ring readers
expect the prefix to contain three 32-bit ring pointers followed
immediately by CPER payload data.

Build the same header shape for UNIRAS reads by reporting a zero read
pointer and matching write pointers for the returned payload size. Keep
an internal record cursor behind the debugfs offset so follow-up reads
continue from the correct CPER record while first reads still expose the
legacy prefix.

Signed-off-by: Xiang Liu <xiang.liu@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c