Skip to content

Commit 7760d7f

Browse files
michchen-amdalexdeucher
authored andcommitted
drm/amdgpu/mes: fix issue of writing to the same log buffer from 2 MES pipes
With Unified MES enabled in gfx12, need separate event log buffer for the 2 MES pipes to avoid data overwrite. Signed-off-by: Michael Chen <[email protected]> Reviewed-by: Jack Xiao <[email protected]> Signed-off-by: Alex Deucher <[email protected]> (cherry picked from commit 144df26) Cc: [email protected] # 6.11.x
1 parent c0ec082 commit 7760d7f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ static int mes_v12_0_set_hw_resources(struct amdgpu_mes *mes, int pipe)
621621

622622
if (amdgpu_mes_log_enable) {
623623
mes_set_hw_res_pkt.enable_mes_event_int_logging = 1;
624-
mes_set_hw_res_pkt.event_intr_history_gpu_mc_ptr = mes->event_log_gpu_addr;
624+
mes_set_hw_res_pkt.event_intr_history_gpu_mc_ptr = mes->event_log_gpu_addr + pipe * AMDGPU_MES_LOG_BUFFER_SIZE;
625625
}
626626

627627
return mes_v12_0_submit_pkt_and_poll_completion(mes, pipe,
@@ -1336,7 +1336,7 @@ static int mes_v12_0_sw_init(void *handle)
13361336
adev->mes.kiq_hw_fini = &mes_v12_0_kiq_hw_fini;
13371337
adev->mes.enable_legacy_queue_map = true;
13381338

1339-
adev->mes.event_log_size = AMDGPU_MES_LOG_BUFFER_SIZE;
1339+
adev->mes.event_log_size = adev->enable_uni_mes ? (AMDGPU_MAX_MES_PIPES * AMDGPU_MES_LOG_BUFFER_SIZE) : AMDGPU_MES_LOG_BUFFER_SIZE;
13401340

13411341
r = amdgpu_mes_init(adev);
13421342
if (r)

0 commit comments

Comments
 (0)