Commit f0be1386 authored by Eric Huang's avatar Eric Huang Committed by Alex Deucher
Browse files

drm/amdkfd: change error to warning message for SDMA queues creation



SDMA doesn't support oversubsciption, it is the user matter to create
queues over HW limit, but not supposed to be a KFD error.

Signed-off-by: default avatarEric Huang <jinhuieric.huang@amd.com>
Reviewed-by: default avatarHarish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent d01ca870
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -1576,8 +1576,9 @@ static int allocate_sdma_queue(struct device_queue_manager *dqm,
	int bit;

	if (q->properties.type == KFD_QUEUE_TYPE_SDMA) {
		if (bitmap_empty(dqm->sdma_bitmap, KFD_MAX_SDMA_QUEUES)) {
			dev_err(dev, "No more SDMA queue to allocate\n");
		if (bitmap_empty(dqm->sdma_bitmap, get_num_sdma_queues(dqm))) {
			dev_warn(dev, "No more SDMA queue to allocate (%d total queues)\n",
				 get_num_sdma_queues(dqm));
			return -ENOMEM;
		}

@@ -1602,8 +1603,9 @@ static int allocate_sdma_queue(struct device_queue_manager *dqm,
		q->properties.sdma_queue_id = q->sdma_id /
				kfd_get_num_sdma_engines(dqm->dev);
	} else if (q->properties.type == KFD_QUEUE_TYPE_SDMA_XGMI) {
		if (bitmap_empty(dqm->xgmi_sdma_bitmap, KFD_MAX_SDMA_QUEUES)) {
			dev_err(dev, "No more XGMI SDMA queue to allocate\n");
		if (bitmap_empty(dqm->xgmi_sdma_bitmap, get_num_xgmi_sdma_queues(dqm))) {
			dev_warn(dev, "No more XGMI SDMA queue to allocate (%d total queues)\n",
				 get_num_xgmi_sdma_queues(dqm));
			return -ENOMEM;
		}
		if (restore_sdma_id) {
@@ -1662,8 +1664,8 @@ static int allocate_sdma_queue(struct device_queue_manager *dqm,
		}

		if (!free_bit_found) {
			dev_err(dev, "No more SDMA queue to allocate for target ID %i\n",
				q->properties.sdma_engine_id);
			dev_warn(dev, "No more SDMA queue to allocate for target ID %i (%d total queues)\n",
				 q->properties.sdma_engine_id, num_queues);
			return -ENOMEM;
		}
	}
+9 −2
Original line number Diff line number Diff line
@@ -451,6 +451,13 @@ int pqm_create_queue(struct process_queue_manager *pqm,
	}

	if (retval != 0) {
		if ((type == KFD_QUEUE_TYPE_SDMA ||
		    type == KFD_QUEUE_TYPE_SDMA_XGMI ||
		    type == KFD_QUEUE_TYPE_SDMA_BY_ENG_ID) &&
		    retval == -ENOMEM)
			pr_warn("process pid %d DQM create queue type %d failed. ret %d\n",
				pqm->process->lead_thread->pid, type, retval);
		else
			pr_err("process pid %d DQM create queue type %d failed. ret %d\n",
				pqm->process->lead_thread->pid, type, retval);
		goto err_create_queue;