[Nouveau] [PATCH] Fix colormap handling at screen depth 30.
Ilia Mirkin
imirkin at alum.mit.edu
Thu Mar 1 13:15:55 UTC 2018
NVLoadPalette is pretty hard-coded to 256. I haven't looked at what
all xf86HandleColormaps does, but it seems pretty suspicious. Also
note that the kernel currently only exposes a 256-sized LUT to
userspace, even for 10bpc modes.
On Thu, Mar 1, 2018 at 1:31 AM, Mario Kleiner
<mario.kleiner.de at gmail.com> wrote:
> 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
>
> _______________________________________________
> Nouveau mailing list
> Nouveau at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/nouveau
More information about the Nouveau
mailing list