From: Leo Li <sunpeng.li-5C7GfCeVMHo@public.gmane.org>
To: "Michel Dänzer" <michel-otUistvHUpPR7s880joybQ@public.gmane.org>
Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH xf86-video-amdgpu 3/5] Keep CRTC properties consistent
Date: Thu, 12 Apr 2018 12:48:11 -0400 [thread overview]
Message-ID: <f915a0db-4756-91de-e9dd-336da66060e6@amd.com> (raw)
In-Reply-To: <cc580a31-0679-5492-afff-2ff683ca975d-otUistvHUpPR7s880joybQ@public.gmane.org>
On 2018-04-12 06:30 AM, Michel Dänzer wrote:
> On 2018-04-11 11:26 PM, Leo Li wrote:
>> On 2018-04-11 04:39 AM, Michel Dänzer wrote:
>>>
>>> Hmm. So either legacy or non-legacy clients won't work at all, or
>>> they'll step on each other's toes, clobbering the HW gamma LUT from
>>> each other.
>>>
>>> I'm afraid neither of those alternatives sound like a good user
>>> experience to me.
>>>
>>> Consider on the one hand something like Night Light / redshift,
>>> using legacy APIs to adjust colour temperature to the time of day.
>>> On the other hand, another client using the non-legacy API for say
>>> fine-tuning of a display's advanced gamma capabilities.
>>>
>>> Ideally, in this case the gamma LUTs from the legacy and non-legacy
>>> APIs should be combined, such that the hardware LUT reflects both
>>> the colour temperature set by Night Light / refshift and the
>>> fine-tuning set by the non-legacy client. Is that feasible? If not,
>>> can you explain a little why?
>>
>> Hmm, combining LUTs could be feasible, but I don't think that's the
>> right approach.
>>
>> LUTs can be combined through composition h(x) = f(g(x)), with some
>> interpolation involved. Once combined, it can be set using the
>> non-legacy API, since that'll likely have a larger LUT size.
>>
>> But I think what you've mentioned raises a bigger issue of color
>> management conflicts in general. It doesn't have to be redshift vs
>> monitor correction, what if there more than 2 applications contending
>> to set gamma? xrandr's brightness already conflicts with redshift,
>> and so does some apps running on WINE.
>
> What you're describing is an X11 design flaw, which we cannot do
> anything about in the DDX driver.
>
> What I want to avoid is repeating a similar situation as we had before
> xserver 1.19, where one could have either working per-window colormaps
> and global gamma, or per-CRTC gamma via RandR, not all at the same
> time. (Before xserver 1.7, they would clobber the HW LUT from each
> other) I fixed this in
> https://cgit.freedesktop.org/xorg/xserver/commit/?id=b4e46c0444bb09f4af59d9d13acc939a0fbbc6d6
> by composing the LUTs.
>
>
>> For the small example at hand, the ideal solution is to have
>> redshift use the color transformation matrix (CTM), which will be
>> exposed as part of the non-legacy color API. It'll need modification
>> of redshift, but at least it won't conflict with anything gamma
>> related.
>
> From past experience, it can take a long time (up to forever) for some
> clients to be updated like this. E.g. it's unlikely at this point that
> libraries such as SDL1 will ever be updated for the new API, so I'm
> afraid users would run into things like
> https://bugs.freedesktop.org/show_bug.cgi?id=27222 again.
>
> (Besides, it would conflict with anything else using the same API, as
> you described above, so it's not even obviously the ideal solution)
>
Fair enough, it's better to have the frequent redshift+monitor adjust
use-case working now instead of pushing an entirely new API.
>
>> Jumping back on some patch 1 topics:
>>
>> Are there ways to get arbitrarily (no more than 4096 elements) sized
>> arrays from a client, to the DDX driver?
>
> Seems like the RRChangeOutputProperty request could work.
>
>
>> I agree, it would definitely be nicer for clients to not worry about
>> DRM blobs at all.
>
> Indeed. E.g. as a bonus, it would allow this to work even with a remote
> display connection.
>
>
> I'm holding off on the more detailed discussion about the other patches
> until there is a plan for this fundamental issue.
>
>
I'll take another look at RRChangeOutputProperty. Seems I missed the
'length' argument when I first went through it.
Once the blobs are gone, the other issues should be much simpler to
solve. I'll see if I can come up with some v2's.
A side question: How does xrandr display lengthy properties, like LUTs?
Can users set it via --set still?
Leo
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2018-04-12 16:48 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-26 20:00 [PATCH xf86-video-amdgpu 0/5] Implementing non-legacy color management sunpeng.li-5C7GfCeVMHo
[not found] ` <1522094418-9102-1-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
2018-03-26 20:00 ` [PATCH xf86-video-amdgpu 1/5] Add functions for changing CRTC color management properties sunpeng.li-5C7GfCeVMHo
[not found] ` <1522094418-9102-2-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
2018-04-09 15:03 ` Michel Dänzer
[not found] ` <0f5652b1-82af-23a2-969e-0e47844fef28-otUistvHUpPR7s880joybQ@public.gmane.org>
2018-04-10 18:02 ` Leo Li
[not found] ` <25c493fd-dfa3-1549-6d7c-30790d48acae-5C7GfCeVMHo@public.gmane.org>
2018-04-11 8:39 ` Michel Dänzer
[not found] ` <90b36645-a08a-b36d-2e76-64ad9709b1a8-otUistvHUpPR7s880joybQ@public.gmane.org>
2018-04-11 21:26 ` Leo Li
2018-03-26 20:00 ` [PATCH xf86-video-amdgpu 2/5] Hook up CRTC color management functions sunpeng.li-5C7GfCeVMHo
[not found] ` <1522094418-9102-3-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
2018-04-09 15:03 ` Michel Dänzer
[not found] ` <01457540-fbc7-b608-4aee-5df18f7a7dde-otUistvHUpPR7s880joybQ@public.gmane.org>
2018-04-10 18:02 ` Leo Li
[not found] ` <8994afe3-812f-432f-27ef-ab5db3513d15-5C7GfCeVMHo@public.gmane.org>
2018-04-11 8:48 ` Michel Dänzer
[not found] ` <ce29def3-b0f5-3c4a-cd3f-ca3c61770f81-otUistvHUpPR7s880joybQ@public.gmane.org>
2018-04-11 21:26 ` Leo Li
2018-03-26 20:00 ` [PATCH xf86-video-amdgpu 3/5] Keep CRTC properties consistent sunpeng.li-5C7GfCeVMHo
[not found] ` <1522094418-9102-4-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
2018-04-09 15:03 ` Michel Dänzer
[not found] ` <2fbbae9b-c874-7187-9b69-0a929dcaf5cf-otUistvHUpPR7s880joybQ@public.gmane.org>
2018-04-10 18:02 ` Leo Li
[not found] ` <0b884ad3-c193-9eab-ca93-ff0ca0672f1e-5C7GfCeVMHo@public.gmane.org>
2018-04-11 8:39 ` Michel Dänzer
[not found] ` <4cd3224e-fd14-e66f-56bf-b983b8f74bc8-otUistvHUpPR7s880joybQ@public.gmane.org>
2018-04-11 21:26 ` Leo Li
[not found] ` <78b780f2-d075-9496-e62a-8f6de989b992-5C7GfCeVMHo@public.gmane.org>
2018-04-12 10:30 ` Michel Dänzer
[not found] ` <cc580a31-0679-5492-afff-2ff683ca975d-otUistvHUpPR7s880joybQ@public.gmane.org>
2018-04-12 16:48 ` Leo Li [this message]
[not found] ` <f915a0db-4756-91de-e9dd-336da66060e6-5C7GfCeVMHo@public.gmane.org>
2018-04-13 9:12 ` Michel Dänzer
2018-03-26 20:00 ` [PATCH xf86-video-amdgpu 4/5] Enable configure & change helper to handle enums sunpeng.li-5C7GfCeVMHo
[not found] ` <1522094418-9102-5-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
2018-04-09 15:03 ` Michel Dänzer
2018-03-26 20:00 ` [PATCH xf86-video-amdgpu 5/5] Modify output_create_resources to use configure & change helper sunpeng.li-5C7GfCeVMHo
2018-04-09 14:10 ` [PATCH xf86-video-amdgpu 0/5] Implementing non-legacy color management Michel Dänzer
[not found] ` <53e9ea09-8b20-70fd-b7ef-c0219d46bdcc-otUistvHUpPR7s880joybQ@public.gmane.org>
2018-04-10 18:02 ` Leo Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f915a0db-4756-91de-e9dd-336da66060e6@amd.com \
--to=sunpeng.li-5c7gfcevmho@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=michel-otUistvHUpPR7s880joybQ@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox