From 019ffe8a5ba7f97181c56ad2b9a772c717391feb Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Wed, 9 Dec 2020 15:11:06 +0100 Subject: backend/drm: introduce wlr_drm_connector.name The DRM backend is a little special when it comes to wlr_outputs: the wlr_drm_connectors are long-lived and are created even when no screen is connected. A wlr_drm_connector only advertises a wlr_output to the compositor when a screen is connected. As such, most of wlr_output's state is invalid when the connector is disconnected. We want to stop using wlr_output state on disconnected connectors. Introduce wlr_drm_connector.name which is always valid regardless of the connector status to avoid reading wlr_output.name when disconnected. --- include/backend/drm/drm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/backend') diff --git a/include/backend/drm/drm.h b/include/backend/drm/drm.h index 9ee62ead..cd534202 100644 --- a/include/backend/drm/drm.h +++ b/include/backend/drm/drm.h @@ -157,8 +157,8 @@ size_t drm_crtc_get_gamma_lut_size(struct wlr_drm_backend *drm, struct wlr_drm_fb *plane_get_next_fb(struct wlr_drm_plane *plane); #define wlr_drm_conn_log(conn, verb, fmt, ...) \ - wlr_log(verb, "connector %s: " fmt, conn->output.name, ##__VA_ARGS__) + wlr_log(verb, "connector %s: " fmt, conn->name, ##__VA_ARGS__) #define wlr_drm_conn_log_errno(conn, verb, fmt, ...) \ - wlr_log_errno(verb, "connector %s: " fmt, conn->output.name, ##__VA_ARGS__) + wlr_log_errno(verb, "connector %s: " fmt, conn->name, ##__VA_ARGS__) #endif -- cgit v1.2.3