]> Git Repo - linux.git/blobdiff - drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
Merge branch 'sched/rt' into sched/core, to pick up -rt changes
[linux.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_pm.c
index 193d53720d9baeca7800e376bed88d9cc2273542..03ca8c69114fc22ebec9c25601c420a5d9d6bf2c 100644 (file)
@@ -1734,7 +1734,7 @@ static ssize_t amdgpu_hwmon_get_fan1_input(struct device *dev,
                return -EINVAL;
 
        if (is_support_sw_smu(adev)) {
-               err = smu_get_current_rpm(&adev->smu, &speed);
+               err = smu_get_fan_speed_rpm(&adev->smu, &speed);
                if (err)
                        return err;
        } else if (adev->powerplay.pp_funcs->get_fan_speed_rpm) {
@@ -1794,7 +1794,7 @@ static ssize_t amdgpu_hwmon_get_fan1_target(struct device *dev,
                return -EINVAL;
 
        if (is_support_sw_smu(adev)) {
-               err = smu_get_current_rpm(&adev->smu, &rpm);
+               err = smu_get_fan_speed_rpm(&adev->smu, &rpm);
                if (err)
                        return err;
        } else if (adev->powerplay.pp_funcs->get_fan_speed_rpm) {
@@ -2077,11 +2077,6 @@ static ssize_t amdgpu_hwmon_show_sclk(struct device *dev,
             (ddev->switch_power_state != DRM_SWITCH_POWER_ON))
                return -EINVAL;
 
-       /* sanity check PP is enabled */
-       if (!(adev->powerplay.pp_funcs &&
-             adev->powerplay.pp_funcs->read_sensor))
-             return -EINVAL;
-
        /* get the sclk */
        r = amdgpu_dpm_read_sensor(adev, AMDGPU_PP_SENSOR_GFX_SCLK,
                                   (void *)&sclk, &size);
@@ -2112,11 +2107,6 @@ static ssize_t amdgpu_hwmon_show_mclk(struct device *dev,
             (ddev->switch_power_state != DRM_SWITCH_POWER_ON))
                return -EINVAL;
 
-       /* sanity check PP is enabled */
-       if (!(adev->powerplay.pp_funcs &&
-             adev->powerplay.pp_funcs->read_sensor))
-             return -EINVAL;
-
        /* get the sclk */
        r = amdgpu_dpm_read_sensor(adev, AMDGPU_PP_SENSOR_GFX_MCLK,
                                   (void *)&mclk, &size);
@@ -2996,13 +2986,10 @@ void amdgpu_pm_compute_clocks(struct amdgpu_device *adev)
        }
 
        if (is_support_sw_smu(adev)) {
-               struct smu_context *smu = &adev->smu;
                struct smu_dpm_context *smu_dpm = &adev->smu.smu_dpm;
-               mutex_lock(&(smu->mutex));
                smu_handle_task(&adev->smu,
                                smu_dpm->dpm_level,
                                AMD_PP_TASK_DISPLAY_CONFIG_CHANGE);
-               mutex_unlock(&(smu->mutex));
        } else {
                if (adev->powerplay.pp_funcs->dispatch_tasks) {
                        if (!amdgpu_device_has_dc_support(adev)) {
This page took 0.034311 seconds and 4 git commands to generate.