[Xorg-driver-geode] The update of the "Xorg-geode-screensaver bug"

Cui, Hunk Hunk.Cui at amd.com
Wed May 12 04:55:50 PDT 2010


Hi, all,
	Through compare the parts of "xf86ChangeGammaRamp" between VESA driver and Geode driver, in judge the "xf86_crtc_supports_gamma(pScrn)", the Geode driver is ture when the 'fading' option is set, but the VESA driver always are false between 'fading' and 'not fading', it can only call the CMapColor. At the same time, the red, green and blue value are 0 from ProcXF86VidModeSetGammaRamp transfer the color parameter. So using code zero to represent black if no Gamma action. It is an integrated palette RAM for gamma-correction of the data stream. So I use the following methods to fix the bug, How do you think? But the xf86-video-intel driver use the "drmModeCrtcSetGamma" (in libdrm -> xf86drmMode.c) to deal with the events.

In lx_display.c -> lx_crtc_gamma_set function:
the change is:

     assert(size == 256);
 
+          for (i = 0; i < size; i++) { //changed by Hunk
-   for (i = 0; i < 256; i++) {
            unsigned int val = (*red << 8) | *green | (*blue >> 8);
 
            df_set_video_palette_entry(i, val);

In cim_df.c -> df_set_video_palette_entry function:
the change is:
+++ cim/cim_df.c          2010-05-11 18:06:47.051406358 +0800
--- cim_df_old.c 2010-02-04 05:09:54.000000000 +0800

     /* SET A SINGLE ENTRY */
 
+          if (palette != 0) //added by Hunk
+          {
+          WRITE_VID32(DF_PALETTE_ADDRESS, index); //Screensaver bug keypoint by Hunk //defined in LX_databook P428 Video Processor Register Description /belong to Table 6-71 
+          WRITE_VID32(DF_PALETTE_DATA, palette); //Screensaver bug keypoint by Hunk //defined in LX_databook P428 Video Processor Register Description /belong to Table 6-71
+          }
-    WRITE_VID32(DF_PALETTE_ADDRESS, index);
-    WRITE_VID32(DF_PALETTE_DATA, palette);
-
     /* ENABLE THE VIDEO PALETTE */
     /* Ensure that the video palette has an effect by routing video data */
     /* through the palette RAM and clearing the 'Bypass Both' bit.       */


Thanks,
Hunk Cui
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-driver-geode/attachments/20100512/753d0b19/attachment.htm>


More information about the Xorg-driver-geode mailing list