From: Jonathan Kim Date: Fri, 24 Apr 2020 22:16:06 +0000 (-0400) Subject: drm/amdgpu: sw pstate switch should only be for vega20 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=dfe31f255fd62655de63ecc45b0e5d1b0504eabb;p=linux.git drm/amdgpu: sw pstate switch should only be for vega20 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 Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c index 54d8a3e7e75ca..48c0ce13f68e3 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);