drm/amd/pm: Hide irrelevant pm device attributes
authorLijo Lazar <lijo.lazar@amd.com>
Tue, 31 Oct 2023 07:02:03 +0000 (12:32 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 7 Nov 2023 17:03:31 +0000 (12:03 -0500)
commit8cfd6a05750cd7aa84e7f1e5933fa7781006bfc3
tree0e20755df4336733d80f8e0fc70b3943e66e8a73
parent0553eb9f33aa1a89a788682c78bd9747d41e65cb
drm/amd/pm: Hide irrelevant pm device attributes

Change return code to EOPNOTSUPP for unsupported functions. Use the
error code information to hide sysfs nodes not valid for the SOC.

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Yang Wang <kevinyang.wang@amd.com>
Reviewed-by: Asad Kamal <asad.kamal@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/amdgpu_dpm.c
drivers/gpu/drm/amd/pm/amdgpu_pm.c
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c