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: Eric Huang <jinhuieric.huang@amd.com> Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -451,8 +451,15 @@ int pqm_create_queue(struct process_queue_manager *pqm,
|
||||
}
|
||||
|
||||
if (retval != 0) {
|
||||
pr_err("process pid %d DQM create queue type %d failed. ret %d\n",
|
||||
pqm->process->lead_thread->pid, type, retval);
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user