[PATCH 4/4] compositor-drm: Check for OUTPUT_CONFIG_OFF instead of using strcmp()

Ander Conselvan de Oliveira conselvan2 at gmail.com
Thu Aug 9 06:45:01 PDT 2012


A call to strcmp() is already made in output_section_done() and
output->config is set appropriately if mode is "off". There is
no need to duplicate that in create_output_for_connector().
---
 src/compositor-drm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/compositor-drm.c b/src/compositor-drm.c
index 2ec6705..d8b675c 100644
--- a/src/compositor-drm.c
+++ b/src/compositor-drm.c
@@ -1404,7 +1404,7 @@ create_output_for_connector(struct drm_compositor *ec,
 		}
 	}
 
-	if (o && strcmp("off", o->mode) == 0) {
+	if (o && o->config == OUTPUT_CONFIG_OFF) {
 		weston_log("Disabling output %s\n", o->name);
 
 		drmModeSetCrtc(ec->drm.fd, output->crtc_id,
-- 
1.7.9.5



More information about the wayland-devel mailing list