[PATCH] drm/amd/amdgpu: Fix return values in SI DPM code

Deucher, Alexander Alexander.Deucher at amd.com
Wed Sep 7 15:47:25 UTC 2016


> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Tom St Denis
> Sent: Wednesday, September 07, 2016 8:44 AM
> To: amd-gfx at lists.freedesktop.org
> Cc: StDenis, Tom
> Subject: [PATCH] drm/amd/amdgpu: Fix return values in SI DPM code
> 
> Fix a couple of spots where errors were not returned as
> well as add some error messages to
> si_patch_dependency_based_on_leakage() which were not being
> read.
> 
> Signed-off-by: Tom St Denis <tom.stdenis at amd.com>

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/si_dpm.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/si_dpm.c
> b/drivers/gpu/drm/amd/amdgpu/si_dpm.c
> index 92a041755e8e..e4f7c103fa31 100644
> --- a/drivers/gpu/drm/amd/amdgpu/si_dpm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/si_dpm.c
> @@ -2824,7 +2824,7 @@ done_free:
> 
>  	kfree(cac_tables);
> 
> -	return 0;
> +	return ret;
>  }
> 
>  static int si_program_cac_config_registers(struct amdgpu_device *adev,
> @@ -6376,10 +6376,16 @@ static int
> si_patch_dependency_tables_based_on_leakage(struct amdgpu_device
> *ade
> 
>  	ret = si_patch_single_dependency_table_based_on_leakage(adev,
>  								&adev-
> >pm.dpm.dyn_state.vddc_dependency_on_sclk);
> +	if (ret)
> +		DRM_ERROR("Could not patch vddc_on_sclk leakage
> table\n");
>  	ret = si_patch_single_dependency_table_based_on_leakage(adev,
>  								&adev-
> >pm.dpm.dyn_state.vddc_dependency_on_mclk);
> +	if (ret)
> +		DRM_ERROR("Could not patch vddc_on_mclk leakage
> table\n");
>  	ret = si_patch_single_dependency_table_based_on_leakage(adev,
>  								&adev-
> >pm.dpm.dyn_state.vddci_dependency_on_mclk);
> +	if (ret)
> +		DRM_ERROR("Could not patch vddci_on_mclk leakage
> table\n");
>  	return ret;
>  }
> 
> @@ -6542,7 +6548,7 @@ static int si_thermal_setup_fan_table(struct
> amdgpu_device *adev)
>  		adev->pm.dpm.fan.ucode_fan_control = false;
>  	}
> 
> -	return 0;
> +	return ret;
>  }
> 
>  static int si_fan_ctrl_start_smc_fan_control(struct amdgpu_device *adev)
> --
> 2.9.3
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list