drm/amdkfd: Only initialize sdma vm for sdma queues
authorOak Zeng <Oak.Zeng@amd.com>
Fri, 31 May 2019 20:07:42 +0000 (15:07 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 11 Jun 2019 17:56:35 +0000 (12:56 -0500)
Don't do the same for compute queues

Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c

index c18355d4cb956208b6b250e308383b07e99c232d..00ca3ddb62d7b5efab5c5a3f118f951ea3349539 100644 (file)
@@ -1209,8 +1209,9 @@ static int create_queue_cpsch(struct device_queue_manager *dqm, struct queue *q,
         * updates the is_evicted flag but is a no-op otherwise.
         */
        q->properties.is_evicted = !!qpd->evicted;
-
-       dqm->asic_ops.init_sdma_vm(dqm, q, qpd);
+       if (q->properties.type == KFD_QUEUE_TYPE_SDMA ||
+               q->properties.type == KFD_QUEUE_TYPE_SDMA_XGMI)
+               dqm->asic_ops.init_sdma_vm(dqm, q, qpd);
        q->properties.tba_addr = qpd->tba_addr;
        q->properties.tma_addr = qpd->tma_addr;
        retval = mqd_mgr->init_mqd(mqd_mgr, &q->mqd, &q->mqd_mem_obj,