Commit 2ff52819 authored by Oak Zeng's avatar Oak Zeng Committed by Alex Deucher
Browse files

drm/amdkfd: Only load sdma mqd when queue is active



Also calls load_mqd with current->mm struct. The mm
struct is used to read back user wptr of the queue.

Signed-off-by: default avatarOak Zeng <Oak.Zeng@amd.com>
Reviewed-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent eec0b4cf
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -995,8 +995,11 @@ static int create_sdma_queue_nocpsch(struct device_queue_manager *dqm,
	if (retval)
		goto out_deallocate_doorbell;

	if (!q->properties.is_active)
		return 0;

	retval = mqd_mgr->load_mqd(mqd_mgr, q->mqd, 0, 0, &q->properties,
				NULL);
				current->mm);
	if (retval)
		goto out_uninit_mqd;