[PATCH] drm/amdgpu: sw pstate switch should only be for vega20

Felix Kuehling felix.kuehling at amd.com
Fri Apr 24 22:50:51 UTC 2020


Am 2020-04-24 um 6:22 p.m. schrieb Jonathan Kim:
> Driver steered p-state switching is designed for Vega20 only.
> Also simplify early return for temporary disable due to SMU FW
> bug.
>
> Signed-off-by: Jonathan Kim <Jonathan.Kim at amd.com>

Reviewed-by: Felix Kuehling <Felix.Kuehling at amd.com>

I assume the early return would be qualified with a firmware version
check once a firmware fix is available.

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
> index 54d8a3e7e75c..48c0ce13f68e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
> @@ -395,7 +395,9 @@ int amdgpu_xgmi_set_pstate(struct amdgpu_device *adev, int pstate)
>  	bool init_low = hive->pstate == AMDGPU_XGMI_PSTATE_UNKNOWN;
>  
>  	/* fw bug so temporarily disable pstate switching */
> -	if (!hive || adev->asic_type == CHIP_VEGA20)
> +	return 0;
> +
> +	if (!hive || adev->asic_type != CHIP_VEGA20)
>  		return 0;
>  
>  	mutex_lock(&hive->hive_lock);


More information about the amd-gfx mailing list