drm/amdgpu: bypass RLC init under sriov for Tonga (v2)
authorTiecheng Zhou <Tiecheng.Zhou@amd.com>
Fri, 7 Dec 2018 01:11:35 +0000 (09:11 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 10 Dec 2018 20:21:13 +0000 (15:21 -0500)
RLC will go wrong in soft_reset under sriov

Workaroound: only need to init RLC csb, and skip RLC stop, reset, start
    this is because host-driver has already done full initialization on RLC

v2: squash in build fix

Signed-off-by: Tiecehng Zhou <Tiecheng.Zhou@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c

index 1454fc30678332ac59748054148f2120e23abf2b..08f443fa777264357a69efc8806d5572b3385532 100644 (file)
@@ -4068,6 +4068,11 @@ static void gfx_v8_0_rlc_start(struct amdgpu_device *adev)
 
 static int gfx_v8_0_rlc_resume(struct amdgpu_device *adev)
 {
+       if (amdgpu_sriov_vf(adev)) {
+               gfx_v8_0_init_csb(adev);
+               return 0;
+       }
+
        adev->gfx.rlc.funcs->stop(adev);
        adev->gfx.rlc.funcs->reset(adev);
        gfx_v8_0_init_pg(adev);