AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/gamma: Clarify gamma lut uapi
@ 2019-03-29  9:20 Daniel Vetter
  2019-03-29 14:26 ` Liviu Dudau
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Daniel Vetter @ 2019-03-29  9:20 UTC (permalink / raw)
  To: DRI Development
  Cc: Rob Bradford, Daniel Vetter, Stefan Schake, Tomi Valkeinen,
	Benjamin Gaignard, Vincent Abriou, amd-gfx, James Wang, CK Hu,
	Mali DP Maintainers, Harry Wentland, Daniel Stone, Leo Li,
	Intel Graphics Development, Boris Brezillon, Philippe Cornu,
	Yannick Fertre, Kausal Malladi, Philipp Zabel

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@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Shashank Sharma <shashank.sharma@intel.com>
Cc: "Kumar, Kiran S" <kiran.s.kumar@intel.com>
Cc: Kausal Malladi <kausalmalladi@gmail.com>
Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Rob Bradford <robert.bradford@intel.com>
Cc: Daniel Stone <daniels@collabora.com>
Cc: Stefan Schake <stschake@gmail.com>
Cc: Eric Anholt <eric@anholt.net>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Leo Li <sunpeng.li@amd.com>
Cc: amd-gfx@lists.freedesktop.org
Cc: James (Qian) Wang <james.qian.wang@arm.com>
Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Mali DP Maintainers <malidp@foss.arm.com>
Cc: CK Hu <ck.hu@mediatek.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Yannick Fertre <yannick.fertre@st.com>
Cc: Philippe Cornu <philippe.cornu@st.com>
Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: Vincent Abriou <vincent.abriou@st.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Boris Brezillon <bbrezillon@kernel.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] drm/gamma: Clarify gamma lut uapi
  2019-03-29  9:20 [PATCH] drm/gamma: Clarify gamma lut uapi Daniel Vetter
@ 2019-03-29 14:26 ` Liviu Dudau
  2019-03-29 14:29 ` Lionel Landwerlin
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Liviu Dudau @ 2019-03-29 14:26 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: Rob Bradford, DRI Development, Stefan Schake, Tomi Valkeinen,
	Vincent Abriou, amd-gfx, Uma Shankar, Mali DP Maintainers,
	Kumar, Kiran S, James Wang, Daniel Stone, Leo Li,
	Intel Graphics Development, Boris Brezillon, Philippe Cornu,
	Yannick Fertre, Kausal Malladi

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@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Shashank Sharma <shashank.sharma@intel.com>
> Cc: "Kumar, Kiran S" <kiran.s.kumar@intel.com>
> Cc: Kausal Malladi <kausalmalladi@gmail.com>
> Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
> Cc: Matt Roper <matthew.d.roper@intel.com>
> Cc: Rob Bradford <robert.bradford@intel.com>
> Cc: Daniel Stone <daniels@collabora.com>
> Cc: Stefan Schake <stschake@gmail.com>
> Cc: Eric Anholt <eric@anholt.net>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Harry Wentland <harry.wentland@amd.com>
> Cc: Leo Li <sunpeng.li@amd.com>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: James (Qian) Wang <james.qian.wang@arm.com>
> Cc: Liviu Dudau <liviu.dudau@arm.com>
> Cc: Mali DP Maintainers <malidp@foss.arm.com>
> Cc: CK Hu <ck.hu@mediatek.com>
> Cc: Philipp Zabel <p.zabel@pengutronix.de>
> Cc: Yannick Fertre <yannick.fertre@st.com>
> Cc: Philippe Cornu <philippe.cornu@st.com>
> Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
> Cc: Vincent Abriou <vincent.abriou@st.com>
> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Cc: Boris Brezillon <bbrezillon@kernel.org>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

Acked-by: Liviu Dudau <liviu.dudau@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!  /
  ---------------
    ¯\_(ツ)_/¯
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] drm/gamma: Clarify gamma lut uapi
  2019-03-29  9:20 [PATCH] drm/gamma: Clarify gamma lut uapi Daniel Vetter
  2019-03-29 14:26 ` Liviu Dudau
@ 2019-03-29 14:29 ` Lionel Landwerlin
  2019-03-29 14:36 ` Ville Syrjälä
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Lionel Landwerlin @ 2019-03-29 14:29 UTC (permalink / raw)
  To: Daniel Vetter, DRI Development
  Cc: Rob Bradford, Liviu Dudau, Stefan Schake, Tomi Valkeinen,
	Vincent Abriou, amd-gfx, Uma Shankar, James Wang, Kumar, Kiran S,
	Mali DP Maintainers, Daniel Stone, Leo Li,
	Intel Graphics Development, Boris Brezillon, Philippe Cornu,
	Yannick Fertre, Kausal Malladi

On 29/03/2019 09:20, 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@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Shashank Sharma <shashank.sharma@intel.com>
> Cc: "Kumar, Kiran S" <kiran.s.kumar@intel.com>
> Cc: Kausal Malladi <kausalmalladi@gmail.com>
> Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
> Cc: Matt Roper <matthew.d.roper@intel.com>
> Cc: Rob Bradford <robert.bradford@intel.com>
> Cc: Daniel Stone <daniels@collabora.com>
> Cc: Stefan Schake <stschake@gmail.com>
> Cc: Eric Anholt <eric@anholt.net>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Harry Wentland <harry.wentland@amd.com>
> Cc: Leo Li <sunpeng.li@amd.com>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: James (Qian) Wang <james.qian.wang@arm.com>
> Cc: Liviu Dudau <liviu.dudau@arm.com>
> Cc: Mali DP Maintainers <malidp@foss.arm.com>
> Cc: CK Hu <ck.hu@mediatek.com>
> Cc: Philipp Zabel <p.zabel@pengutronix.de>
> Cc: Yannick Fertre <yannick.fertre@st.com>
> Cc: Philippe Cornu <philippe.cornu@st.com>
> Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
> Cc: Vincent Abriou <vincent.abriou@st.com>
> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Cc: Boris Brezillon <bbrezillon@kernel.org>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
>   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;


Thanks, that was the intention when it was introduced.


Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] drm/gamma: Clarify gamma lut uapi
  2019-03-29  9:20 [PATCH] drm/gamma: Clarify gamma lut uapi Daniel Vetter
  2019-03-29 14:26 ` Liviu Dudau
  2019-03-29 14:29 ` Lionel Landwerlin
@ 2019-03-29 14:36 ` Ville Syrjälä
  2019-03-29 15:47 ` Philippe CORNU
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Ville Syrjälä @ 2019-03-29 14:36 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: Rob Bradford, DRI Development, Stefan Schake, Tomi Valkeinen,
	Benjamin Gaignard, Vincent Abriou, amd-gfx, James Wang, CK Hu,
	Mali DP Maintainers, Harry Wentland, Daniel Stone, Leo Li,
	Intel Graphics Development, Boris Brezillon, Philippe Cornu,
	Yannick Fertre, Kausal Malladi, Philipp Zabel

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@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Shashank Sharma <shashank.sharma@intel.com>
> Cc: "Kumar, Kiran S" <kiran.s.kumar@intel.com>
> Cc: Kausal Malladi <kausalmalladi@gmail.com>
> Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
> Cc: Matt Roper <matthew.d.roper@intel.com>
> Cc: Rob Bradford <robert.bradford@intel.com>
> Cc: Daniel Stone <daniels@collabora.com>
> Cc: Stefan Schake <stschake@gmail.com>
> Cc: Eric Anholt <eric@anholt.net>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Harry Wentland <harry.wentland@amd.com>
> Cc: Leo Li <sunpeng.li@amd.com>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: James (Qian) Wang <james.qian.wang@arm.com>
> Cc: Liviu Dudau <liviu.dudau@arm.com>
> Cc: Mali DP Maintainers <malidp@foss.arm.com>
> Cc: CK Hu <ck.hu@mediatek.com>
> Cc: Philipp Zabel <p.zabel@pengutronix.de>
> Cc: Yannick Fertre <yannick.fertre@st.com>
> Cc: Philippe Cornu <philippe.cornu@st.com>
> Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
> Cc: Vincent Abriou <vincent.abriou@st.com>
> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Cc: Boris Brezillon <bbrezillon@kernel.org>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
>  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.
>  	 */

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

>  	__u16 red;
>  	__u16 green;
> -- 
> 2.20.1

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] drm/gamma: Clarify gamma lut uapi
       [not found] ` <20190329092027.3430-1-daniel.vetter-/w4YWyX8dFk@public.gmane.org>
@ 2019-03-29 15:23   ` Matt Roper
  2019-03-29 17:31   ` Maarten Lankhorst
  1 sibling, 0 replies; 8+ messages in thread
From: Matt Roper @ 2019-03-29 15:23 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: Rob Bradford, Liviu Dudau, DRI Development, Stefan Schake,
	Eric Anholt, Benjamin Gaignard, Ville Syrjälä,
	Tomi Valkeinen, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	Uma Shankar, Mali DP Maintainers, Kumar, Kiran S, CK Hu,
	James Wang, Harry Wentland, Shashank Sharma, Daniel Stone, Leo Li,
	Intel Graphics Development, Maarten Lankhorst

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@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Shashank Sharma <shashank.sharma@intel.com>
> Cc: "Kumar, Kiran S" <kiran.s.kumar@intel.com>
> Cc: Kausal Malladi <kausalmalladi@gmail.com>
> Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
> Cc: Matt Roper <matthew.d.roper@intel.com>
> Cc: Rob Bradford <robert.bradford@intel.com>
> Cc: Daniel Stone <daniels@collabora.com>
> Cc: Stefan Schake <stschake@gmail.com>
> Cc: Eric Anholt <eric@anholt.net>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Harry Wentland <harry.wentland@amd.com>
> Cc: Leo Li <sunpeng.li@amd.com>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: James (Qian) Wang <james.qian.wang@arm.com>
> Cc: Liviu Dudau <liviu.dudau@arm.com>
> Cc: Mali DP Maintainers <malidp@foss.arm.com>
> Cc: CK Hu <ck.hu@mediatek.com>
> Cc: Philipp Zabel <p.zabel@pengutronix.de>
> Cc: Yannick Fertre <yannick.fertre@st.com>
> Cc: Philippe Cornu <philippe.cornu@st.com>
> Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
> Cc: Vincent Abriou <vincent.abriou@st.com>
> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Cc: Boris Brezillon <bbrezillon@kernel.org>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

Looks like you're missing a newline between your two s-o-b's.  But the
patch is

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>

> ---
>  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
> 

-- 
Matt Roper
Graphics Software Engineer
IoTG Platform Enabling & Development
Intel Corporation
(916) 356-2795
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] drm/gamma: Clarify gamma lut uapi
  2019-03-29  9:20 [PATCH] drm/gamma: Clarify gamma lut uapi Daniel Vetter
                   ` (2 preceding siblings ...)
  2019-03-29 14:36 ` Ville Syrjälä
@ 2019-03-29 15:47 ` Philippe CORNU
       [not found] ` <20190329092027.3430-1-daniel.vetter-/w4YWyX8dFk@public.gmane.org>
  2019-04-02  7:59 ` Daniel Vetter
  5 siblings, 0 replies; 8+ messages in thread
From: Philippe CORNU @ 2019-03-29 15:47 UTC (permalink / raw)
  To: Daniel Vetter, DRI Development
  Cc: Rob Bradford, Liviu Dudau, Stefan Schake, Tomi Valkeinen,
	Vincent ABRIOU, amd-gfx@lists.freedesktop.org, Uma Shankar,
	James Wang, Kumar, Kiran S, Mali DP Maintainers, Daniel Stone,
	Leo Li, Intel Graphics Development, Boris Brezillon,
	Yannick FERTRE, Kausal Malladi



On 3/29/19 10:20 AM, 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@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Shashank Sharma <shashank.sharma@intel.com>
> Cc: "Kumar, Kiran S" <kiran.s.kumar@intel.com>
> Cc: Kausal Malladi <kausalmalladi@gmail.com>
> Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
> Cc: Matt Roper <matthew.d.roper@intel.com>
> Cc: Rob Bradford <robert.bradford@intel.com>
> Cc: Daniel Stone <daniels@collabora.com>
> Cc: Stefan Schake <stschake@gmail.com>
> Cc: Eric Anholt <eric@anholt.net>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Harry Wentland <harry.wentland@amd.com>
> Cc: Leo Li <sunpeng.li@amd.com>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: James (Qian) Wang <james.qian.wang@arm.com>
> Cc: Liviu Dudau <liviu.dudau@arm.com>
> Cc: Mali DP Maintainers <malidp@foss.arm.com>
> Cc: CK Hu <ck.hu@mediatek.com>
> Cc: Philipp Zabel <p.zabel@pengutronix.de>
> Cc: Yannick Fertre <yannick.fertre@st.com>
> Cc: Philippe Cornu <philippe.cornu@st.com>
> Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
> Cc: Vincent Abriou <vincent.abriou@st.com>
> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Cc: Boris Brezillon <bbrezillon@kernel.org>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
>   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.

for stm,
Reviewed-by: Philippe Cornu <philippe.cornu@st.com>
Many thanks
Philippe :-)

>   	 */
>   	__u16 red;
>   	__u16 green;
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] drm/gamma: Clarify gamma lut uapi
       [not found] ` <20190329092027.3430-1-daniel.vetter-/w4YWyX8dFk@public.gmane.org>
  2019-03-29 15:23   ` Matt Roper
@ 2019-03-29 17:31   ` Maarten Lankhorst
  1 sibling, 0 replies; 8+ messages in thread
From: Maarten Lankhorst @ 2019-03-29 17:31 UTC (permalink / raw)
  To: Daniel Vetter, DRI Development
  Cc: Rob Bradford, Liviu Dudau, Lionel Landwerlin, Stefan Schake,
	Eric Anholt, Tomi Valkeinen, Benjamin Gaignard,
	Ville Syrjälä, Vincent Abriou,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Uma Shankar, James Wang,
	Kumar, Kiran S, CK Hu, Mali DP Maintainers, Harry Wentland,
	Shashank Sharma, Daniel Stone, Leo Li, Intel Graphics Development,
	Matt Roper

Op 29-03-2019 om 10:20 schreef Daniel Vetter:
> 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@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Shashank Sharma <shashank.sharma@intel.com>
> Cc: "Kumar, Kiran S" <kiran.s.kumar@intel.com>
> Cc: Kausal Malladi <kausalmalladi@gmail.com>
> Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
> Cc: Matt Roper <matthew.d.roper@intel.com>
> Cc: Rob Bradford <robert.bradford@intel.com>
> Cc: Daniel Stone <daniels@collabora.com>
> Cc: Stefan Schake <stschake@gmail.com>
> Cc: Eric Anholt <eric@anholt.net>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Harry Wentland <harry.wentland@amd.com>
> Cc: Leo Li <sunpeng.li@amd.com>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: James (Qian) Wang <james.qian.wang@arm.com>
> Cc: Liviu Dudau <liviu.dudau@arm.com>
> Cc: Mali DP Maintainers <malidp@foss.arm.com>
> Cc: CK Hu <ck.hu@mediatek.com>
> Cc: Philipp Zabel <p.zabel@pengutronix.de>
> Cc: Yannick Fertre <yannick.fertre@st.com>
> Cc: Philippe Cornu <philippe.cornu@st.com>
> Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
> Cc: Vincent Abriou <vincent.abriou@st.com>
> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Cc: Boris Brezillon <bbrezillon@kernel.org>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
>  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;

Much better, with sob fixed. :)

Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] drm/gamma: Clarify gamma lut uapi
  2019-03-29  9:20 [PATCH] drm/gamma: Clarify gamma lut uapi Daniel Vetter
                   ` (4 preceding siblings ...)
       [not found] ` <20190329092027.3430-1-daniel.vetter-/w4YWyX8dFk@public.gmane.org>
@ 2019-04-02  7:59 ` Daniel Vetter
  5 siblings, 0 replies; 8+ messages in thread
From: Daniel Vetter @ 2019-04-02  7:59 UTC (permalink / raw)
  To: DRI Development
  Cc: Rob Bradford, Daniel Vetter, Liviu Dudau, Stefan Schake,
	Tomi Valkeinen, Vincent Abriou, amd-gfx, Uma Shankar, James Wang,
	Kumar, Kiran S, Mali DP Maintainers, Daniel Stone, Leo Li,
	Intel Graphics Development, Boris Brezillon, Philippe Cornu,
	Yannick Fertre, Kausal Malladi

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@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Shashank Sharma <shashank.sharma@intel.com>
> Cc: "Kumar, Kiran S" <kiran.s.kumar@intel.com>
> Cc: Kausal Malladi <kausalmalladi@gmail.com>
> Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
> Cc: Matt Roper <matthew.d.roper@intel.com>
> Cc: Rob Bradford <robert.bradford@intel.com>
> Cc: Daniel Stone <daniels@collabora.com>
> Cc: Stefan Schake <stschake@gmail.com>
> Cc: Eric Anholt <eric@anholt.net>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Harry Wentland <harry.wentland@amd.com>
> Cc: Leo Li <sunpeng.li@amd.com>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: James (Qian) Wang <james.qian.wang@arm.com>
> Cc: Liviu Dudau <liviu.dudau@arm.com>
> Cc: Mali DP Maintainers <malidp@foss.arm.com>
> Cc: CK Hu <ck.hu@mediatek.com>
> Cc: Philipp Zabel <p.zabel@pengutronix.de>
> Cc: Yannick Fertre <yannick.fertre@st.com>
> Cc: Philippe Cornu <philippe.cornu@st.com>
> Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
> Cc: Vincent Abriou <vincent.abriou@st.com>
> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Cc: Boris Brezillon <bbrezillon@kernel.org>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

Applied, thanks for all the reviews.
-Daniel

> ---
>  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
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-04-02  7:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-29  9:20 [PATCH] drm/gamma: Clarify gamma lut uapi Daniel Vetter
2019-03-29 14:26 ` Liviu Dudau
2019-03-29 14:29 ` Lionel Landwerlin
2019-03-29 14:36 ` Ville Syrjälä
2019-03-29 15:47 ` Philippe CORNU
     [not found] ` <20190329092027.3430-1-daniel.vetter-/w4YWyX8dFk@public.gmane.org>
2019-03-29 15:23   ` Matt Roper
2019-03-29 17:31   ` Maarten Lankhorst
2019-04-02  7:59 ` Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox