From e59c3602f702275fe6ee9eb7519209ff9c46b6b6 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 6 Dec 2022 18:32:07 +0100 Subject: [PATCH] backend/drm: print stringified connector status in realloc_crtcs() The raw enum value wasn't informative enough. It's not trivial to tell whether 0 means connected or disconnected. Drop the status from the state after realloc, since the exact same information is printed right above. --- backend/drm/drm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/drm/drm.c b/backend/drm/drm.c index 9b728bbb3..b37ac73cd 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -1059,9 +1059,9 @@ static void realloc_crtcs(struct wlr_drm_backend *drm, // connector the user wants to enable bool want_crtc = conn == want_conn || conn->output.enabled; - wlr_log(WLR_DEBUG, " '%s' crtc=%d status=%d want_crtc=%d", + wlr_log(WLR_DEBUG, " '%s': crtc=%d status=%s want_crtc=%d", conn->name, conn->crtc ? (int)(conn->crtc - drm->crtcs) : -1, - conn->status, want_crtc); + drm_connector_status_str(conn->status), want_crtc); if (conn->status == DRM_MODE_CONNECTED && want_crtc) { connector_constraints[i] = conn->possible_crtcs; @@ -1108,8 +1108,8 @@ static void realloc_crtcs(struct wlr_drm_backend *drm, struct wlr_drm_connector *conn = connectors[i]; bool prev_enabled = conn->crtc; - wlr_log(WLR_DEBUG, " '%s' crtc=%zd status=%d", - conn->name, connector_match[i], conn->status); + wlr_log(WLR_DEBUG, " '%s': crtc=%zd", + conn->name, connector_match[i]); // We don't need to change anything. if (prev_enabled && connector_match[i] == conn->crtc - drm->crtcs) {