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)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 25 Mar 2022 16:40:24 +0000 (12:40 -0400)
commit1647b54ed55d4d48c7199d439f8834626576cbe9
tree2910f8d82837fc571fd6b40f16ea0e9ab1a87812
parent60d61f4ed6ead43ad2de31ebb8d1d27c57290529
drm/amdgpu: fix off by one in amdgpu_gfx_kiq_acquire()

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