Re: [PATCH] modesetting: call xf86HandleColormaps
Rinat Ibragimov
ibragimovrinat at mail.ru
Mon Oct 23 22:57:36 UTC 2017
>Понедельник, 23 октября 2017, 13:56 +03:00 от Michel Dänzer <michel at daenzer.net>:
>
>On 23/10/17 12:07 AM, Rinat Ibragimov wrote:
>> Long ago, it was possible to apply color profile with modesetting driver.
>> But it's not working now. (Stopped approximately after 1.19.0 release).
>> Bisecting points to the patch b4e46c04 (xfree86: Hook up colormaps and
>> RandR 1.2 gamma code v6). Applying color profile still works with intel
>> driver.
>>
>> As far as I understand, it was working because there were fall-backs which
>> were removed by the patch b4e46c04. And now, since modesetting does not
>> provide LoadPalette method, fails. Fortunately, there is
>> drmmode_setup_colormap(), which in turn calls xf86HandleColormaps().
>>
>> Patch below works on my machine. "xcalib -i -a" inverts colors as before.
>> Applying .icc file also changes colors as expected. But this colormap
>> handling surely has pitfalls.
>
>What would those pitfalls be?
>
>Before the change above, X11 colormaps weren't applied at all with a
>RandR 1.2 capable driver, effectively always using a no-op mapping
>instead (and completely breaking depth 8 pseudocolour). Also, the gamma
>values managed via RandR 1.2 and other methods weren't integrated with
>each other, changing either clobbered the hardware gamma values from the
>other one.
>
>Now, all of those things are fixed, the colormap and various gamma
>values are correctly combined with each other.
Thank you for the clarifications.
>
>> So I'm not sure. Is this a correct way to fix it?
>
>Yes, it is.
>
>Reviewed-by: Michel Dänzer < michel.daenzer at amd.com >
Today I found "SubmittingPatches" page on wiki, and realized I
did not send the patch as suggested there. So, now there should
be another copy of the patch on the mailing list, in git diff
format with signed-off-by line. Also changed commit message. It
was a bit confusing since xf86HandleColormaps() is not directly
called. Sorry for the noise.
>
>
>--
>Earthling Michel Dänzer | http://www.amd.com
>Libre software enthusiast | Mesa and X developer
>_______________________________________________
>xorg-devel at lists.x.org: X.Org development
>Archives: http://lists.x.org/archives/xorg-devel
>Info: https://lists.x.org/mailman/listinfo/xorg-devel
---
Rinat
More information about the xorg-devel
mailing list