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.shan...@intel.com>
Cc: Ville Syrjälä <ville.syrj...@linux.intel.com>
Cc: Shashank Sharma <shashank.sha...@intel.com>
Cc: "Kumar, Kiran S" <kiran.s.ku...@intel.com>
Cc: Kausal Malladi <kausalmall...@gmail.com>
Cc: Lionel Landwerlin <lionel.g.landwer...@intel.com>
Cc: Matt Roper <matthew.d.ro...@intel.com>
Cc: Rob Bradford <robert.bradf...@intel.com>
Cc: Daniel Stone <dani...@collabora.com>
Cc: Stefan Schake <stsch...@gmail.com>
Cc: Eric Anholt <e...@anholt.net>
Cc: Maarten Lankhorst <maarten.lankho...@linux.intel.com>
Cc: Harry Wentland <harry.wentl...@amd.com>
Cc: Leo Li <sunpeng...@amd.com>
Cc: amd-...@lists.freedesktop.org
Cc: James (Qian) Wang <james.qian.w...@arm.com>
Cc: Liviu Dudau <liviu.du...@arm.com>
Cc: Mali DP Maintainers <mal...@foss.arm.com>
Cc: CK Hu <ck...@mediatek.com>
Cc: Philipp Zabel <p.za...@pengutronix.de>
Cc: Yannick Fertre <yannick.fer...@st.com>
Cc: Philippe Cornu <philippe.co...@st.com>
Cc: Benjamin Gaignard <benjamin.gaign...@linaro.org>
Cc: Vincent Abriou <vincent.abr...@st.com>
Cc: Tomi Valkeinen <tomi.valkei...@ti.com>
Cc: Boris Brezillon <bbrezil...@kernel.org>
Signed-off-by: Daniel Vetter <daniel.vet...@ffwll.ch>Signed-off-by: Daniel 
Vetter <daniel.vet...@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

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

Reply via email to