]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
drm/amdkfd: Differentiate b/t sdma_id and sdma_queue_id
authorOak Zeng <ozeng@amd.com>
Mon, 3 Dec 2018 15:20:20 +0000 (09:20 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 24 May 2019 17:21:01 +0000 (12:21 -0500)
sdma_queue_id is sdma queue index inside one sdma engine.
sdma_id is sdma queue index among all sdma engines. Use
those two names properly.

Signed-off-by: Oak Zeng <ozeng@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-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 775f20eb4f68be196b1d68df0d156daf378e9618..426d3a46f501480b2f26d65cb81ca6db7c31c0fe 100644 (file)
@@ -922,7 +922,7 @@ static int stop_nocpsch(struct device_queue_manager *dqm)
 }
 
 static int allocate_sdma_queue(struct device_queue_manager *dqm,
-                               unsigned int *sdma_queue_id)
+                               unsigned int *sdma_id)
 {
        int bit;
 
@@ -931,17 +931,17 @@ static int allocate_sdma_queue(struct device_queue_manager *dqm,
 
        bit = __ffs64(dqm->sdma_bitmap);
        dqm->sdma_bitmap &= ~(1ULL << bit);
-       *sdma_queue_id = bit;
+       *sdma_id = bit;
 
        return 0;
 }
 
 static void deallocate_sdma_queue(struct device_queue_manager *dqm,
-                               unsigned int sdma_queue_id)
+                               unsigned int sdma_id)
 {
-       if (sdma_queue_id >= get_num_sdma_queues(dqm))
+       if (sdma_id >= get_num_sdma_queues(dqm))
                return;
-       dqm->sdma_bitmap |= (1ULL << sdma_queue_id);
+       dqm->sdma_bitmap |= (1ULL << sdma_id);
 }
 
 static int create_sdma_queue_nocpsch(struct device_queue_manager *dqm,