drm/amdkfd: decrement queue count on mes queue destroy
authorJonathan Kim <jonathan.kim@amd.com>
Tue, 13 Jun 2023 19:57:39 +0000 (15:57 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 15 Jun 2023 15:06:58 +0000 (11:06 -0400)
Queue count should decrement on queue destruction regardless of HWS
support type.

Signed-off-by: Jonathan Kim <jonathan.kim@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 8a39a9e..f515cb8 100644 (file)
@@ -2089,8 +2089,8 @@ static int destroy_queue_cpsch(struct device_queue_manager *dqm,
        list_del(&q->list);
        qpd->queue_count--;
        if (q->properties.is_active) {
+               decrement_queue_count(dqm, qpd, q);
                if (!dqm->dev->kfd->shared_resources.enable_mes) {
-                       decrement_queue_count(dqm, qpd, q);
                        retval = execute_queues_cpsch(dqm,
                                                      KFD_UNMAP_QUEUES_FILTER_DYNAMIC_QUEUES, 0,
                                                      USE_DEFAULT_GRACE_PERIOD);