提交 86194cf8 编写于 作者: F Felix Kuehling 提交者: Oded Gabbay

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: NFelix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: NOded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
上级 c76cf869
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册