[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#164446: xfree86: One patch to try...



Package: xfree86
Version: unavailable; reported 2002-12-08
Followup-For: Bug #164446

This seems to be the infamous SetGamma() bug as discussed in http://www.spinics.net/lists/xf-xpert/msg01897.html.

--jochen

diff -u -r1.24 trident_video.c
--- xc/programs/Xserver/hw/xfree86/drivers/trident/trident_video.c      2002/04/01 12:06:20     1.24
+++ xc/programs/Xserver/hw/xfree86/drivers/trident/trident_video.c      2002/04/03 22:47:27
@@ -63,7 +63,9 @@
 static int TRIDENTQueryImageAttributes(ScrnInfoPtr, 
        int, unsigned short *, unsigned short *,  int *, int *);
 static void TRIDENTVideoTimerCallback(ScrnInfoPtr pScrn, Time time);
+#if 0
 static void tridentSetVideoGamma(TRIDENTPtr pTrident,int value,int brightness);
+#endif
 static void tridentSetVideoContrast(TRIDENTPtr pTrident,int value);
 static void tridentSetVideoParameters(TRIDENTPtr pTrident, int brightness, 
                                      int saturation, int hue);
@@ -305,7 +307,9 @@
            break;
        }    
     }    
+#if 0
     tridentSetVideoGamma(pTrident,pPriv->Gamma,pPriv->Brightness);
+#endif
     tridentSetVideoContrast(pTrident,pPriv->Contrast);
     tridentSetVideoParameters(pTrident,pPriv->Brightness,pPriv->Saturation,
                             pPriv->HUE);
@@ -355,7 +359,9 @@
     pPriv->Brightness = 45;
     pPriv->Saturation = 80;
     pPriv->Contrast = 4;
+#if 0
     pPriv->Gamma = 0;
+#endif
     pPriv->HUE = 0;
     pPriv->videoStatus = 0;
     pPriv->fixFrame = 100;
@@ -371,7 +377,9 @@
        xvBrightness = MAKE_ATOM("XV_BRIGHTNESS");
        xvSaturation = MAKE_ATOM("XV_SATURATION");
        xvHUE        = MAKE_ATOM("XV_HUE");
+#if 0
        xvGamma      = MAKE_ATOM("XV_GAMMA");
+#endif
        xvContrast   = MAKE_ATOM("XV_CONTRAST");
     }
 
@@ -595,12 +603,14 @@
     pPriv->HUE = value;
     tridentSetVideoParameters(pTrident, pPriv->Brightness, pPriv->Saturation,
                              pPriv->HUE);
+#if 0
     tridentSetVideoGamma(pTrident,pPriv->Gamma,pPriv->Brightness);
   } else if (attribute == xvGamma) {
     if ((value < -128) || (value > 127))
       return BadValue;
     pPriv->Gamma = value;
     tridentSetVideoGamma(pTrident,value,pPriv->Brightness);
+#endif
   } else if (attribute == xvContrast) {
     if ((value < 0) || (value > 127))
       return BadValue;
@@ -629,8 +639,10 @@
        *value = pPriv->Saturation;
   } else if (attribute == xvHUE) {
        *value = pPriv->HUE;
+#if 0
   } else if (attribute == xvGamma) {
        *value = pPriv->Gamma;
+#endif
   } else if (attribute == xvContrast) {
        *value = pPriv->Contrast;
   } else


-- System Information:
Debian Release: testing/unstable
Architecture: hppa
Kernel: Linux mail2.scram.de 2.4.19-pa24 #3 Sun Nov 3 12:45:14 CET 2002 parisc
Locale: LANG=C, LC_CTYPE=C





Reply to: