[Intel-gfx] [PATCH] drm/gamma: Clarify gamma lut uapi

Liviu Dudau liviu.dudau at arm.com
Fri Mar 29 14:26:17 UTC 2019


On Fri, Mar 29, 2019 at 10:20:27AM +0100, Daniel Vetter wrote:
> Interpreting it as a 0.16 fixed point means we can't accurately
> represent 1.0. Which is one of the values we really should be able to
> represent.
> 
> Since most (all?) luts have lower precision this will only affect
> rounding of 0xffff.
> 
> Cc: Uma Shankar <uma.shankar at intel.com>
> Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
> Cc: Shashank Sharma <shashank.sharma at intel.com>
> Cc: "Kumar, Kiran S" <kiran.s.kumar at intel.com>
> Cc: Kausal Malladi <kausalmalladi at gmail.com>
> Cc: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
> Cc: Matt Roper <matthew.d.roper at intel.com>
> Cc: Rob Bradford <robert.bradford at intel.com>
> Cc: Daniel Stone <daniels at collabora.com>
> Cc: Stefan Schake <stschake at gmail.com>
> Cc: Eric Anholt <eric at anholt.net>
> Cc: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> Cc: Harry Wentland <harry.wentland at amd.com>
> Cc: Leo Li <sunpeng.li at amd.com>
> Cc: amd-gfx at lists.freedesktop.org
> Cc: James (Qian) Wang <james.qian.wang at arm.com>
> Cc: Liviu Dudau <liviu.dudau at arm.com>
> Cc: Mali DP Maintainers <malidp at foss.arm.com>
> Cc: CK Hu <ck.hu at mediatek.com>
> Cc: Philipp Zabel <p.zabel at pengutronix.de>
> Cc: Yannick Fertre <yannick.fertre at st.com>
> Cc: Philippe Cornu <philippe.cornu at st.com>
> Cc: Benjamin Gaignard <benjamin.gaignard at linaro.org>
> Cc: Vincent Abriou <vincent.abriou at st.com>
> Cc: Tomi Valkeinen <tomi.valkeinen at ti.com>
> Cc: Boris Brezillon <bbrezillon at kernel.org>
> Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>

Acked-by: Liviu Dudau <liviu.dudau at arm.com>

Best regards,
Liviu

> ---
>  include/uapi/drm/drm_mode.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
> index 09d72966899a..83cd1636b9be 100644
> --- a/include/uapi/drm/drm_mode.h
> +++ b/include/uapi/drm/drm_mode.h
> @@ -621,7 +621,8 @@ struct drm_color_ctm {
>  
>  struct drm_color_lut {
>  	/*
> -	 * Data is U0.16 fixed point format.
> +	 * Values are mapped linearly to 0.0 - 1.0 range, with 0x0 == 0.0 and
> +	 * 0xffff == 1.0.
>  	 */
>  	__u16 red;
>  	__u16 green;
> -- 
> 2.20.1
> 

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯


More information about the Intel-gfx mailing list