drm/amd/amdgpu: allow use kiq to do hdp flush under sriov
Subsystems (2)
PATCH 1/1 drm/amd/amdgpu: allow use kiq to do hdp flush under sriov
when use cpu to do page table update under sriov runtime, since mmio access is blocked, kiq has to be used to flush hdp.
change WREG32_NO_KIQ to WREG32 to allow kiq.
--- drivers/gpu/drm/amd/amdgpu/hdp_v4_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/hdp_v5_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/hdp_v6_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/hdp_v7_0.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/hdp_v4_0.c +1 -1
@@ -41,7 +41,7 @@ static void hdp_v4_0_flush_hdp(struct amdgpu_device *adev, struct amdgpu_ring *ring) {if (!ring || !ring->funcs->emit_wreg) -WREG32_NO_KIQ ((adev->rmmio_remap.reg_offset +KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL ) >>2 ,0 ); +WREG32 ((adev->rmmio_remap.reg_offset +KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL ) >>2 ,0 );else amdgpu_ring_emit_wreg (ring, (adev->rmmio_remap.reg_offset +KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL ) >>2 ,0 ); }
drivers/gpu/drm/amd/amdgpu/hdp_v5_0.c +1 -1
@@ -32,7 +32,7 @@ static void hdp_v5_0_flush_hdp(struct amdgpu_device *adev, struct amdgpu_ring *ring) {if (!ring || !ring->funcs->emit_wreg) -WREG32_NO_KIQ ((adev->rmmio_remap.reg_offset +KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL ) >>2 ,0 ); +WREG32 ((adev->rmmio_remap.reg_offset +KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL ) >>2 ,0 );else amdgpu_ring_emit_wreg (ring, (adev->rmmio_remap.reg_offset +KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL ) >>2 ,0 ); }
drivers/gpu/drm/amd/amdgpu/hdp_v6_0.c +1 -1
@@ -35,7 +35,7 @@ static void hdp_v6_0_flush_hdp(struct amdgpu_device *adev, struct amdgpu_ring *ring) {if (!ring || !ring->funcs->emit_wreg) -WREG32_NO_KIQ ((adev->rmmio_remap.reg_offset +KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL ) >>2 ,0 ); +WREG32 ((adev->rmmio_remap.reg_offset +KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL ) >>2 ,0 );else amdgpu_ring_emit_wreg (ring, (adev->rmmio_remap.reg_offset +KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL ) >>2 ,0 ); }
drivers/gpu/drm/amd/amdgpu/hdp_v7_0.c +1 -1
@@ -32,7 +32,7 @@ static void hdp_v7_0_flush_hdp(struct amdgpu_device *adev, struct amdgpu_ring *ring) {if (!ring || !ring->funcs->emit_wreg) -WREG32_NO_KIQ ((adev->rmmio_remap.reg_offset +KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL ) >>2 ,0 ); +WREG32 ((adev->rmmio_remap.reg_offset +KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL ) >>2 ,0 );else amdgpu_ring_emit_wreg (ring, (adev->rmmio_remap.reg_offset +KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL ) >>2 ,0 ); }
Signature · 1 line
2.34.1
[AMD Official Use Only - AMD Internal Distribution Only]
Quoted 93 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Victor Zhao
Sent: Monday, August 19, 2024 11:50 AM
To: [email protected]
Cc: Deng, Emily <[email protected]>; Zhao, Victor <[email protected]>
Subject: [PATCH] drm/amd/amdgpu: allow use kiq to do hdp flush under sriovwhen use cpu to do page table update under sriov runtime, since mmio access is blocked, kiq has to be used to flush hdp.
change
WREG32_NO_KIQto WREG32 to allow kiq.Signed-off-by Victor Zhao <[email protected]>---
drivers/gpu/drm/amd/amdgpu/hdp_v4_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/hdp_v5_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/hdp_v6_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/hdp_v7_0.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)drivers/gpu/drm/amd/amdgpu/hdp_v4_0.c +2
-1@@ -41,7 +41,7 @@ static void hdp_v4_0_flush_hdp(struct amdgpu_device *adev, struct amdgpu_ring *ring) {if (!ring || !ring->funcs->emit_wreg) -WREG32_NO_KIQ ((adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >> 2, 0); +WREG32 ((adev->rmmio_remap.reg_offset + +KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL ) >>2 ,0 ); else amdgpu_ring_emit_wreg(ring, (adev-Quoted 1 line
rmmio_remap.reg_offset +
KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >>2, 0); } diff --git
a/drivers/gpu/drm/amd/amdgpu/hdp_v5_0.cb/drivers/gpu/drm/amd/amdgpu/hdp_v5_0.c
indexa9ea23fa0def..ed7facacf2fe100644drivers/gpu/drm/amd/amdgpu/hdp_v5_0.c +2
-1@@ -32,7 +32,7 @@ static void hdp_v5_0_flush_hdp(struct amdgpu_device *adev, struct amdgpu_ring *ring) {if (!ring || !ring->funcs->emit_wreg) -WREG32_NO_KIQ ((adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >> 2, 0); +WREG32 ((adev->rmmio_remap.reg_offset + +KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL ) >>2 ,0 ); else amdgpu_ring_emit_wreg(ring, (adev-Quoted 1 line
rmmio_remap.reg_offset +
KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >>2, 0); } diff --git
a/drivers/gpu/drm/amd/amdgpu/hdp_v6_0.cb/drivers/gpu/drm/amd/amdgpu/hdp_v6_0.c
indexab06c2b4b20b..33736d361dd0100644drivers/gpu/drm/amd/amdgpu/hdp_v6_0.c +2
-1@@ -35,7 +35,7 @@ static void hdp_v6_0_flush_hdp(struct amdgpu_device *adev, struct amdgpu_ring *ring) {if (!ring || !ring->funcs->emit_wreg) -WREG32_NO_KIQ ((adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >> 2, 0); +WREG32 ((adev->rmmio_remap.reg_offset + +KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL ) >>2 ,0 ); else amdgpu_ring_emit_wreg(ring, (adev-Quoted 1 line
rmmio_remap.reg_offset +
KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >>2, 0); } diff --git
a/drivers/gpu/drm/amd/amdgpu/hdp_v7_0.cb/drivers/gpu/drm/amd/amdgpu/hdp_v7_0.c
index8d7d0813e331..1c99bb09e2a1100644drivers/gpu/drm/amd/amdgpu/hdp_v7_0.c +2
-1@@ -32,7 +32,7 @@ static void hdp_v7_0_flush_hdp(struct amdgpu_device *adev, struct amdgpu_ring *ring) {if (!ring || !ring->funcs->emit_wreg) -WREG32_NO_KIQ ((adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >> 2, 0); +WREG32 ((adev->rmmio_remap.reg_offset + +KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL ) >>2 ,0 ); else amdgpu_ring_emit_wreg(ring, (adev-Quoted 1 line
rmmio_remap.reg_offset +
KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >>2, 0); }
--
2.34.1