[PATCH xserver] xfree86: fix gamma compute when palette_size > 256

Yu, Qiang Qiang.Yu at amd.com
Mon Oct 30 10:58:11 UTC 2017


If config like this:
Section "Screen"
       Identifier      "Screen0"
       Device          "Card0"
       DefaultDepth    30
       DefaultFbBpp    32
EndSection

The randr crtc gamma size will be 1024 and this palette_size is also 1024.
This makes amdgpu-pro 30bit support has wrong gamma setting.

Or maybe it's better to enlarge the crtc gamma size according to randr crtc
and let kernel driver to do the resize fit. But I see driver like amdgpu with
old KMS driver only has 256 entries and the gamma set syscall won't work
correctly for size>256.

Regards,
Qiang

________________________________________
From: Michel Dänzer <michel at daenzer.net>
Sent: Monday, October 30, 2017 6:28:04 PM
To: Yu, Qiang
Cc: xorg-devel at lists.x.org
Subject: Re: [PATCH xserver] xfree86: fix gamma compute when palette_size > 256

On 30/10/17 07:33 AM, Qiang Yu wrote:
> palette_(red|green|blue)_size > crtc->gamma_size (=256)
> this may happen when screen has per RGB chanel > 8bit,
> i.e. 30bit depth screen 10bit per RGB.

Is palette_size > gamma_size really useful though?

Seems to me like gamma_size should always be >= palette_size.
Specifically, if the gamma ramp only has 256 entries, what's the benefit
of having 1024 entries in the palette?

What's the exact configuration in which you hit this?


--
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the xorg-devel mailing list