[PATCH] drm/amdkfd: Add missing gfx11 MQD manager callbacks

Deucher, Alexander Alexander.Deucher at amd.com
Mon Aug 28 13:53:09 UTC 2023


[AMD Official Use Only - General]

Acked-by: Alex Deucher <alexander.deucher at amd.com>
________________________________
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> on behalf of Harish Kasiviswanathan <Harish.Kasiviswanathan at amd.com>
Sent: Friday, August 25, 2023 5:30 PM
To: amd-gfx at lists.freedesktop.org <amd-gfx at lists.freedesktop.org>
Cc: Cornwall, Jay <Jay.Cornwall at amd.com>; Kasiviswanathan, Harish <Harish.Kasiviswanathan at amd.com>
Subject: [PATCH] drm/amdkfd: Add missing gfx11 MQD manager callbacks

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>
---
 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
--
2.34.1

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20230828/01082ef1/attachment-0001.htm>


More information about the amd-gfx mailing list