drm/amd/amdgpu: Fix the CGCG setting is overwritten for SRIOV.
Subsystems (2)
PATCH 1/1 drm/amd/amdgpu: Fix the CGCG setting is overwritten for SRIOV.
For SRIOV, since the CP_INT_CNTL_RING0 is programed on host side. The Guest should not program CP_INT_CNTL_RING0 again.
Change-Id Ic336fab3b23b8371c9e9e192182a3ba14a8db8e1
Signed-off-by Gavin Wan <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +6 -1
@@ -4558,7 +4558,12 @@ static void gfx_v10_0_constants_init(struct amdgpu_device *adev)static void gfx_v10_0_enable_gui_idle_interrupt (struct amdgpu_device *adev,bool enable) { -u32 tmp =RREG32_SOC15 (GC ,0 , mmCP_INT_CNTL_RING0); +u32 tmp; + +if (amdgpu_sriov_vf (adev)) +return ; + + tmp =RREG32_SOC15 (GC ,0 , mmCP_INT_CNTL_RING0); tmp =REG_SET_FIELD (tmp,CP_INT_CNTL_RING0 ,CNTX_BUSY_INT_ENABLE , enable ?1 :0 );
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 6 lines · Gavin Wan
For SRIOV, since the
CP_INT_CNTL_RING0is programed on host side. The Guest should not programCP_INT_CNTL_RING0again.Change-Id Ic336fab3b23b8371c9e9e192182a3ba14a8db8e1Signed-off-by Gavin Wan <[email protected]>
Acked-by Alex Deucher <[email protected]>
Quoted 25 lines
--- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +6
-2@@ -4558,7 +4558,12 @@ static void gfx_v10_0_constants_init(struct amdgpu_device *adev)static void gfx_v10_0_enable_gui_idle_interrupt (struct amdgpu_device *adev,bool enable) { -u32 tmp =RREG32_SOC15 (GC ,0 , mmCP_INT_CNTL_RING0); +u32 tmp; + +if (amdgpu_sriov_vf (adev)) +return ; + + tmp =RREG32_SOC15 (GC ,0 , mmCP_INT_CNTL_RING0); tmp =REG_SET_FIELD (tmp,CP_INT_CNTL_RING0 ,CNTX_BUSY_INT_ENABLE , enable ?1 :0 ); --2.25.1
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx