Re: [PATCH] drm/gamma: Clarify gamma lut uapi

2019-04-02 Thread Daniel Vetter
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 0x.
> 
> Cc: Uma Shankar 
> Cc: Ville Syrjälä 
> Cc: Shashank Sharma 
> Cc: "Kumar, Kiran S" 
> Cc: Kausal Malladi 
> Cc: Lionel Landwerlin 
> Cc: Matt Roper 
> Cc: Rob Bradford 
> Cc: Daniel Stone 
> Cc: Stefan Schake 
> Cc: Eric Anholt 
> Cc: Maarten Lankhorst 
> Cc: Harry Wentland 
> Cc: Leo Li 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: James (Qian) Wang 
> Cc: Liviu Dudau 
> Cc: Mali DP Maintainers 
> Cc: CK Hu 
> Cc: Philipp Zabel 
> Cc: Yannick Fertre 
> Cc: Philippe Cornu 
> Cc: Benjamin Gaignard 
> Cc: Vincent Abriou 
> Cc: Tomi Valkeinen 
> Cc: Boris Brezillon 
> Signed-off-by: Daniel Vetter Signed-off-by: Daniel 
> Vetter 

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
> +  * 0x == 1.0.
>*/
>   __u16 red;
>   __u16 green;
> -- 
> 2.20.1
> 

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

Re: [PATCH] drm/gamma: Clarify gamma lut uapi

2019-03-29 Thread Maarten Lankhorst
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 0x.
>
> Cc: Uma Shankar 
> Cc: Ville Syrjälä 
> Cc: Shashank Sharma 
> Cc: "Kumar, Kiran S" 
> Cc: Kausal Malladi 
> Cc: Lionel Landwerlin 
> Cc: Matt Roper 
> Cc: Rob Bradford 
> Cc: Daniel Stone 
> Cc: Stefan Schake 
> Cc: Eric Anholt 
> Cc: Maarten Lankhorst 
> Cc: Harry Wentland 
> Cc: Leo Li 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: James (Qian) Wang 
> Cc: Liviu Dudau 
> Cc: Mali DP Maintainers 
> Cc: CK Hu 
> Cc: Philipp Zabel 
> Cc: Yannick Fertre 
> Cc: Philippe Cornu 
> Cc: Benjamin Gaignard 
> Cc: Vincent Abriou 
> Cc: Tomi Valkeinen 
> Cc: Boris Brezillon 
> Signed-off-by: Daniel Vetter Signed-off-by: Daniel 
> Vetter 
> ---
>  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
> +  * 0x == 1.0.
>*/
>   __u16 red;
>   __u16 green;

Much better, with sob fixed. :)

Reviewed-by: Maarten Lankhorst 

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

Re: [PATCH] drm/gamma: Clarify gamma lut uapi

2019-03-29 Thread Philippe CORNU


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 0x.
> 
> Cc: Uma Shankar 
> Cc: Ville Syrjälä 
> Cc: Shashank Sharma 
> Cc: "Kumar, Kiran S" 
> Cc: Kausal Malladi 
> Cc: Lionel Landwerlin 
> Cc: Matt Roper 
> Cc: Rob Bradford 
> Cc: Daniel Stone 
> Cc: Stefan Schake 
> Cc: Eric Anholt 
> Cc: Maarten Lankhorst 
> Cc: Harry Wentland 
> Cc: Leo Li 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: James (Qian) Wang 
> Cc: Liviu Dudau 
> Cc: Mali DP Maintainers 
> Cc: CK Hu 
> Cc: Philipp Zabel 
> Cc: Yannick Fertre 
> Cc: Philippe Cornu 
> Cc: Benjamin Gaignard 
> Cc: Vincent Abriou 
> Cc: Tomi Valkeinen 
> Cc: Boris Brezillon 
> Signed-off-by: Daniel Vetter Signed-off-by: Daniel 
> Vetter 
> ---
>   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
> +  * 0x == 1.0.

for stm,
Reviewed-by: Philippe Cornu 
Many thanks
Philippe :-)

>*/
>   __u16 red;
>   __u16 green;
> 
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Re: [PATCH] drm/gamma: Clarify gamma lut uapi

2019-03-29 Thread Matt Roper
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 0x.
> 
> Cc: Uma Shankar 
> Cc: Ville Syrjälä 
> Cc: Shashank Sharma 
> Cc: "Kumar, Kiran S" 
> Cc: Kausal Malladi 
> Cc: Lionel Landwerlin 
> Cc: Matt Roper 
> Cc: Rob Bradford 
> Cc: Daniel Stone 
> Cc: Stefan Schake 
> Cc: Eric Anholt 
> Cc: Maarten Lankhorst 
> Cc: Harry Wentland 
> Cc: Leo Li 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: James (Qian) Wang 
> Cc: Liviu Dudau 
> Cc: Mali DP Maintainers 
> Cc: CK Hu 
> Cc: Philipp Zabel 
> Cc: Yannick Fertre 
> Cc: Philippe Cornu 
> Cc: Benjamin Gaignard 
> Cc: Vincent Abriou 
> Cc: Tomi Valkeinen 
> Cc: Boris Brezillon 
> Signed-off-by: Daniel Vetter Signed-off-by: Daniel 
> Vetter 

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

Reviewed-by: Matt Roper 

> ---
>  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
> +  * 0x == 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

Re: [PATCH] drm/gamma: Clarify gamma lut uapi

2019-03-29 Thread Lionel Landwerlin

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 0x.

Cc: Uma Shankar 
Cc: Ville Syrjälä 
Cc: Shashank Sharma 
Cc: "Kumar, Kiran S" 
Cc: Kausal Malladi 
Cc: Lionel Landwerlin 
Cc: Matt Roper 
Cc: Rob Bradford 
Cc: Daniel Stone 
Cc: Stefan Schake 
Cc: Eric Anholt 
Cc: Maarten Lankhorst 
Cc: Harry Wentland 
Cc: Leo Li 
Cc: amd-gfx@lists.freedesktop.org
Cc: James (Qian) Wang 
Cc: Liviu Dudau 
Cc: Mali DP Maintainers 
Cc: CK Hu 
Cc: Philipp Zabel 
Cc: Yannick Fertre 
Cc: Philippe Cornu 
Cc: Benjamin Gaignard 
Cc: Vincent Abriou 
Cc: Tomi Valkeinen 
Cc: Boris Brezillon 
Signed-off-by: Daniel Vetter Signed-off-by: Daniel Vetter 

---
  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
+* 0x == 1.0.
 */
__u16 red;
__u16 green;



Thanks, that was the intention when it was introduced.


Acked-by: Lionel Landwerlin 

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

Re: [PATCH] drm/gamma: Clarify gamma lut uapi

2019-03-29 Thread Liviu Dudau
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 0x.
> 
> Cc: Uma Shankar 
> Cc: Ville Syrjälä 
> Cc: Shashank Sharma 
> Cc: "Kumar, Kiran S" 
> Cc: Kausal Malladi 
> Cc: Lionel Landwerlin 
> Cc: Matt Roper 
> Cc: Rob Bradford 
> Cc: Daniel Stone 
> Cc: Stefan Schake 
> Cc: Eric Anholt 
> Cc: Maarten Lankhorst 
> Cc: Harry Wentland 
> Cc: Leo Li 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: James (Qian) Wang 
> Cc: Liviu Dudau 
> Cc: Mali DP Maintainers 
> Cc: CK Hu 
> Cc: Philipp Zabel 
> Cc: Yannick Fertre 
> Cc: Philippe Cornu 
> Cc: Benjamin Gaignard 
> Cc: Vincent Abriou 
> Cc: Tomi Valkeinen 
> Cc: Boris Brezillon 
> Signed-off-by: Daniel Vetter Signed-off-by: Daniel 
> Vetter 

Acked-by: Liviu Dudau 

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
> +  * 0x == 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!  /
  ---
¯\_(ツ)_/¯
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

[PATCH] drm/gamma: Clarify gamma lut uapi

2019-03-29 Thread 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 0x.

Cc: Uma Shankar 
Cc: Ville Syrjälä 
Cc: Shashank Sharma 
Cc: "Kumar, Kiran S" 
Cc: Kausal Malladi 
Cc: Lionel Landwerlin 
Cc: Matt Roper 
Cc: Rob Bradford 
Cc: Daniel Stone 
Cc: Stefan Schake 
Cc: Eric Anholt 
Cc: Maarten Lankhorst 
Cc: Harry Wentland 
Cc: Leo Li 
Cc: amd-gfx@lists.freedesktop.org
Cc: James (Qian) Wang 
Cc: Liviu Dudau 
Cc: Mali DP Maintainers 
Cc: CK Hu 
Cc: Philipp Zabel 
Cc: Yannick Fertre 
Cc: Philippe Cornu 
Cc: Benjamin Gaignard 
Cc: Vincent Abriou 
Cc: Tomi Valkeinen 
Cc: Boris Brezillon 
Signed-off-by: Daniel Vetter Signed-off-by: Daniel 
Vetter 
---
 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
+* 0x == 1.0.
 */
__u16 red;
__u16 green;
-- 
2.20.1

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