[PATCH v2 3/3] drm/bridge: log message on atomic_check() and mode_fixup() failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This helps user-space understand why an atomic commit fails.

v2: new patch

Signed-off-by: Simon Ser <contact@xxxxxxxxxxx>
---
 drivers/gpu/drm/drm_bridge.c | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c
index 1545c50fd1c8..c41c728b0c28 100644
--- a/drivers/gpu/drm/drm_bridge.c
+++ b/drivers/gpu/drm/drm_bridge.c
@@ -830,12 +830,26 @@ static int drm_atomic_bridge_check(struct drm_bridge *bridge,
 
 		ret = bridge->funcs->atomic_check(bridge, bridge_state,
 						  crtc_state, conn_state);
-		if (ret)
+		if (ret) {
+			drm_dbg_atomic(bridge->dev,
+				       "bridge driver check failed for [CRTC:%d:%s] and [CONNECTOR:%d:%s]\n",
+				       crtc_state->crtc->base.id,
+				       crtc_state->crtc->name,
+				       conn_state->connector->base.id,
+				       conn_state->connector->name);
 			return ret;
+		}
 	} else if (bridge->funcs->mode_fixup) {
 		if (!bridge->funcs->mode_fixup(bridge, &crtc_state->mode,
-					       &crtc_state->adjusted_mode))
+					       &crtc_state->adjusted_mode)) {
+			drm_dbg_atomic(bridge->dev,
+				       "bridge mode fixup failed for [CRTC:%d:%s] and [CONNECTOR:%d:%s]\n",
+				       crtc_state->crtc->base.id,
+				       crtc_state->crtc->name,
+				       conn_state->connector->base.id,
+				       conn_state->connector->name);
 			return -EINVAL;
+		}
 	}
 
 	return 0;
-- 
2.37.2






[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux