Commit dafc87dc authored by Philip Yang's avatar Philip Yang Committed by Alex Deucher
Browse files

drm/amdkfd: Copy wave state only for compute queue



get_wave_state is not defined for sdma queue, copy_context_work_handler
calls it for sdma queue will crash.

Signed-off-by: default avatarPhilip Yang <Philip.Yang@amd.com>
Reviewed-by: default avatarJonathan Kim <jonathan.kim@amd.com>
Tested-by: default avatarJonathan Kim <jonathan.kim@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 623f1dd6
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -3200,6 +3200,9 @@ static void copy_context_work_handler (struct work_struct *work)
		struct qcm_process_device *qpd = &pdd->qpd;

		list_for_each_entry(q, &qpd->queues_list, list) {
			if (q->properties.type != KFD_QUEUE_TYPE_COMPUTE)
				continue;

			mqd_mgr = dqm->mqd_mgrs[KFD_MQD_TYPE_CP];

			/* We ignore the return value from get_wave_state