From: Mario Kleiner <mario.kleiner.de-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: "Michel Dänzer" <michel-otUistvHUpPR7s880joybQ@public.gmane.org>
Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH 1/3] Skip xf86HandleColormaps() at color depth 30.
Date: Wed, 27 Dec 2017 21:49:35 +0100 [thread overview]
Message-ID: <bae0a477-fa06-5ddd-6202-ebb29576e432@gmail.com> (raw)
In-Reply-To: <f15625f4-c8fa-38b2-6a35-05bdbcaa9a1e-otUistvHUpPR7s880joybQ@public.gmane.org>
On 12/27/2017 12:56 PM, Michel Dänzer wrote:
> On 2017-12-23 07:07 AM, Mario Kleiner wrote:
>> The hardware gamma luts get bypassed at color
>> depth 30 anyway, so skip their setup.
>>
>> Also skip drmmode_crtc_gamma_set() for a screen
>> with depth 30.
>>
>> Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
>> ---
>> src/drmmode_display.c | 10 ++++++++--
>> 1 file changed, 8 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/drmmode_display.c b/src/drmmode_display.c
>> index 7ad3235..e5f9dbe 100644
>> --- a/src/drmmode_display.c
>> +++ b/src/drmmode_display.c
>> @@ -1275,6 +1275,10 @@ drmmode_crtc_gamma_set(xf86CrtcPtr crtc, uint16_t *red, uint16_t *green,
>> RADEONInfoPtr info = RADEONPTR(scrn);
>> int i;
>>
>> + /* Hw gamma lut's are bypassed at color depth 30 */
>> + if (scrn->depth == 30)
>> + return;
>
> It's better to set xf86CrtcFuncsRec::gamma_set = NULL in this case, to
> prevent the X server from wasting work calculating gamma tables that
> will never be used.
I looked at that, but as far as i understand, wouldn't NULL'ing that
entry affect all active X-Screens, not only the depth 30 ones, as each
screen only references the same shared static struct with function
pointers in the driver? At least for the use cases of many of "my"
users, two separate x-screens, with ZaphodHeads and different color
depth wouldn't be an unexpected setup.
Or maybe i just overlook something (not with my code/test-machine atm.)?
-mario
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2017-12-27 20:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-23 6:07 Depth 30 enablement for ati-ddx + exa. Rev 2 Mario Kleiner
[not found] ` <20171223060737.12271-1-mario.kleiner.de-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-12-23 6:07 ` [PATCH 1/3] Skip xf86HandleColormaps() at color depth 30 Mario Kleiner
[not found] ` <20171223060737.12271-2-mario.kleiner.de-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-12-27 11:56 ` Michel Dänzer
[not found] ` <f15625f4-c8fa-38b2-6a35-05bdbcaa9a1e-otUistvHUpPR7s880joybQ@public.gmane.org>
2017-12-27 20:49 ` Mario Kleiner [this message]
[not found] ` <bae0a477-fa06-5ddd-6202-ebb29576e432-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-12-28 14:47 ` Michel Dänzer
2017-12-23 6:07 ` [PATCH 2/3] exa: Accelerate ARGB2101010 pictures (v2) Mario Kleiner
[not found] ` <20171223060737.12271-3-mario.kleiner.de-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-12-27 14:57 ` Michel Dänzer
2017-12-23 6:07 ` [PATCH 3/3] Support exa screen color depth 30 on Linux 3.16 and later. (v2) Mario Kleiner
[not found] ` <20171223060737.12271-4-mario.kleiner.de-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-12-27 15:04 ` Michel Dänzer
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=bae0a477-fa06-5ddd-6202-ebb29576e432@gmail.com \
--to=mario.kleiner.de-re5jqeeqqe8avxtiumwx3w@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