Skip to content

Commit

Permalink
drm/amd/amdgpu: Fix flow control in uvd_v4_2_stop()
Browse files Browse the repository at this point in the history
Break out of outer loop properly.

Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Tom St Denis authored and Alex Deucher committed Feb 16, 2017
1 parent fce293c commit e89d5b5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,8 @@ static void uvd_v4_2_stop(struct amdgpu_device *adev)
break;
mdelay(1);
}
break;
if (status & 2)
break;
}

for (i = 0; i < 10; ++i) {
Expand All @@ -411,7 +412,8 @@ static void uvd_v4_2_stop(struct amdgpu_device *adev)
break;
mdelay(1);
}
break;
if (status & 0xf)
break;
}

/* Stall UMC and register bus before resetting VCPU */
Expand All @@ -424,7 +426,8 @@ static void uvd_v4_2_stop(struct amdgpu_device *adev)
break;
mdelay(1);
}
break;
if (status & 0x240)
break;
}

WREG32_P(0x3D49, 0, ~(1 << 2));
Expand Down

0 comments on commit e89d5b5

Please sign in to comment.