Skip to contentSkip to conversation

drm: Log recovery method with wedged event

PATCH Superseded Raag Jadav 3 participants 3 messages Oct 19

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Raag Jadav

author
#0 lore raw

PATCH 1/1 drm: Log recovery method with wedged event

Currently, drm_dev_wedged_event() logs a basic message of device being wedged, but doesn't print the recovery method used by the caller. Log it for easier bug report analysis.

While at it, as the device wedging is a catastrophic event, raise its log level to drm_warn().

---
 drivers/gpu/drm/drm_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_drv.c +2 -2
index cb53baa70995..1a1213f4235c 100644
@@ -598,8 +598,8 @@ int drm_dev_wedged_event(struct drm_device *dev, unsigned long method,
 		/* Caller is unsure about recovery, do the best we can at this point. */
 		snprintf(event_string, sizeof(event_string), "%s", "WEDGED=unknown");
 
-	drm_info(dev, "device wedged, %s\n", method == DRM_WEDGE_RECOVERY_NONE ?
-		 "but no recovery needed" : "needs recovery");
+	drm_warn(dev, "device wedged with method %#lx, %s\n", method,
+		 method == DRM_WEDGE_RECOVERY_NONE ? "no recovery needed" : "needs recovery");
 
 	if (info && (info->comm[0] != '\0') && (info->pid >= 0)) {
 		snprintf(pid_string, sizeof(pid_string), "PID=%u", info->pid);
Signature · 1 line
2.43.0
#1 lore raw
Quoted 3 lines · Raag Jadav

Currently, drm_dev_wedged_event() logs a basic message of device being wedged, but doesn't print the recovery method used by the caller. Log it for easier bug report analysis.

That sounds like a good idea to me.

Quoted 2 lines

While at it, as the device wedging is a catastrophic event, raise its log level to drm_warn().

Device wedging is rarely something catastrophic but rather normal part of execution handling.

So I would rather object to that.

Regards,
Christian.

Quoted 21 lines
---
 drivers/gpu/drm/drm_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_drv.c +2 -2
index cb53baa70995..1a1213f4235c 100644
@@ -598,8 +598,8 @@ int drm_dev_wedged_event(struct drm_device *dev, unsigned long method,
 		/* Caller is unsure about recovery, do the best we can at this point. */
 		snprintf(event_string, sizeof(event_string), "%s", "WEDGED=unknown");
 
-	drm_info(dev, "device wedged, %s\n", method == DRM_WEDGE_RECOVERY_NONE ?
-		 "but no recovery needed" : "needs recovery");
+	drm_warn(dev, "device wedged with method %#lx, %s\n", method,
+		 method == DRM_WEDGE_RECOVERY_NONE ? "no recovery needed" : "needs recovery");
 
 	if (info && (info->comm[0] != '\0') && (info->pid >= 0)) {
 		snprintf(pid_string, sizeof(pid_string), "PID=%u", info->pid);
#2 lore raw
Quoted 6 lines · Christian König
Quoted 3 lines · Raag Jadav

Currently, drm_dev_wedged_event() logs a basic message of device being wedged, but doesn't print the recovery method used by the caller. Log it for easier bug report analysis.

That sounds like a good idea to me.

+1

Quoted 7 lines
Quoted 3 lines

While at it, as the device wedging is a catastrophic event, raise its log level to drm_warn().

Device wedging is rarely something catastrophic but rather normal part of execution handling.

So I would rather object to that.

right, unless it has some option to differentiate the temporary wedge by the cathastrofic one I'd also prefer to keep the info.

Quoted 26 lines

Regards,
Christian.

Quoted 21 lines
---
 drivers/gpu/drm/drm_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_drv.c +2 -2
index cb53baa70995..1a1213f4235c 100644
@@ -598,8 +598,8 @@ int drm_dev_wedged_event(struct drm_device *dev, unsigned long method,
 		/* Caller is unsure about recovery, do the best we can at this point. */
 		snprintf(event_string, sizeof(event_string), "%s", "WEDGED=unknown");
 
-	drm_info(dev, "device wedged, %s\n", method == DRM_WEDGE_RECOVERY_NONE ?
-		 "but no recovery needed" : "needs recovery");
+	drm_warn(dev, "device wedged with method %#lx, %s\n", method,
+		 method == DRM_WEDGE_RECOVERY_NONE ? "no recovery needed" : "needs recovery");
 
 	if (info && (info->comm[0] != '\0') && (info->pid >= 0)) {
 		snprintf(pid_string, sizeof(pid_string), "PID=%u", info->pid);