aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/gpu/drm/amd/include
diff options
context:
space:
mode:
authorEvan Quan <evan.quan@amd.com>2022-01-11 15:02:19 +0800
committerAlex Deucher <alexander.deucher@amd.com>2022-01-14 17:51:15 -0500
commit685fae24d94fd615b7058832fcb437eb588f4860 (patch)
tree4228a37a53ab54831d7f6c88238ab12a11ec9753 /drivers/gpu/drm/amd/include
parentdrm/amdgpu/pm: move additional logic into amdgpu_dpm_force_performance_level (diff)
downloadwireguard-linux-685fae24d94fd615b7058832fcb437eb588f4860.tar.xz
wireguard-linux-685fae24d94fd615b7058832fcb437eb588f4860.zip
drm/amd/pm: correct the checks for fan attributes support
On functionality unsupported, -EOPNOTSUPP will be returned. And we rely on that to determine the fan attributes support. Fixes: 79c65f3fcbb128 ("drm/amd/pm: do not expose power implementation details to amdgpu_pm.c") Signed-off-by: Evan Quan <evan.quan@amd.com> Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/include')
-rw-r--r--drivers/gpu/drm/amd/include/kgd_pp_interface.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/include/kgd_pp_interface.h b/drivers/gpu/drm/amd/include/kgd_pp_interface.h
index a8eec91c0995..387120099493 100644
--- a/drivers/gpu/drm/amd/include/kgd_pp_interface.h
+++ b/drivers/gpu/drm/amd/include/kgd_pp_interface.h
@@ -315,8 +315,8 @@ struct amd_pm_funcs {
void *rps,
bool *equal);
/* export for sysfs */
- void (*set_fan_control_mode)(void *handle, u32 mode);
- u32 (*get_fan_control_mode)(void *handle);
+ int (*set_fan_control_mode)(void *handle, u32 mode);
+ int (*get_fan_control_mode)(void *handle, u32 *fan_mode);
int (*set_fan_speed_pwm)(void *handle, u32 speed);
int (*get_fan_speed_pwm)(void *handle, u32 *speed);
int (*force_clock_level)(void *handle, enum pp_clock_type type, uint32_t mask);