]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amdgpu: fix initialization of doorbell array for detect and hang
authorJonathan Kim <jonathan.kim@amd.com>
Thu, 9 Oct 2025 14:48:09 +0000 (10:48 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 13 Oct 2025 18:14:28 +0000 (14:14 -0400)
Initialized doorbells should be set to invalid rather than 0 to prevent
driver from over counting hung doorbells since it checks against the
invalid value to begin with.

Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c

index 5bf9be073cddf35b80b1824ebf47529457ca1b8c..30e1fb5106002582be6b756f056ff7ba594cc370 100644 (file)
@@ -409,7 +409,7 @@ int amdgpu_mes_detect_and_reset_hung_queues(struct amdgpu_device *adev,
                return -EINVAL;
 
        /* Clear the doorbell array before detection */
-       memset(adev->mes.hung_queue_db_array_cpu_addr, 0,
+       memset(adev->mes.hung_queue_db_array_cpu_addr, AMDGPU_MES_INVALID_DB_OFFSET,
                adev->mes.hung_queue_db_array_size * sizeof(u32));
        input.queue_type = queue_type;
        input.detect_only = detect_only;