mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-28 21:46:02 -04:00
drm/amdkfd: Introduce XGMI SDMA queue type
Existing QUEUE_TYPE_SDMA means PCIe optimized SDMA queues. Introduce a new QUEUE_TYPE_SDMA_XGMI, which is optimized for non-PCIe transfer such as XGMI. Signed-off-by: Oak Zeng <Oak.Zeng@amd.com> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -186,8 +186,13 @@ int pqm_create_queue(struct process_queue_manager *pqm,
|
||||
|
||||
switch (type) {
|
||||
case KFD_QUEUE_TYPE_SDMA:
|
||||
if (dev->dqm->queue_count >= get_num_sdma_queues(dev->dqm)) {
|
||||
pr_err("Over-subscription is not allowed for SDMA.\n");
|
||||
case KFD_QUEUE_TYPE_SDMA_XGMI:
|
||||
if ((type == KFD_QUEUE_TYPE_SDMA && dev->dqm->sdma_queue_count
|
||||
>= get_num_sdma_queues(dev->dqm)) ||
|
||||
(type == KFD_QUEUE_TYPE_SDMA_XGMI &&
|
||||
dev->dqm->xgmi_sdma_queue_count
|
||||
>= get_num_xgmi_sdma_queues(dev->dqm))) {
|
||||
pr_debug("Over-subscription is not allowed for SDMA.\n");
|
||||
retval = -EPERM;
|
||||
goto err_create_queue;
|
||||
}
|
||||
@@ -446,6 +451,7 @@ int pqm_debugfs_mqds(struct seq_file *m, void *data)
|
||||
q = pqn->q;
|
||||
switch (q->properties.type) {
|
||||
case KFD_QUEUE_TYPE_SDMA:
|
||||
case KFD_QUEUE_TYPE_SDMA_XGMI:
|
||||
seq_printf(m, " SDMA queue on device %x\n",
|
||||
q->device->id);
|
||||
mqd_type = KFD_MQD_TYPE_SDMA;
|
||||
|
||||
Reference in New Issue
Block a user