aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2018-02-22 16:42:29 -0500
committerVille Syrjälä <ville.syrjala@linux.intel.com>2018-02-28 06:27:37 -0500
commit68824bb59d4892457401cdcd89e9bb3eef3ea780 (patch)
treecaa66e82e5ec9c61578723b9e0fd7306dd454b9d
parentdbe37dc31c7177f60518320e8f92cb337ad107dc (diff)
drm/uapi: The ctm matrix uses sign-magnitude representation
The documentation for the ctm matrix suggests a two's complement format, but at least the i915 implementation is using sign-magnitude instead. And looks like malidp is doing the same. Change the docs to match the current implementation, and change the type from __s64 to __u64 to drive the point home. Cc: dri-devel@lists.freedesktop.org Cc: Mihail Atanassov <mihail.atanassov@arm.com> Cc: Liviu Dudau <liviu.dudau@arm.com> Cc: Brian Starkey <brian.starkey@arm.com> Cc: Mali DP Maintainers <malidp@foss.arm.com> Cc: Johnson Lin <johnson.lin@intel.com> Cc: Uma Shankar <uma.shankar@intel.com> Cc: Shashank Sharma <shashank.sharma@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180222214232.6064-1-ville.syrjala@linux.intel.com Reviewed-by: Harry Wentland <harry.wentland@amd.com>
-rw-r--r--include/uapi/drm/drm_mode.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
index 2c575794fb52..b5d7d9e0eff5 100644
--- a/include/uapi/drm/drm_mode.h
+++ b/include/uapi/drm/drm_mode.h
@@ -598,8 +598,11 @@ struct drm_mode_crtc_lut {
598}; 598};
599 599
600struct drm_color_ctm { 600struct drm_color_ctm {
601 /* Conversion matrix in S31.32 format. */ 601 /*
602 __s64 matrix[9]; 602 * Conversion matrix in S31.32 sign-magnitude
603 * (not two's complement!) format.
604 */
605 __u64 matrix[9];
603}; 606};
604 607
605struct drm_color_lut { 608struct drm_color_lut {