Commit 68824bb5 authored by Ville Syrjälä's avatar Ville Syrjälä

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: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180222214232.6064-1-ville.syrjala@linux.intel.comReviewed-by: default avatarHarry Wentland <harry.wentland@amd.com>
parent dbe37dc3
...@@ -598,8 +598,11 @@ struct drm_mode_crtc_lut { ...@@ -598,8 +598,11 @@ struct drm_mode_crtc_lut {
}; };
struct drm_color_ctm { struct drm_color_ctm {
/* Conversion matrix in S31.32 format. */ /*
__s64 matrix[9]; * Conversion matrix in S31.32 sign-magnitude
* (not two's complement!) format.
*/
__u64 matrix[9];
}; };
struct drm_color_lut { struct drm_color_lut {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment