drm/amdkfd: Fix allocated_queues bitmap initialization
Use shared_resources.queue_bitmap to determine the queues available for KFD in each pipe. 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>
This commit is contained in:
parent
c76cf86966
commit
86194cf8cf
|
@ -513,7 +513,7 @@ static int init_scheduler(struct device_queue_manager *dqm)
|
|||
|
||||
static int initialize_nocpsch(struct device_queue_manager *dqm)
|
||||
{
|
||||
int i;
|
||||
int pipe, queue;
|
||||
|
||||
BUG_ON(!dqm);
|
||||
|
||||
|
@ -531,8 +531,14 @@ static int initialize_nocpsch(struct device_queue_manager *dqm)
|
|||
return -ENOMEM;
|
||||
}
|
||||
|
||||
for (i = 0; i < get_pipes_per_mec(dqm); i++)
|
||||
dqm->allocated_queues[i] = (1 << get_queues_per_pipe(dqm)) - 1;
|
||||
for (pipe = 0; pipe < get_pipes_per_mec(dqm); pipe++) {
|
||||
int pipe_offset = pipe * get_queues_per_pipe(dqm);
|
||||
|
||||
for (queue = 0; queue < get_queues_per_pipe(dqm); queue++)
|
||||
if (test_bit(pipe_offset + queue,
|
||||
dqm->dev->shared_resources.queue_bitmap))
|
||||
dqm->allocated_queues[pipe] |= 1 << queue;
|
||||
}
|
||||
|
||||
dqm->vmid_bitmap = (1 << VMID_PER_DEVICE) - 1;
|
||||
dqm->sdma_bitmap = (1 << CIK_SDMA_QUEUES) - 1;
|
||||
|
|
Loading…
Reference in a new issue