[PATCH] drm/amdgpu: Enable event log on MES 11

Felix Kuehling felix.kuehling at amd.com
Thu Nov 23 21:35:39 UTC 2023


On 2023-11-23 14:55, shaoyunl wrote:
> Enable event log through the HW specific FW API
>
> Signed-off-by: shaoyunl <shaoyun.liu at amd.com>

I'm assuming that enabling the log unconditionally has no noticeable 
performance impact. In that case, the patch is

Reviewed-by: Felix Kuehling <Felix.Kuehling at amd.com>


> ---
>   drivers/gpu/drm/amd/amdgpu/mes_v11_0.c        | 2 ++
>   drivers/gpu/drm/amd/include/mes_v11_api_def.h | 1 +
>   2 files changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c b/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c
> index 4dfec56e1b7f..26d71a22395d 100644
> --- a/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c
> @@ -408,6 +408,8 @@ static int mes_v11_0_set_hw_resources(struct amdgpu_mes *mes)
>   	mes_set_hw_res_pkt.enable_reg_active_poll = 1;
>   	mes_set_hw_res_pkt.enable_level_process_quantum_check = 1;
>   	mes_set_hw_res_pkt.oversubscription_timer = 50;
> +	mes_set_hw_res_pkt.enable_mes_event_int_logging = 1;
> +	mes_set_hw_res_pkt.event_intr_history_gpu_mc_ptr = mes->event_log_gpu_addr;
>   
>   	return mes_v11_0_submit_pkt_and_poll_completion(mes,
>   			&mes_set_hw_res_pkt, sizeof(mes_set_hw_res_pkt),
> diff --git a/drivers/gpu/drm/amd/include/mes_v11_api_def.h b/drivers/gpu/drm/amd/include/mes_v11_api_def.h
> index b1db2b190187..1fbfd1aa987e 100644
> --- a/drivers/gpu/drm/amd/include/mes_v11_api_def.h
> +++ b/drivers/gpu/drm/amd/include/mes_v11_api_def.h
> @@ -232,6 +232,7 @@ union MESAPI_SET_HW_RESOURCES {
>   		};
>   		uint32_t	oversubscription_timer;
>   		uint64_t        doorbell_info;
> +		uint64_t        event_intr_history_gpu_mc_ptr;
>   	};
>   
>   	uint32_t	max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS];


More information about the amd-gfx mailing list