summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
diff options
context:
space:
mode:
authorYong Zhao <yong.zhao@amd.com>2017-09-20 18:10:18 -0400
committerOded Gabbay <oded.gabbay@gmail.com>2017-09-20 18:10:18 -0400
commit44008d7a871ce5a487cbcc4c412a5149145ea442 (patch)
tree4197bffc33f143450b72dc79aca59bd232700f23 /drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
parentb90e3fbecc9030efb8a6aed1d54a79d0c3d0820a (diff)
downloadblackbird-obmc-linux-44008d7a871ce5a487cbcc4c412a5149145ea442.tar.gz
blackbird-obmc-linux-44008d7a871ce5a487cbcc4c412a5149145ea442.zip
drm/amdkfd: Use VMID bitmap from KGD v2
The hard-coded values related to VMID were removed in KFD, as those values can be calculated in the KFD initialization function. v2: remove unnecessary local variable Signed-off-by: Yong Zhao <yong.zhao@amd.com> Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com> Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c')
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
index 03bec765b03d..68fe0d99f6c2 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
@@ -187,7 +187,7 @@ int pqm_create_queue(struct process_queue_manager *pqm,
case KFD_QUEUE_TYPE_COMPUTE:
/* check if there is over subscription */
if ((sched_policy == KFD_SCHED_POLICY_HWS_NO_OVERSUBSCRIPTION) &&
- ((dev->dqm->processes_count >= VMID_PER_DEVICE) ||
+ ((dev->dqm->processes_count >= dev->vm_info.vmid_num_kfd) ||
(dev->dqm->queue_count >= get_queues_num(dev->dqm)))) {
pr_err("Over-subscription is not allowed in radeon_kfd.sched_policy == 1\n");
retval = -EPERM;
OpenPOWER on IntegriCloud