[Nouveau] [PATCH] Fix colormap handling at screen depth 30.

Mario Kleiner mario.kleiner.de at gmail.com
Thu Mar 1 06:31:18 UTC 2018


The various clut handling functions like a setup
consistent with the x-screen color depth. Otherwise
we observe improper sampling in the gamma tables
at depth 30.

Tested at depths 16, 24 and 30 and tested at depths
24 and 30 that xgamma and gamma table animations work,
and with measurement equipment to make sure identity
gamma ramps actually are identity mappings at the output.

Signed-off-by: Mario Kleiner <mario.kleiner.de at gmail.com>
---
 src/nv_driver.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/nv_driver.c b/src/nv_driver.c
index 32062eb..4fcd4c1 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -1568,8 +1568,8 @@ NVScreenInit(SCREEN_INIT_ARGS_DECL)
 	 * Must follow initialization of the default colormap 
 	 */
 	if (xf86_config->num_crtc &&
-	    !xf86HandleColormaps(pScreen, 256, 8, NVLoadPalette,
-				 NULL, CMAP_PALETTED_TRUECOLOR))
+	    !xf86HandleColormaps(pScreen, 1 << pScrn->rgbBits, pScrn->rgbBits,
+				 NVLoadPalette, NULL, CMAP_PALETTED_TRUECOLOR))
 		return FALSE;
 
 	/* Report any unused options (only for the first generation) */
-- 
2.7.4



More information about the Nouveau mailing list