This reverts commit 6c8d3e39b72abe897b08d9e90cae85e121863d2c, as it
breaks gamma setting with servers older than 1.7.

Signed-off-by: Francisco Jerez <[email protected]>
---
It looks like it was intended to workaround the problem in NVLoadPalette
PATCH1 fixes. 

 src/drmmode_display.c |    7 +++++--
 src/nv_driver.c       |    3 +--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 3930814..43aca64 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -346,8 +346,11 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr 
mode,
        }
 
 #if XF86_CRTC_VERSION >= 3
-       crtc->funcs->gamma_set(crtc, crtc->gamma_red, crtc->gamma_green,
-                              crtc->gamma_blue, crtc->gamma_size);
+       /* Only upload when needed, to avoid unneeded delays. */
+       if (!crtc->active)
+               crtc->funcs->gamma_set(crtc, crtc->gamma_red, crtc->gamma_green,
+                                       crtc->gamma_blue, crtc->gamma_size);
+
        crtc->active = TRUE;
 #endif
 
diff --git a/src/nv_driver.c b/src/nv_driver.c
index 4255c19..4595940 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -1690,8 +1690,7 @@ NVScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, 
char **argv)
         * Initialize colormap layer.
         * Must follow initialization of the default colormap 
         */
-       if (!pNv->kms_enable &&
-           !xf86HandleColormaps(pScreen, 256, 8, NVLoadPalette,
+       if (!xf86HandleColormaps(pScreen, 256, 8, NVLoadPalette,
                                 NULL, CMAP_PALETTED_TRUECOLOR))
                return FALSE;
 
-- 
1.6.4.4

_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

Reply via email to