[PATCH 04/29] drm/amdgpu: add kgd hw debug mode setting interface

Felix Kuehling felix.kuehling at amd.com
Thu Dec 1 00:08:40 UTC 2022


On 2022-10-31 12:23, Jonathan Kim wrote:
> Introduce the require KGD debug calls that will execute hardware debug
> mode setting.
>
> Signed-off-by: Jonathan Kim <jonathan.kim at amd.com>

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


> ---
>   .../gpu/drm/amd/include/kgd_kfd_interface.h   | 34 +++++++++++++++++++
>   1 file changed, 34 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/include/kgd_kfd_interface.h b/drivers/gpu/drm/amd/include/kgd_kfd_interface.h
> index 5cb3e8634739..15e7a5c920a0 100644
> --- a/drivers/gpu/drm/amd/include/kgd_kfd_interface.h
> +++ b/drivers/gpu/drm/amd/include/kgd_kfd_interface.h
> @@ -289,6 +289,40 @@ struct kfd2kgd_calls {
>   			uint32_t vmid, uint64_t page_table_base);
>   	uint32_t (*read_vmid_from_vmfault_reg)(struct amdgpu_device *adev);
>   
> +	uint32_t (*enable_debug_trap)(struct amdgpu_device *adev,
> +					bool restore_dbg_registers,
> +					uint32_t vmid);
> +	uint32_t (*disable_debug_trap)(struct amdgpu_device *adev,
> +					bool keep_trap_enabled,
> +					uint32_t vmid);
> +	int (*validate_trap_override_request)(struct amdgpu_device *adev,
> +					uint32_t trap_override,
> +					uint32_t *trap_mask_supported);
> +	uint32_t (*set_wave_launch_trap_override)(struct amdgpu_device *adev,
> +					     uint32_t vmid,
> +					     uint32_t trap_override,
> +					     uint32_t trap_mask_bits,
> +					     uint32_t trap_mask_request,
> +					     uint32_t *trap_mask_prev,
> +					     uint32_t kfd_dbg_trap_cntl_prev);
> +	uint32_t (*set_wave_launch_mode)(struct amdgpu_device *adev,
> +					uint8_t wave_launch_mode,
> +					uint32_t vmid);
> +	uint32_t (*set_address_watch)(struct amdgpu_device *adev,
> +					uint64_t watch_address,
> +					uint32_t watch_address_mask,
> +					uint32_t watch_id,
> +					uint32_t watch_mode,
> +					uint32_t debug_vmid);
> +	uint32_t (*clear_address_watch)(struct amdgpu_device *adev,
> +			uint32_t watch_id);
> +	void (*get_iq_wait_times)(struct amdgpu_device *adev,
> +			uint32_t *wait_times);
> +	void (*build_grace_period_packet_info)(struct amdgpu_device *adev,
> +			uint32_t wait_times,
> +			uint32_t grace_period,
> +			uint32_t *reg_offset,
> +			uint32_t *reg_data);
>   	void (*get_cu_occupancy)(struct amdgpu_device *adev, int pasid,
>   			int *wave_cnt, int *max_waves_per_cu);
>   	void (*program_trap_handler_settings)(struct amdgpu_device *adev,


More information about the amd-gfx mailing list