drm/amdgpu: enable unmapped doorbell handling basic mode on mes 12
Subsystems (2)
PATCH 1/1 drm/amdgpu: enable unmapped doorbell handling basic mode on mes 12
This reverts commit 9606c08e178f953d22e50b05c64b4b1a48051f3e.
Signed-off-by shaoyunl <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/mes_v12_0.c | 14 ++++++++++++++ drivers/gpu/drm/amd/include/mes_v12_api_def.h | 3 ++- 2 files changed, 16 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/mes_v12_0.c +14 -0
@@ -525,7 +525,14 @@ static int mes_v12_0_set_hw_resources(struct amdgpu_mes *mes) mes_set_hw_res_pkt.disable_mes_log =1 ; mes_set_hw_res_pkt.use_different_vmid_compute =1 ; mes_set_hw_res_pkt.enable_reg_active_poll =1 ; + +/* +* Keep oversubscribe timer for sdma . When we have unmapped doorbell +* handling support, other queue will not use the oversubscribe timer. +* handling mode - 0: disabled; 1: basic version; 2: basic+ version +*/ mes_set_hw_res_pkt.oversubscription_timer =50 ; + mes_set_hw_res_pkt.unmapped_doorbell_handling =1 ; mes_set_hw_res_pkt.enable_mes_event_int_logging =0 ; mes_set_hw_res_pkt.event_intr_history_gpu_mc_ptr = mes->event_log_gpu_addr;
@@ -972,6 +979,13 @@ static int mes_v12_0_mqd_init(struct amdgpu_ring *ring) mqd->cp_hqd_iq_timer = regCP_HQD_IQ_TIMER_DEFAULT; mqd->cp_hqd_quantum = regCP_HQD_QUANTUM_DEFAULT; +/* +* Set CP_HQD_GFX_CONTROL.DB_UPDATED_MSG_EN[15] to enable unmapped +* doorbell handling. This is a reserved CP internal register can +* not be accesss by others +*/ + mqd->reserved_184 =BIT (15 ); +return 0 ; }
drivers/gpu/drm/amd/include/mes_v12_api_def.h +2 -1
@@ -239,7 +239,8 @@ union MESAPI_SET_HW_RESOURCES { uint32_t send_write_data : 1; uint32_t os_tdr_timeout_override : 1; uint32_t use_rs64mem_for_proc_gang_ctx : 1; - uint32_t reserved : 17; + uint32_t unmapped_doorbell_handling: 2; + uint32_t reserved : 15; };uint32_t uint32_all; };
Signature · 1 line
2.34.1
Quoted 4 lines · shaoyunl
This reverts commit
9606c08e178f953d22e50b05c64b4b1a48051f3e.Signed-off-by shaoyunl <[email protected]>
Acked-by Alex Deucher <[email protected]>
Quoted 55 lines
--- drivers/gpu/drm/amd/amdgpu/mes_v12_0.c | 14 ++++++++++++++ drivers/gpu/drm/amd/include/mes_v12_api_def.h | 3 ++- 2 files changed, 16 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/mes_v12_0.c +14
-0@@ -525,7 +525,14 @@ static int mes_v12_0_set_hw_resources(struct amdgpu_mes *mes) mes_set_hw_res_pkt.disable_mes_log =1 ; mes_set_hw_res_pkt.use_different_vmid_compute =1 ; mes_set_hw_res_pkt.enable_reg_active_poll =1 ; + +/* +* Keep oversubscribe timer for sdma . When we have unmapped doorbell +* handling support, other queue will not use the oversubscribe timer. +* handling mode - 0: disabled; 1: basic version; 2: basic+ version +*/ mes_set_hw_res_pkt.oversubscription_timer =50 ; + mes_set_hw_res_pkt.unmapped_doorbell_handling =1 ; mes_set_hw_res_pkt.enable_mes_event_int_logging =0 ; mes_set_hw_res_pkt.event_intr_history_gpu_mc_ptr = mes->event_log_gpu_addr;@@ -972,6 +979,13 @@ static int mes_v12_0_mqd_init(struct amdgpu_ring *ring) mqd->cp_hqd_iq_timer = regCP_HQD_IQ_TIMER_DEFAULT; mqd->cp_hqd_quantum = regCP_HQD_QUANTUM_DEFAULT; +/* +* Set CP_HQD_GFX_CONTROL.DB_UPDATED_MSG_EN[15] to enable unmapped +* doorbell handling. This is a reserved CP internal register can +* not be accesss by others +*/ + mqd->reserved_184 =BIT (15 ); +return 0 ; }drivers/gpu/drm/amd/include/mes_v12_api_def.h +2
-2@@ -239,7 +239,8 @@ union MESAPI_SET_HW_RESOURCES { uint32_t send_write_data : 1; uint32_t os_tdr_timeout_override : 1; uint32_t use_rs64mem_for_proc_gang_ctx : 1; - uint32_t reserved : 17; + uint32_t unmapped_doorbell_handling: 2; + uint32_t reserved : 15; };uint32_t uint32_all; }; --2.34.1