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.
Showing the changes to include/uapi (1 of 1 file). Show all
Unified · Split
| @@ -598,8 +598,11 @@ struct drm_mode_crtc_lut { · 597 unmodified lines | ||
| 598 | 598 | }; |
| 599 | 599 | |
| 600 | 600 | struct drm_color_ctm { |
| 601 | − /* Conversion matrix in S31.32 format. */ | |
| 602 | − __s64 matrix[9]; | |
| 601 | + /* | |
| 602 | + * Conversion matrix in S31.32 sign-magnitude | |
| 603 | + * (not two's complement!) format. | |
| 604 | + */ | |
| 605 | + __u64 matrix[9]; | |
| 603 | 606 | }; |
| 604 | 607 | |
| 605 | 608 | struct drm_color_lut { |