Skip to content

Commit fe93b09

Browse files
Prike Liangalexdeucher
authored andcommitted
drm/amdgpu: Fix the ring buffer size for queue VM flush
Here are the corrections needed for the queue ring buffer size calculation for the following cases: - Remove the KIQ VM flush ring usage. - Add the invalidate TLBs packet for gfx10 and gfx11 queue. - There's no VM flush and PFP sync, so remove the gfx9 real ring and compute ring buffer usage. Signed-off-by: Prike Liang <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 1e214f7 commit fe93b09

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9186,7 +9186,7 @@ static const struct amdgpu_ring_funcs gfx_v10_0_ring_funcs_gfx = {
91869186
7 + /* PIPELINE_SYNC */
91879187
SOC15_FLUSH_GPU_TLB_NUM_WREG * 5 +
91889188
SOC15_FLUSH_GPU_TLB_NUM_REG_WAIT * 7 +
9189-
2 + /* VM_FLUSH */
9189+
4 + /* VM_FLUSH */
91909190
8 + /* FENCE for VM_FLUSH */
91919191
20 + /* GDS switch */
91929192
4 + /* double SWITCH_BUFFER,
@@ -9276,7 +9276,6 @@ static const struct amdgpu_ring_funcs gfx_v10_0_ring_funcs_kiq = {
92769276
7 + /* gfx_v10_0_ring_emit_pipeline_sync */
92779277
SOC15_FLUSH_GPU_TLB_NUM_WREG * 5 +
92789278
SOC15_FLUSH_GPU_TLB_NUM_REG_WAIT * 7 +
9279-
2 + /* gfx_v10_0_ring_emit_vm_flush */
92809279
8 + 8 + 8, /* gfx_v10_0_ring_emit_fence_kiq x3 for user fence, vm fence */
92819280
.emit_ib_size = 7, /* gfx_v10_0_ring_emit_ib_compute */
92829281
.emit_ib = gfx_v10_0_ring_emit_ib_compute,

drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6192,7 +6192,7 @@ static const struct amdgpu_ring_funcs gfx_v11_0_ring_funcs_gfx = {
61926192
7 + /* PIPELINE_SYNC */
61936193
SOC15_FLUSH_GPU_TLB_NUM_WREG * 5 +
61946194
SOC15_FLUSH_GPU_TLB_NUM_REG_WAIT * 7 +
6195-
2 + /* VM_FLUSH */
6195+
4 + /* VM_FLUSH */
61966196
8 + /* FENCE for VM_FLUSH */
61976197
20 + /* GDS switch */
61986198
5 + /* COND_EXEC */
@@ -6278,7 +6278,6 @@ static const struct amdgpu_ring_funcs gfx_v11_0_ring_funcs_kiq = {
62786278
7 + /* gfx_v11_0_ring_emit_pipeline_sync */
62796279
SOC15_FLUSH_GPU_TLB_NUM_WREG * 5 +
62806280
SOC15_FLUSH_GPU_TLB_NUM_REG_WAIT * 7 +
6281-
2 + /* gfx_v11_0_ring_emit_vm_flush */
62826281
8 + 8 + 8, /* gfx_v11_0_ring_emit_fence_kiq x3 for user fence, vm fence */
62836282
.emit_ib_size = 7, /* gfx_v11_0_ring_emit_ib_compute */
62846283
.emit_ib = gfx_v11_0_ring_emit_ib_compute,

drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6981,7 +6981,6 @@ static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_compute = {
69816981
7 + /* gfx_v9_0_ring_emit_pipeline_sync */
69826982
SOC15_FLUSH_GPU_TLB_NUM_WREG * 5 +
69836983
SOC15_FLUSH_GPU_TLB_NUM_REG_WAIT * 7 +
6984-
2 + /* gfx_v9_0_ring_emit_vm_flush */
69856984
8 + 8 + 8 + /* gfx_v9_0_ring_emit_fence x3 for user fence, vm fence */
69866985
7 + /* gfx_v9_0_emit_mem_sync */
69876986
5 + /* gfx_v9_0_emit_wave_limit for updating mmSPI_WCL_PIPE_PERCENT_GFX register */
@@ -7019,7 +7018,6 @@ static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_kiq = {
70197018
7 + /* gfx_v9_0_ring_emit_pipeline_sync */
70207019
SOC15_FLUSH_GPU_TLB_NUM_WREG * 5 +
70217020
SOC15_FLUSH_GPU_TLB_NUM_REG_WAIT * 7 +
7022-
2 + /* gfx_v9_0_ring_emit_vm_flush */
70237021
8 + 8 + 8, /* gfx_v9_0_ring_emit_fence_kiq x3 for user fence, vm fence */
70247022
.emit_ib_size = 7, /* gfx_v9_0_ring_emit_ib_compute */
70257023
.emit_fence = gfx_v9_0_ring_emit_fence_kiq,

0 commit comments

Comments
 (0)