Commit e89d5b5c authored by Tom St Denis's avatar Tom St Denis Committed by Alex Deucher

drm/amd/amdgpu: Fix flow control in uvd_v4_2_stop()

Break out of outer loop properly.
Signed-off-by: default avatarTom St Denis <tom.stdenis@amd.com>
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent fce293ca
...@@ -401,7 +401,8 @@ static void uvd_v4_2_stop(struct amdgpu_device *adev) ...@@ -401,7 +401,8 @@ static void uvd_v4_2_stop(struct amdgpu_device *adev)
break; break;
mdelay(1); mdelay(1);
} }
break; if (status & 2)
break;
} }
for (i = 0; i < 10; ++i) { for (i = 0; i < 10; ++i) {
...@@ -411,7 +412,8 @@ static void uvd_v4_2_stop(struct amdgpu_device *adev) ...@@ -411,7 +412,8 @@ static void uvd_v4_2_stop(struct amdgpu_device *adev)
break; break;
mdelay(1); mdelay(1);
} }
break; if (status & 0xf)
break;
} }
/* Stall UMC and register bus before resetting VCPU */ /* Stall UMC and register bus before resetting VCPU */
...@@ -424,7 +426,8 @@ static void uvd_v4_2_stop(struct amdgpu_device *adev) ...@@ -424,7 +426,8 @@ static void uvd_v4_2_stop(struct amdgpu_device *adev)
break; break;
mdelay(1); mdelay(1);
} }
break; if (status & 0x240)
break;
} }
WREG32_P(0x3D49, 0, ~(1 << 2)); WREG32_P(0x3D49, 0, ~(1 << 2));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment