]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
drm/amdgpu/powerplay: Target power profile mode should be the second parameter of...
authorchen gong <curry.gong@amd.com>
Fri, 10 Jul 2020 06:21:10 +0000 (14:21 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 14 Jul 2020 18:33:41 +0000 (14:33 -0400)
A small mistake

Signed-off-by: chen gong <curry.gong@amd.com>
Acked-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/renoir_ppt.c

index d4aa01a05c54181b538ed669630d690c31a1553f..5071cfbe193f243b46a0c9efc46c9a807350603c 100644 (file)
@@ -683,18 +683,18 @@ static int renoir_set_power_profile_mode(struct smu_context *smu, long *input, u
        uint32_t profile_mode = input[size];
 
        if (profile_mode > PP_SMC_POWER_PROFILE_CUSTOM) {
-               dev_err(smu->adev->dev, "Invalid power profile mode %d\n", smu->power_profile_mode);
+               dev_err(smu->adev->dev, "Invalid power profile mode %d\n", profile_mode);
                return -EINVAL;
        }
 
        /* conv PP_SMC_POWER_PROFILE* to WORKLOAD_PPLIB_*_BIT */
-       workload_type = smu_workload_get_type(smu, smu->power_profile_mode);
+       workload_type = smu_workload_get_type(smu, profile_mode);
        if (workload_type < 0) {
                /*
                 * TODO: If some case need switch to powersave/default power mode
                 * then can consider enter WORKLOAD_COMPUTE/WORKLOAD_CUSTOM for power saving.
                 */
-               dev_err_once(smu->adev->dev, "Unsupported power profile mode %d on RENOIR\n",smu->power_profile_mode);
+               dev_err_once(smu->adev->dev, "Unsupported power profile mode %d on RENOIR\n", profile_mode);
                return -EINVAL;
        }