drm/atomic-helper: improve CRTC enabled/connectors mismatch logging message
authorLuca Ceresoli <luca.ceresoli@bootlin.com>
Tue, 4 Feb 2025 08:51:59 +0000 (09:51 +0100)
committerLouis Chauvet <louis.chauvet@bootlin.com>
Tue, 4 Feb 2025 13:11:15 +0000 (14:11 +0100)
This message reports a mismatch between new_crtc_state->enable and
has_connectors, which should be either both true or both false. However it
does not mention which one is true and which is false, which can be useful
for debugging. Add the value of both avriables to the log message.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Acked-by: Louis Chauvet <louis.chauvet@bootlin.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250204-drm-small-improvements-v4-2-d6bbc92f12f1@bootlin.com
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
drivers/gpu/drm/drm_atomic_helper.c

index 3034ba0..26bf246 100644 (file)
@@ -690,8 +690,9 @@ drm_atomic_helper_check_modeset(struct drm_device *dev,
                }
 
                if (new_crtc_state->enable != has_connectors) {
-                       drm_dbg_atomic(dev, "[CRTC:%d:%s] enabled/connectors mismatch\n",
-                                      crtc->base.id, crtc->name);
+                       drm_dbg_atomic(dev, "[CRTC:%d:%s] enabled/connectors mismatch (%d/%d)\n",
+                                      crtc->base.id, crtc->name,
+                                      new_crtc_state->enable, has_connectors);
 
                        return -EINVAL;
                }