All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: resolve failed error inject msg
@ 2020-03-10  8:41 Clements, John
  2020-03-10  8:56 ` Zhang, Hawking
  0 siblings, 1 reply; 3+ messages in thread
From: Clements, John @ 2020-03-10  8:41 UTC (permalink / raw)
  To: amd-gfx, Zhang, Hawking, Chen, Guchun, Li, Dennis, Li, Candice


[-- Attachment #1.1: Type: text/plain, Size: 268 bytes --]

[AMD Official Use Only - Internal Distribution Only]

Submitting patch to resolve issue where during a successful error inject invoke the associated at_event interrupt causes a false negative and outputs an error in the kernel message.

Thank you,
John Clements

[-- Attachment #1.2: Type: text/html, Size: 1959 bytes --]

[-- Attachment #2: 0001-drm-amdgpu-resolve-failed-error-inject-msg.patch --]
[-- Type: application/octet-stream, Size: 2467 bytes --]

From 15efa221152ae6ca514e5d51e74b1459c352a8c1 Mon Sep 17 00:00:00 2001
From: John Clements <john.clements@amd.com>
Date: Tue, 10 Mar 2020 16:36:57 +0800
Subject: [PATCH] drm/amdgpu: resolve failed error inject msg

invoking an error injection succesfully will cause an at_event intterupt that
will occur before the invoke sequence can complete causing an invalid error

Change-Id: If6b14b0ec76a6585fa7f084a16e50f9e2400329a
Signed-off-by: John Clements <john.clements@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 6 ++++--
 drivers/gpu/drm/amd/amdgpu/psp_v11_0.c  | 6 ++++++
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
index a16c8101e250..6426dbecba95 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
@@ -150,6 +150,7 @@ psp_cmd_submit_buf(struct psp_context *psp,
 	int ret;
 	int index;
 	int timeout = 2000;
+	bool ras_intr = false;
 
 	mutex_lock(&psp->mutex);
 
@@ -174,7 +175,8 @@ psp_cmd_submit_buf(struct psp_context *psp,
 		 * because gpu reset thread triggered and lock resource should
 		 * be released for psp resume sequence.
 		 */
-		if (amdgpu_ras_intr_triggered())
+		ras_intr = amdgpu_ras_intr_triggered();
+		if (ras_intr)
 			break;
 		msleep(1);
 		amdgpu_asic_invalidate_hdp(psp->adev, NULL);
@@ -187,7 +189,7 @@ psp_cmd_submit_buf(struct psp_context *psp,
 	 * during psp initialization to avoid breaking hw_init and it doesn't
 	 * return -EINVAL.
 	 */
-	if (psp->cmd_buf_mem->resp.status || !timeout) {
+	if ((psp->cmd_buf_mem->resp.status || !timeout) && !ras_intr) {
 		if (ucode)
 			DRM_WARN("failed to load ucode id (%d) ",
 				  ucode->ucode_id);
diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
index 0829188c1a5c..7cc12c6aef77 100644
--- a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
@@ -26,6 +26,7 @@
 
 #include "amdgpu.h"
 #include "amdgpu_psp.h"
+#include "amdgpu_ras.h"
 #include "amdgpu_ucode.h"
 #include "soc15_common.h"
 #include "psp_v11_0.h"
@@ -864,6 +865,11 @@ static int psp_v11_0_ras_trigger_error(struct psp_context *psp,
 	if (ret)
 		return -EINVAL;
 
+	/* If err_event_athub occurs error inject was successful, however
+	   return status from TA is no long reliable */
+	if (amdgpu_ras_intr_triggered())
+		return 0;
+
 	return ras_cmd->ras_status;
 }
 
-- 
2.17.1


[-- Attachment #3: Type: text/plain, Size: 154 bytes --]

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [PATCH] drm/amdgpu: resolve failed error inject msg
  2020-03-10  8:41 [PATCH] drm/amdgpu: resolve failed error inject msg Clements, John
@ 2020-03-10  8:56 ` Zhang, Hawking
  2020-03-10  9:01   ` Chen, Guchun
  0 siblings, 1 reply; 3+ messages in thread
From: Zhang, Hawking @ 2020-03-10  8:56 UTC (permalink / raw)
  To: Clements, John, amd-gfx, Chen, Guchun, Li, Dennis, Li, Candice


[-- Attachment #1.1: Type: text/plain, Size: 723 bytes --]

[AMD Official Use Only - Internal Distribution Only]

Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>

Regards,
Hawking
From: Clements, John <John.Clements@amd.com>
Sent: Tuesday, March 10, 2020 16:42
To: amd-gfx@lists.freedesktop.org; Zhang, Hawking <Hawking.Zhang@amd.com>; Chen, Guchun <Guchun.Chen@amd.com>; Li, Dennis <Dennis.Li@amd.com>; Li, Candice <Candice.Li@amd.com>
Subject: [PATCH] drm/amdgpu: resolve failed error inject msg


[AMD Official Use Only - Internal Distribution Only]

Submitting patch to resolve issue where during a successful error inject invoke the associated at_event interrupt causes a false negative and outputs an error in the kernel message.

Thank you,
John Clements

[-- Attachment #1.2: Type: text/html, Size: 3479 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] drm/amdgpu: resolve failed error inject msg
  2020-03-10  8:56 ` Zhang, Hawking
@ 2020-03-10  9:01   ` Chen, Guchun
  0 siblings, 0 replies; 3+ messages in thread
From: Chen, Guchun @ 2020-03-10  9:01 UTC (permalink / raw)
  To: Zhang, Hawking, Clements, John, amd-gfx, Li, Dennis, Li, Candice


[-- Attachment #1.1: Type: text/plain, Size: 1641 bytes --]

[AMD Public Use]

Spelling typos in commit message. With below typos fixed, the patch is: Reviewed-by: Guchun Chen <guchun.chen@amd.com>

invoking an error injection succesfully will cause an at_event intterupt that
will occur before the invoke sequence can complete causing an invalid error

succesfully --> successfully
intterupt --> interrupt

Regards,
Guchun

From: Zhang, Hawking <Hawking.Zhang@amd.com>
Sent: Tuesday, March 10, 2020 4:56 PM
To: Clements, John <John.Clements@amd.com>; amd-gfx@lists.freedesktop.org; Chen, Guchun <Guchun.Chen@amd.com>; Li, Dennis <Dennis.Li@amd.com>; Li, Candice <Candice.Li@amd.com>
Subject: RE: [PATCH] drm/amdgpu: resolve failed error inject msg


[AMD Official Use Only - Internal Distribution Only]

Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com<mailto:Hawking.Zhang@amd.com>>

Regards,
Hawking
From: Clements, John <John.Clements@amd.com<mailto:John.Clements@amd.com>>
Sent: Tuesday, March 10, 2020 16:42
To: amd-gfx@lists.freedesktop.org<mailto:amd-gfx@lists.freedesktop.org>; Zhang, Hawking <Hawking.Zhang@amd.com<mailto:Hawking.Zhang@amd.com>>; Chen, Guchun <Guchun.Chen@amd.com<mailto:Guchun.Chen@amd.com>>; Li, Dennis <Dennis.Li@amd.com<mailto:Dennis.Li@amd.com>>; Li, Candice <Candice.Li@amd.com<mailto:Candice.Li@amd.com>>
Subject: [PATCH] drm/amdgpu: resolve failed error inject msg


[AMD Official Use Only - Internal Distribution Only]

Submitting patch to resolve issue where during a successful error inject invoke the associated at_event interrupt causes a false negative and outputs an error in the kernel message.

Thank you,
John Clements

[-- Attachment #1.2: Type: text/html, Size: 5990 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-03-10  9:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-10  8:41 [PATCH] drm/amdgpu: resolve failed error inject msg Clements, John
2020-03-10  8:56 ` Zhang, Hawking
2020-03-10  9:01   ` Chen, Guchun

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.