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