Module Name:    xsrc
Committed By:   christos
Date:           Sun Jan  9 20:25:46 UTC 2011

Modified Files:
        xsrc/external/mit/xf86-video-intel/dist/src: i830_display.c

Log Message:
Revert previous hack and fix this properly. We need dpms to be turned on
to be able to load the colormap, since dpms off turns off the channel.
Guard against the lut being loaded with dpms off, and move the call to
load the lut after the dmps on one.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
    xsrc/external/mit/xf86-video-intel/dist/src/i830_display.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xf86-video-intel/dist/src/i830_display.c
diff -u xsrc/external/mit/xf86-video-intel/dist/src/i830_display.c:1.2 xsrc/external/mit/xf86-video-intel/dist/src/i830_display.c:1.3
--- xsrc/external/mit/xf86-video-intel/dist/src/i830_display.c:1.2	Sun Jan  9 00:36:58 2011
+++ xsrc/external/mit/xf86-video-intel/dist/src/i830_display.c	Sun Jan  9 15:25:46 2011
@@ -1170,11 +1170,11 @@
 	OUTREG(dspbase_reg, INREG(dspbase_reg));
     }
 
-    i830_crtc_load_lut(crtc);
-
     /* Give the overlay scaler a chance to enable if it's on this pipe */
     i830_crtc_dpms_video(crtc, TRUE);
 
+    i830_crtc_load_lut(crtc);
+
     /* Reenable compression if needed */
     if (i830_use_fb_compression(crtc))
 	i830_enable_fb_compression(crtc);
@@ -1936,16 +1936,15 @@
     int i;
 
     /* The clocks have to be on to load the palette. */
-    if (!crtc->enabled)
+    if (!crtc->enabled || intel_crtc->dpms_mode != DPMSModeOn)
 	return;
-#if 0
+
     for (i = 0; i < 256; i++) {
 	OUTREG(palreg + 4 * i,
 	       (intel_crtc->lut_r[i] << 16) |
 	       (intel_crtc->lut_g[i] << 8) |
 	       intel_crtc->lut_b[i]);
     }
-#endif
 }
 
 /** Sets the color ramps on behalf of RandR */

Reply via email to