xf86-video-intel: src/drmmode_display.c

Jesse Barnes jbarnes at kemper.freedesktop.org
Wed Mar 18 20:20:47 PDT 2009


 src/drmmode_display.c |   13 +++++++++++++
 1 file changed, 13 insertions(+)

New commits:
commit bedc894a565ce3c7a50990e3f78953fc2432ad40
Author: Jesse Barnes <jbarnes at nietzche.localdomain>
Date:   Wed Mar 18 20:19:44 2009 -0700

    Re-enable disabled outputs after rotation
    
    The server may have made a DPMS call before doing rotation, so after we
    do the mode set with the rotated framebuffer, we need to re-enable the
    corresponding output(s).
    
    Fixes bug #20573.

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 141c027..e485256 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -60,6 +60,9 @@ typedef struct {
 } drmmode_output_private_rec, *drmmode_output_private_ptr;
 
 static void
+drmmode_output_dpms(xf86OutputPtr output, int mode);
+
+static void
 drmmode_ConvertFromKMode(ScrnInfoPtr scrn,
 			 drmModeModeInfoPtr kmode,
 			 DisplayModePtr	mode)
@@ -210,6 +213,16 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
 	else
 		ret = TRUE;
 
+	/* Turn on any outputs on this crtc that may have been disabled */
+	for (i = 0; i < xf86_config->num_output; i++) {
+		xf86OutputPtr output = xf86_config->output[i];
+
+		if (output->crtc != crtc)
+			continue;
+
+		drmmode_output_dpms(output, DPMSModeOn);
+	}
+
 done:
 	if (!ret) {
 		crtc->x = saved_x;


More information about the xorg-commit mailing list