]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
drm/amdgpu: fix off by one in amdgpu_gfx_kiq_acquire()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 16 Mar 2022 08:41:48 +0000 (11:41 +0300)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 20 May 2022 12:40:59 +0000 (14:40 +0200)
commitcb346d611d7a8c1a4202fd766baa476414348d4b
treef02d75a240631668a669059b35adc717d97d0ba2
parent77a11c8ceaf4cfc5c63a600d11f1dba199011914
drm/amdgpu: fix off by one in amdgpu_gfx_kiq_acquire()

BugLink: https://bugs.launchpad.net/bugs/1969107
[ Upstream commit 1647b54ed55d4d48c7199d439f8834626576cbe9 ]

This post-op should be a pre-op so that we do not pass -1 as the bit
number to test_bit().  The current code will loop downwards from 63 to
-1.  After changing to a pre-op, it loops from 63 to 0.

Fixes: 71c37505e7ea ("drm/amdgpu/gfx: move more common KIQ code to amdgpu_gfx.c")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 5ba9d78a72948325ecdb4dca2a31a46bc9169574)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c