From ffd4d83505814a1a3d971b50a787d85d6c4c8ec7 Mon Sep 17 00:00:00 2001 From: jsg Date: Thu, 14 Apr 2022 08:44:29 +0000 Subject: [PATCH] drm/amdgpu: fix off by one in amdgpu_gfx_kiq_acquire() From Dan Carpenter 5ba9d78a72948325ecdb4dca2a31a46bc9169574 in linux 5.15.y/5.15.34 1647b54ed55d4d48c7199d439f8834626576cbe9 in mainline linux --- sys/dev/pci/drm/amd/amdgpu/amdgpu_gfx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_gfx.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_gfx.c index 7b79c15d6bd..c2fa225d9c5 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_gfx.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_gfx.c @@ -268,7 +268,7 @@ static int amdgpu_gfx_kiq_acquire(struct amdgpu_device *adev, * adev->gfx.mec.num_pipe_per_mec * adev->gfx.mec.num_queue_per_pipe; - while (queue_bit-- >= 0) { + while (--queue_bit >= 0) { if (test_bit(queue_bit, adev->gfx.mec.queue_bitmap)) continue; -- 2.20.1