drm/gamma: Clarify gamma lut uapi
diff mbox series

Message ID 20190329092027.3430-1-daniel.vetter@ffwll.ch
State New
Headers show
Series
  • drm/gamma: Clarify gamma lut uapi
Related show

Commit Message

Daniel Vetter March 29, 2019, 9:20 a.m. UTC
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(-)

Comments

Liviu Dudau March 29, 2019, 2:26 p.m. UTC | #1
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
>
Lionel Landwerlin March 29, 2019, 2:29 p.m. UTC | #2
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>
Ville Syrjälä March 29, 2019, 2:36 p.m. UTC | #3
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
Matt Roper March 29, 2019, 3:23 p.m. UTC | #4
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
>
Philippe CORNU March 29, 2019, 3:47 p.m. UTC | #5
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;
>
Maarten Lankhorst March 29, 2019, 5:31 p.m. UTC | #6
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>
Daniel Vetter April 2, 2019, 7:59 a.m. UTC | #7
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
>

Patch
diff mbox series

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;