dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: jfalempe@redhat.com, javierm@redhat.com, airlied@redhat.com,
	simona@ffwll.ch, airlied@gmail.com,
	maarten.lankhorst@linux.intel.com, mripard@kernel.org
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 0/5] drm: Provide helpers for programming gamma ramps and palettes
Date: Mon, 12 May 2025 13:48:00 +0200	[thread overview]
Message-ID: <47ca248e-2c8f-456c-afdb-c9b30c9a3e71@suse.de> (raw)
In-Reply-To: <20250509083911.39018-1-tzimmermann@suse.de>



Am 09.05.25 um 10:23 schrieb Thomas Zimmermann:
> We have a number of drivers that offer simple gamma correction and
> palette modes. Depending on their hardware, the drivers process the
> provided data in similar ways. Unify the functionality in several
> DRM color-management helpers and update the drivers. The new helpers
> can load provided data or generate default data to load.
>
> With the drivers; ast, mgag200 ofdrm and vesadrm; gamma ramps are
> always 8 bit wide. For 24-bit color depth, 8-bit gamma ramps are being
> loaded to hardware as provided. For lower color depths the hardware
> often requires the gamma ramp to be reduced to the number of bits
> per pixel component, which the new helpers can do automatically. The
> exception is ast's hardware, which always uses 8-bit gamma ramps.

> The default gamma ramp uses a factor of 1.0 (as has been the case in
> existing the per-driver implementations). A later update could change
> this to the common value of 2.2 or a system-specific value.

That might not be such a great idea. See 
https://people.freedesktop.org/~cbrill/dri-log/?channel=dri-devel&highlight_names=&date=2025-05-12&show_html=true

>
> Helpers for palettes either load an 8-bit palette or generate a default
> palette with increasing luminance. The goal for the default is to keep
> the display content visible with black at index 0. A later update could
> possibly load a system-specific default palette.
>
> Thomas Zimmermann (5):
>    drm: Add helpers for programming hardware gamma LUTs
>    drm/ast: Use helpers for programming gamma ramps and palettes
>    drm/mgag200: Use helpers for programming gamma ramps
>    drm/ofdrm: Use helpers for programming gamma ramps
>    drm/vesadrm: Use helpers for programming gamma ramps
>
>   drivers/gpu/drm/ast/ast_mode.c           |  69 +++++---
>   drivers/gpu/drm/drm_color_mgmt.c         | 206 +++++++++++++++++++++++
>   drivers/gpu/drm/mgag200/mgag200_drv.h    |   4 +-
>   drivers/gpu/drm/mgag200/mgag200_g200er.c |   4 +-
>   drivers/gpu/drm/mgag200/mgag200_g200ev.c |   4 +-
>   drivers/gpu/drm/mgag200/mgag200_g200se.c |   4 +-
>   drivers/gpu/drm/mgag200/mgag200_mode.c   |  78 ++++-----
>   drivers/gpu/drm/sysfb/ofdrm.c            |  78 ++++-----
>   drivers/gpu/drm/sysfb/vesadrm.c          | 100 ++++-------
>   include/drm/drm_color_mgmt.h             |  27 +++
>   10 files changed, 380 insertions(+), 194 deletions(-)
>
>
> base-commit: 842c3c276c106040f9b96d72b9df35ed6aed9ae9

-- 
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)


      parent reply	other threads:[~2025-05-12 11:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-09  8:23 [PATCH 0/5] drm: Provide helpers for programming gamma ramps and palettes Thomas Zimmermann
2025-05-09  8:23 ` [PATCH 1/5] drm: Add helpers for programming hardware gamma LUTs Thomas Zimmermann
2025-05-12 13:31   ` Jocelyn Falempe
2025-05-12 13:55     ` Thomas Zimmermann
2025-05-13 12:26   ` Jocelyn Falempe
2025-05-19 13:06   ` Javier Martinez Canillas
2025-05-09  8:23 ` [PATCH 2/5] drm/ast: Use helpers for programming gamma ramps and palettes Thomas Zimmermann
2025-05-13 12:26   ` Jocelyn Falempe
2025-05-09  8:23 ` [PATCH 3/5] drm/mgag200: Use helpers for programming gamma ramps Thomas Zimmermann
2025-05-13 12:27   ` Jocelyn Falempe
2025-05-09  8:23 ` [PATCH 4/5] drm/ofdrm: " Thomas Zimmermann
2025-05-19 13:16   ` Javier Martinez Canillas
2025-05-09  8:23 ` [PATCH 5/5] drm/vesadrm: " Thomas Zimmermann
2025-05-19 13:17   ` Javier Martinez Canillas
2025-05-12 11:48 ` Thomas Zimmermann [this message]

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=47ca248e-2c8f-456c-afdb-c9b30c9a3e71@suse.de \
    --to=tzimmermann@suse.de \
    --cc=airlied@gmail.com \
    --cc=airlied@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=javierm@redhat.com \
    --cc=jfalempe@redhat.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=simona@ffwll.ch \
    /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;
as well as URLs for NNTP newsgroup(s).