drm/amdgpu/pm: Don't show pp_power_profile_mode for unsupported devices
authorMario Limonciello <mario.limonciello@amd.com>
Fri, 29 Oct 2021 21:09:26 +0000 (16:09 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 3 Nov 2021 16:22:07 +0000 (12:22 -0400)
commita750559132c64f3fa40418876bc43881e169a8f0
treeeb2b40948022c4324849864e1f63075d8a56d858
parenta035be8a05bf7b9591cff1be4e9175bd5edab35a
drm/amdgpu/pm: Don't show pp_power_profile_mode for unsupported devices

For ASICs not supporting power profile mode, don't show the attribute.
Verify that the function has been implemented by the subsystem.

Suggested-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/amdgpu_pm.c
drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c