OSDN Git Service

drm/amdgpu: sw pstate switch should only be for vega20
authorJonathan Kim <jonathan.kim@amd.com>
Fri, 24 Apr 2020 22:16:06 +0000 (18:16 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 27 Apr 2020 19:51:42 +0000 (15:51 -0400)
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@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c

index 54d8a3e..48c0ce1 100644 (file)
@@ -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);