Skip to contentSkip to conversation

drm/amdgpu: fix emit frame counts for compute mem sync

PATCH In review Alex Deucher 2 participants 2 messages May 1, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: fix emit frame counts for compute mem sync

The frame emit counts were not updated.

Fixes 0dd3baafb62c38 ("drm/amdgpu: apply AMDGPU_IB_FLAG_EMIT_MEM_SYNC to compute IBs too")
---
 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 3 ++-
 drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c  | 3 ++-
 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c  | 3 ++-
 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c  | 3 ++-
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c  | 3 ++-
 5 files changed, 10 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +2 -1
index 7ff7e516b72f..ddb485e1e963 100644
@@ -8125,7 +8125,8 @@ static const struct amdgpu_ring_funcs gfx_v10_0_ring_funcs_compute = {
 		SOC15_FLUSH_GPU_TLB_NUM_WREG * 5 +
 		SOC15_FLUSH_GPU_TLB_NUM_REG_WAIT * 7 +
 		2 + /* gfx_v10_0_ring_emit_vm_flush */
-		8 + 8 + 8, /* gfx_v10_0_ring_emit_fence x3 for user fence, vm fence */
+		8 + 8 + 8 + /* gfx_v10_0_ring_emit_fence x3 for user fence, vm fence */
+		8, /* gfx_v10_0_emit_mem_sync */
 	.emit_ib_size =	7, /* gfx_v10_0_ring_emit_ib_compute */
 	.emit_ib = gfx_v10_0_ring_emit_ib_compute,
 	.emit_fence = gfx_v10_0_ring_emit_fence,
drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c +2 -1
index 05e94379c7b3..79c52c7a02e3 100644
@@ -3533,7 +3533,8 @@ static const struct amdgpu_ring_funcs gfx_v6_0_ring_funcs_compute = {
 		5 + 5 + /* hdp flush / invalidate */
 		7 + /* gfx_v6_0_ring_emit_pipeline_sync */
 		SI_FLUSH_GPU_TLB_NUM_WREG * 5 + 7 + /* gfx_v6_0_ring_emit_vm_flush */
-		14 + 14 + 14, /* gfx_v6_0_ring_emit_fence x3 for user fence, vm fence */
+		14 + 14 + 14 + /* gfx_v6_0_ring_emit_fence x3 for user fence, vm fence */
+		5, /* SURFACE_SYNC */
 	.emit_ib_size = 6, /* gfx_v6_0_ring_emit_ib */
 	.emit_ib = gfx_v6_0_ring_emit_ib,
 	.emit_fence = gfx_v6_0_ring_emit_fence,
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +2 -1
index 5d9226b871fa..0cc011f9190d 100644
@@ -5089,7 +5089,8 @@ static const struct amdgpu_ring_funcs gfx_v7_0_ring_funcs_compute = {
 		5 + /* hdp invalidate */
 		7 + /* gfx_v7_0_ring_emit_pipeline_sync */
 		CIK_FLUSH_GPU_TLB_NUM_WREG * 5 + 7 + /* gfx_v7_0_ring_emit_vm_flush */
-		7 + 7 + 7, /* gfx_v7_0_ring_emit_fence_compute x3 for user fence, vm fence */
+		7 + 7 + 7 + /* gfx_v7_0_ring_emit_fence_compute x3 for user fence, vm fence */
+		7, /* gfx_v7_0_emit_mem_sync_compute */
 	.emit_ib_size =	7, /* gfx_v7_0_ring_emit_ib_compute */
 	.emit_ib = gfx_v7_0_ring_emit_ib_compute,
 	.emit_fence = gfx_v7_0_ring_emit_fence_compute,
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +2 -1
index 14790f80a8a9..1d4128227ffd 100644
@@ -6927,7 +6927,8 @@ static const struct amdgpu_ring_funcs gfx_v8_0_ring_funcs_compute = {
 		5 + /* hdp_invalidate */
 		7 + /* gfx_v8_0_ring_emit_pipeline_sync */
 		VI_FLUSH_GPU_TLB_NUM_WREG * 5 + 7 + /* gfx_v8_0_ring_emit_vm_flush */
-		7 + 7 + 7, /* gfx_v8_0_ring_emit_fence_compute x3 for user fence, vm fence */
+		7 + 7 + 7 + /* gfx_v8_0_ring_emit_fence_compute x3 for user fence, vm fence */
+		7, /* gfx_v8_0_emit_mem_sync_compute */
 	.emit_ib_size =	7, /* gfx_v8_0_ring_emit_ib_compute */
 	.emit_ib = gfx_v8_0_ring_emit_ib_compute,
 	.emit_fence = gfx_v8_0_ring_emit_fence_compute,
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +2 -1
index a4e95e03d97c..b98d91936b4c 100644
@@ -6745,7 +6745,8 @@ static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_compute = {
 		SOC15_FLUSH_GPU_TLB_NUM_WREG * 5 +
 		SOC15_FLUSH_GPU_TLB_NUM_REG_WAIT * 7 +
 		2 + /* gfx_v9_0_ring_emit_vm_flush */
-		8 + 8 + 8, /* gfx_v9_0_ring_emit_fence x3 for user fence, vm fence */
+		8 + 8 + 8 + /* gfx_v9_0_ring_emit_fence x3 for user fence, vm fence */
+		7, /* gfx_v9_0_emit_mem_sync */
 	.emit_ib_size =	7, /* gfx_v9_0_ring_emit_ib_compute */
 	.emit_ib = gfx_v9_0_ring_emit_ib_compute,
 	.emit_fence = gfx_v9_0_ring_emit_fence,
Signature · 6 lines
2.25.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by on v1 1/1
#1 lore raw

Am 01.05.20 um 18:37 schrieb Alex Deucher:

Quoted 4 lines

The frame emit counts were not updated.

Fixes 0dd3baafb62c38 ("drm/amdgpu: apply AMDGPU_IB_FLAG_EMIT_MEM_SYNC to compute IBs too")
Quoted 69 lines
---
  drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 3 ++-
  drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c  | 3 ++-
  drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c  | 3 ++-
  drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c  | 3 ++-
  drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c  | 3 ++-
  5 files changed, 10 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +2 -1
index 7ff7e516b72f..ddb485e1e963 100644
@@ -8125,7 +8125,8 @@ static const struct amdgpu_ring_funcs gfx_v10_0_ring_funcs_compute = {
  		SOC15_FLUSH_GPU_TLB_NUM_WREG * 5 +
  		SOC15_FLUSH_GPU_TLB_NUM_REG_WAIT * 7 +
  		2 + /* gfx_v10_0_ring_emit_vm_flush */
-		8 + 8 + 8, /* gfx_v10_0_ring_emit_fence x3 for user fence, vm fence */
+		8 + 8 + 8 + /* gfx_v10_0_ring_emit_fence x3 for user fence, vm fence */
+		8, /* gfx_v10_0_emit_mem_sync */
  	.emit_ib_size =	7, /* gfx_v10_0_ring_emit_ib_compute */
  	.emit_ib = gfx_v10_0_ring_emit_ib_compute,
  	.emit_fence = gfx_v10_0_ring_emit_fence,
drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c +2 -1
index 05e94379c7b3..79c52c7a02e3 100644
@@ -3533,7 +3533,8 @@ static const struct amdgpu_ring_funcs gfx_v6_0_ring_funcs_compute = {
  		5 + 5 + /* hdp flush / invalidate */
  		7 + /* gfx_v6_0_ring_emit_pipeline_sync */
  		SI_FLUSH_GPU_TLB_NUM_WREG * 5 + 7 + /* gfx_v6_0_ring_emit_vm_flush */
-		14 + 14 + 14, /* gfx_v6_0_ring_emit_fence x3 for user fence, vm fence */
+		14 + 14 + 14 + /* gfx_v6_0_ring_emit_fence x3 for user fence, vm fence */
+		5, /* SURFACE_SYNC */
  	.emit_ib_size = 6, /* gfx_v6_0_ring_emit_ib */
  	.emit_ib = gfx_v6_0_ring_emit_ib,
  	.emit_fence = gfx_v6_0_ring_emit_fence,
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +2 -1
index 5d9226b871fa..0cc011f9190d 100644
@@ -5089,7 +5089,8 @@ static const struct amdgpu_ring_funcs gfx_v7_0_ring_funcs_compute = {
  		5 + /* hdp invalidate */
  		7 + /* gfx_v7_0_ring_emit_pipeline_sync */
  		CIK_FLUSH_GPU_TLB_NUM_WREG * 5 + 7 + /* gfx_v7_0_ring_emit_vm_flush */
-		7 + 7 + 7, /* gfx_v7_0_ring_emit_fence_compute x3 for user fence, vm fence */
+		7 + 7 + 7 + /* gfx_v7_0_ring_emit_fence_compute x3 for user fence, vm fence */
+		7, /* gfx_v7_0_emit_mem_sync_compute */
  	.emit_ib_size =	7, /* gfx_v7_0_ring_emit_ib_compute */
  	.emit_ib = gfx_v7_0_ring_emit_ib_compute,
  	.emit_fence = gfx_v7_0_ring_emit_fence_compute,
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +2 -1
index 14790f80a8a9..1d4128227ffd 100644
@@ -6927,7 +6927,8 @@ static const struct amdgpu_ring_funcs gfx_v8_0_ring_funcs_compute = {
  		5 + /* hdp_invalidate */
  		7 + /* gfx_v8_0_ring_emit_pipeline_sync */
  		VI_FLUSH_GPU_TLB_NUM_WREG * 5 + 7 + /* gfx_v8_0_ring_emit_vm_flush */
-		7 + 7 + 7, /* gfx_v8_0_ring_emit_fence_compute x3 for user fence, vm fence */
+		7 + 7 + 7 + /* gfx_v8_0_ring_emit_fence_compute x3 for user fence, vm fence */
+		7, /* gfx_v8_0_emit_mem_sync_compute */
  	.emit_ib_size =	7, /* gfx_v8_0_ring_emit_ib_compute */
  	.emit_ib = gfx_v8_0_ring_emit_ib_compute,
  	.emit_fence = gfx_v8_0_ring_emit_fence_compute,
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0 -0
index a4e95e03d97c..b98d91936b4c 100644

drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_compute = { · line 6752

Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +2 -1
@@ -6745,7 +6745,8 @@ static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_compute = {
  		SOC15_FLUSH_GPU_TLB_NUM_WREG * 5 +
  		SOC15_FLUSH_GPU_TLB_NUM_REG_WAIT * 7 +
  		2 + /* gfx_v9_0_ring_emit_vm_flush */
-		8 + 8 + 8, /* gfx_v9_0_ring_emit_fence x3 for user fence, vm fence */
+		8 + 8 + 8 + /* gfx_v9_0_ring_emit_fence x3 for user fence, vm fence */
+		7, /* gfx_v9_0_emit_mem_sync */
  	.emit_ib_size =	7, /* gfx_v9_0_ring_emit_ib_compute */
  	.emit_ib = gfx_v9_0_ring_emit_ib_compute,
  	.emit_fence = gfx_v9_0_ring_emit_fence,

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx