]> www.infradead.org Git - users/dwmw2/linux.git/commit
drm/amdgpu: Add sysfs interface for vcn reset mask
authorJesse.zhang@amd.com <jesse.zhang@amd.com>
Thu, 7 Nov 2024 14:53:47 +0000 (22:53 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 21 Nov 2024 20:56:22 +0000 (15:56 -0500)
commitfb9898243a7b8133c969c9bbd5d5470f7c2e1374
tree0db1e37bd4b023ea87a1596dfe48410550df9daa
parent4c28e645aa3e4d697a02fc291b363702b8a6c921
drm/amdgpu: Add sysfs interface for vcn reset mask

Add the sysfs interface for vcn:
vcn_reset_mask

The interface is read-only and show the resets supported by the IP.
For example, full adapter reset (mode1/mode2/BACO/etc),
soft reset, queue reset, and pipe reset.

V2: the sysfs node returns a text string instead of some flags (Christian)

V2: the sysfs node returns a text string instead of some flags (Christian)
v3: add a generic helper which takes the ring as parameter
    and print the strings in the order they are applied (Christian)

    check amdgpu_gpu_recovery  before creating sysfs file itself,
    and initialize supported_reset_types in IP version files (Lijo)
v4: s/sdma/vcn/ in the reset mask setup

Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Suggested-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Tim Huang <tim.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h
drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c