[Nouveau] [PATCH 2/2] Revert "kms: always set gamma on modeset"
Francisco Jerez
currojerez at riseup.net
Sun Oct 11 11:52:57 PDT 2009
This reverts commit 6c8d3e39b72abe897b08d9e90cae85e121863d2c, as it
breaks gamma setting with servers older than 1.7.
Signed-off-by: Francisco Jerez <currojerez at riseup.net>
---
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
More information about the Nouveau
mailing list