Skip to content

Commit

Permalink
drm/amdgpu: Fix wait for RLCG command completion
Browse files Browse the repository at this point in the history
if (!(tmp & flag)) condition will always evaluate to true
when the flag is 0x0. Instead check that address bits
are cleared to determine whether the command is complete.

Signed-off-by: Victor Skvortsov <victor.skvortsov@amd.com>
(cherry picked from commit 4d3a7668c52401807316c754e575452a8d6573a5)

Change-Id: I979ff7334db5c917de7b34feff98699f65ec625a
  • Loading branch information
Victor Skvortsov authored and Gavin Wan committed Feb 10, 2022
1 parent 560d1bf commit ba91492
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,8 @@ static u32 gfx_v9_0_rlcg_rw(struct amdgpu_device *adev, u32 offset, u32 v, uint3

for (i = 0; i < retries; i++) {
tmp = readl(scratch_reg1);
if (!(tmp & flag))
//Check the address bits
if (!(tmp & 0xFFFFF))
break;

udelay(10);
Expand Down

0 comments on commit ba91492

Please sign in to comment.