Skip to contentSkip to conversation

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

PATCH In review Tom St Denis 2 participants 2 messages Feb 13, 2017 – Feb 14, 2017 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

Break out of outer loop properly.

---
 drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c +6 -3
index 97af4827f652..b34cefc7ebd5 100644
@@ -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) {
@@ -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 */
@@ -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));
Signature · 6 lines
2.11.0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): [email protected]

Reviewed-by
#2 lore raw

Am 13.02.2017 um 20:13 schrieb Tom St Denis:

Quoted 4 lines

Break out of outer loop properly.

Quoted 29 lines
---
  drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 9 ++++++---
  1 file changed, 6 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c +4 -2
index 97af4827f652..b34cefc7ebd5 100644
@@ -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) {
@@ -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 */

drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c static void uvd_v4_2_stop(struct amdgpu_device *adev) · line 433

Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c +2 -1
@@ -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));

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx