Skip to contentSkip to conversation

drm/amdgpu: reduce redundant uvd context lost warning message

PATCH Superseded Le Ma 2 participants 3 messages Nov 27, 2019 2 messages not in the archive

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Le Ma

author
#0 lore raw

PATCH v2 10/10 drm/amdgpu: reduce redundant uvd context lost warning message

Move the print out of uvd instance loop in amdgpu_uvd_suspend

v2: drop unnecessary brackets

Change-Id Ifad997debd84763e1b55d668e144b729598f115e
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c +6 -4
index e324bfe..69248ecb 100644
@@ -376,13 +376,15 @@ int amdgpu_uvd_suspend(struct amdgpu_device *adev)
 			return -ENOMEM;
 
 		/* re-write 0 since err_event_athub will corrupt VCPU buffer */
-		if (amdgpu_ras_intr_triggered()) {
-			DRM_WARN("UVD VCPU state may lost due to RAS ERREVENT_ATHUB_INTERRUPT\n");
+		if (amdgpu_ras_intr_triggered())
 			memset(adev->uvd.inst[j].saved_bo, 0, size);
-		} else {
+		else
 			memcpy_fromio(adev->uvd.inst[j].saved_bo, ptr, size);
-		}
 	}
+
+	if (amdgpu_ras_intr_triggered())
+		DRM_WARN("UVD VCPU state may lost due to RAS ERREVENT_ATHUB_INTERRUPT\n");
+
 	return 0;
 }
 
Signature · 6 lines
2.7.4

_______________________________________________
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): 1574848953-11109-1-git-send-email-le.ma-5C7GfCeVMHo@public.gmane.org

#2 lore raw

Am 27.11.19 um 11:02 schrieb Le Ma:

Quoted 15 lines

Move the print out of uvd instance loop in amdgpu_uvd_suspend

v2: drop unnecessary brackets

Change-Id Ifad997debd84763e1b55d668e144b729598f115e
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 10 ++++++----
  1 file changed, 6 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c +0 -0
index e324bfe..69248ecb 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c int amdgpu_uvd_suspend(struct amdgpu_device *adev) · line 379

Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c +1 -2
@@ -376,13 +376,15 @@ int amdgpu_uvd_suspend(struct amdgpu_device *adev)
  			return -ENOMEM;
 
  		/* re-write 0 since err_event_athub will corrupt VCPU buffer */
-		if (amdgpu_ras_intr_triggered()) {
-			DRM_WARN("UVD VCPU state may lost due to RAS ERREVENT_ATHUB_INTERRUPT\n");
+		if (amdgpu_ras_intr_triggered())

Can the state change while doing the loop? If yes than I would rather grab that once and use it multiple times.

Christian.

drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c int amdgpu_uvd_suspend(struct amdgpu_device *adev) · line 390

Quoted 13 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c +5 -2
  			memset(adev->uvd.inst[j].saved_bo, 0, size);
-		} else {
+		else
  			memcpy_fromio(adev->uvd.inst[j].saved_bo, ptr, size);
-		}
  	}
+
+	if (amdgpu_ras_intr_triggered())
+		DRM_WARN("UVD VCPU state may lost due to RAS ERREVENT_ATHUB_INTERRUPT\n");
+
  	return 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): 87e3c897-b226-1bf8-e169-197a149cbc32-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

author
#4 lore raw

-----Original Message-----
From: Christian König <[email protected]>
Sent: Wednesday, November 27, 2019 6:08 PM
To: Ma, Le <[email protected]>; [email protected]
Cc: Chen, Guchun <[email protected]>; Zhou1, Tao <[email protected]>; Deucher, Alexander <[email protected]>; Li, Dennis <[email protected]>; Zhang, Hawking <[email protected]>
Subject: Re: [PATCH 10/10 v2] drm/amdgpu: reduce redundant uvd context lost warning message

Am 27.11.19 um 11:02 schrieb Le Ma:

Quoted 33 lines

Move the print out of uvd instance loop in amdgpu_uvd_suspend

v2: drop unnecessary brackets

Change-Id: Ifad997debd84763e1b55d668e144b729598f115e

---

  drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 10 ++++++----
  1 file changed, 6 insertions(+), 4 deletions(-)
(quoted diff) +0 -0

b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c

index e324bfe..69248ecb 100644

--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c

+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c

(quoted diff) +0 -0
@@ -376,13 +376,15 @@ int amdgpu_uvd_suspend(struct amdgpu_device *adev)
 
                                 return -ENOMEM;

Review int amdgpu_uvd_suspend(struct amdgpu_device *adev) · line 385

Quoted 10 lines
(quoted diff) +1 -2
 
 
 
                     /* re-write 0 since err_event_athub will corrupt VCPU buffer */
 
-                   if (amdgpu_ras_intr_triggered()) {
 
-                               DRM_WARN("UVD VCPU state may lost due to RAS ERREVENT_ATHUB_INTERRUPT\n");
 
+                  if (amdgpu_ras_intr_triggered())

Can the state change while doing the loop? If yes than I would rather grab that once and use it multiple times.

Christian.

[Le]: Got your meaning, and the state will not change here. Will update this in v3.

Quoted 17 lines
(quoted diff) +3 -2
                                 memset(adev->uvd.inst[j].saved_bo, 0, size);
 
-                   } else {
 
+                  else
 
                                 memcpy_fromio(adev->uvd.inst[j].saved_bo, ptr, size);
 
-                   }
 
         }
 
+
 
+      if (amdgpu_ras_intr_triggered())

Review int amdgpu_uvd_suspend(struct amdgpu_device *adev)

Quoted 10 lines
(quoted diff) +3 -0
 
+                  DRM_WARN("UVD VCPU state may lost due to RAS
 
+ERREVENT_ATHUB_INTERRUPT\n");
 
+
 
         return 0;
 
  }

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