diff options
author | Felix Kuehling <Felix.Kuehling@amd.com> | 2017-11-27 18:29:46 -0500 |
---|---|---|
committer | Oded Gabbay <oded.gabbay@gmail.com> | 2017-11-27 18:29:46 -0500 |
commit | 36582fa5165bca6cfab33bbe1d95f1598ab5fb7d (patch) | |
tree | 711f0dfbbdd6c1657af46a30e82565e30b0e305f /drivers/gpu | |
parent | a99c6d4fdc0470c3137d834d578441d057a5ebd0 (diff) |
drm/amdkfd: Fix oversubscription accounting
Don't count SDMA queues towards compute HQD oversubscription when
deciding whether to create a chained runlist.
Signed-off-by: Jay Cornwall <Jay.Cornwall@amd.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Acked-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c index 0b7092e59bf9..c3230b96241e 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c @@ -55,13 +55,14 @@ static void pm_calc_rlib_size(struct packet_manager *pm, unsigned int *rlib_size, bool *over_subscription) { - unsigned int process_count, queue_count; + unsigned int process_count, queue_count, compute_queue_count; unsigned int map_queue_size; unsigned int max_proc_per_quantum = 1; struct kfd_dev *dev = pm->dqm->dev; process_count = pm->dqm->processes_count; queue_count = pm->dqm->queue_count; + compute_queue_count = queue_count - pm->dqm->sdma_queue_count; /* check if there is over subscription * Note: the arbitration between the number of VMIDs and @@ -74,7 +75,7 @@ static void pm_calc_rlib_size(struct packet_manager *pm, max_proc_per_quantum = dev->max_proc_per_quantum; if ((process_count > max_proc_per_quantum) || - queue_count > get_queues_num(pm->dqm)) { + compute_queue_count > get_queues_num(pm->dqm)) { *over_subscription = true; pr_debug("Over subscribed runlist\n"); } |