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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Apr 2022 18:59:14 +0000 (20:59 +0200)
commit5ba9d78a72948325ecdb4dca2a31a46bc9169574
tree7413eaec260bb8a45013cdaf72b7286b9a07369b
parent985d87e6a36551b292443c52a4ae9b82296d1f51
drm/amdgpu: fix off by one in amdgpu_gfx_kiq_acquire()

[ 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>
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c