[PATCH] drm/amdkfd: Add missing gfx11 MQD manager callbacks
Felix Kuehling
felix.kuehling at amd.com
Mon Aug 28 17:59:48 UTC 2023
On 2023-08-25 17:30, Harish Kasiviswanathan wrote:
> From: Jay Cornwall <jay.cornwall at amd.com>
>
> mqd_stride function was introduced in commit 129c7b6a0217
> ("drm/amdkfd: Update MQD management on multi XCC setup")
> but not assigned for gfx11. Fixes a NULL dereference in debugfs.
>
> Signed-off-by: Jay Cornwall <jay.cornwall at amd.com>
> Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan at amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling at amd.com>
> ---
> drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v11.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v11.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v11.c
> index 2319467d2d95..0bbf0edbabd4 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v11.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v11.c
> @@ -457,6 +457,7 @@ struct mqd_manager *mqd_manager_init_v11(enum KFD_MQD_TYPE type,
> mqd->is_occupied = kfd_is_occupied_cp;
> mqd->mqd_size = sizeof(struct v11_compute_mqd);
> mqd->get_wave_state = get_wave_state;
> + mqd->mqd_stride = kfd_mqd_stride;
> #if defined(CONFIG_DEBUG_FS)
> mqd->debugfs_show_mqd = debugfs_show_mqd;
> #endif
> @@ -472,6 +473,7 @@ struct mqd_manager *mqd_manager_init_v11(enum KFD_MQD_TYPE type,
> mqd->destroy_mqd = destroy_hiq_mqd;
> mqd->is_occupied = kfd_is_occupied_cp;
> mqd->mqd_size = sizeof(struct v11_compute_mqd);
> + mqd->mqd_stride = kfd_mqd_stride;
> #if defined(CONFIG_DEBUG_FS)
> mqd->debugfs_show_mqd = debugfs_show_mqd;
> #endif
> @@ -501,6 +503,7 @@ struct mqd_manager *mqd_manager_init_v11(enum KFD_MQD_TYPE type,
> mqd->destroy_mqd = kfd_destroy_mqd_sdma;
> mqd->is_occupied = kfd_is_occupied_sdma;
> mqd->mqd_size = sizeof(struct v11_sdma_mqd);
> + mqd->mqd_stride = kfd_mqd_stride;
> #if defined(CONFIG_DEBUG_FS)
> mqd->debugfs_show_mqd = debugfs_show_mqd_sdma;
> #endif
More information about the amd-gfx
mailing list