drm/amdgpu: Ignore stop rlc on SRIOV environment.
authorGavin Wan <Gavin.Wan@amd.com>
Wed, 9 Nov 2022 18:12:42 +0000 (13:12 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 10 Nov 2022 20:29:46 +0000 (15:29 -0500)
For SRIOV, the guest driver should not do stop rlc. The host
handles programing RLC.

On SRIOV, the stop rlc will be hang (RLC related registers are
blocked by policy) when the RLCG interface is not enabled.

Reviewed-by: Yang Wang <kevinyang.wang@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Gavin Wan <Gavin.Wan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c

index 320cfce..9492dd6 100644 (file)
@@ -1518,7 +1518,7 @@ static int smu_disable_dpms(struct smu_context *smu)
        }
 
        if (adev->ip_versions[GC_HWIP][0] >= IP_VERSION(9, 4, 2) &&
-           adev->gfx.rlc.funcs->stop)
+           !amdgpu_sriov_vf(adev) && adev->gfx.rlc.funcs->stop)
                adev->gfx.rlc.funcs->stop(adev);
 
        return ret;