drm/amdgpu: skip MGCG programming on a VF for gfx v12_1
Subsystems (2)
PATCH 1/1 drm/amdgpu: skip MGCG programming on a VF for gfx v12_1
MGCG registers are PF-only. Skip programming them under SR-IOV.
Signed-off-by Jane Jian <[email protected]>
Signed-off-by YuBiao Wang <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c +7 -4
@@ -2417,8 +2417,10 @@ static int gfx_v12_1_xcc_cp_resume(struct amdgpu_device *adev, uint16_t xcc_maskreturn r; } -gfx_v12_1_xcc_update_medium_grain_clock_gating (adev, false, - xcc_id, true); +/* MGCG is device wide and owned by the PF */ +if (!amdgpu_sriov_vf (adev)) +gfx_v12_1_xcc_update_medium_grain_clock_gating (adev, false, + xcc_id, true);/* GFX CGCG and LS is disabled by rlc fw */ gfx_v12_1_xcc_enable_gui_idle_interrupt (adev, false, xcc_id);
@@ -2440,8 +2442,9 @@ static int gfx_v12_1_xcc_cp_resume(struct amdgpu_device *adev, uint16_t xcc_maskif (r)return r; } -gfx_v12_1_xcc_update_medium_grain_clock_gating (adev, true, - xcc_id, true); +if (!amdgpu_sriov_vf (adev)) +gfx_v12_1_xcc_update_medium_grain_clock_gating (adev, true, + xcc_id, true); }return 0 ;
Signature · 1 line
2.34.1
Quoted 4 lines · YuBiao Wang
MGCG registers are PF-only. Skip programming them under SR-IOV.
Signed-off-by Jane Jian <[email protected]>Signed-off-by YuBiao Wang <[email protected]>
Reviewed-by Lijo Lazar <[email protected]>
Thanks,
Lijo
Quoted 33 lines
--- drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c +7
-4@@ -2417,8 +2417,10 @@ static int gfx_v12_1_xcc_cp_resume(struct amdgpu_device *adev, uint16_t xcc_maskreturn r; } -gfx_v12_1_xcc_update_medium_grain_clock_gating (adev, false, - xcc_id, true); +/* MGCG is device wide and owned by the PF */ +if (!amdgpu_sriov_vf (adev)) +gfx_v12_1_xcc_update_medium_grain_clock_gating (adev, false, + xcc_id, true);/* GFX CGCG and LS is disabled by rlc fw */ gfx_v12_1_xcc_enable_gui_idle_interrupt (adev, false, xcc_id);@@ -2440,8 +2442,9 @@ static int gfx_v12_1_xcc_cp_resume(struct amdgpu_device *adev, uint16_t xcc_maskif (r)return r; } -gfx_v12_1_xcc_update_medium_grain_clock_gating (adev, true, - xcc_id, true); +if (!amdgpu_sriov_vf (adev)) +gfx_v12_1_xcc_update_medium_grain_clock_gating (adev, true, + xcc_id, true); }return 0 ;