public inbox for dri-devel@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/color: Include CTM equations in kerneldoc
@ 2017-01-27 10:47 Brian Starkey
  2017-01-27 13:27 ` Ville Syrjälä
  0 siblings, 1 reply; 6+ messages in thread
From: Brian Starkey @ 2017-01-27 10:47 UTC (permalink / raw)
  To: dri-devel; +Cc: Daniel Vetter

Explicitly state the expected CTM equations in the kerneldoc for the CTM
property.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Brian Starkey <brian.starkey@arm.com>
---

Hi,

This captures the outcome of the discussion on #dri-devel yesterday
(2017-01-26):
https://people.freedesktop.org/~cbrill/dri-log/?channel=dri-devel&date=2017-01-26

I'm not sure about the stance on such explicit rst markup in kerneldoc,
but without it the equations are pretty unreadable in the rendered
output.

Cheers,
Brian

 drivers/gpu/drm/drm_color_mgmt.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/gpu/drm/drm_color_mgmt.c b/drivers/gpu/drm/drm_color_mgmt.c
index 789b4c65cd69..63f3a7404fa1 100644
--- a/drivers/gpu/drm/drm_color_mgmt.c
+++ b/drivers/gpu/drm/drm_color_mgmt.c
@@ -62,6 +62,16 @@
  *	unit/pass-thru matrix should be used. This is generally the driver
  *	boot-up state too.
  *
+ *	Given an input vector ``in[3]`` and an output vector ``out[3]``, the
+ *	transformation applied is:
+ *
+ *	| ``out[0] = matrix[0] * in[0] + matrix[1] * in[1] + matrix[2] * in[2];``
+ *	| ``out[1] = matrix[3] * in[0] + matrix[4] * in[1] + matrix[5] * in[2];``
+ *	| ``out[2] = matrix[6] * in[0] + matrix[7] * in[1] + matrix[8] * in[2];``
+ *
+ *	| For RGB formats, the input vector is assumed to be ``{ R, G, B }``.
+ *	| For YCbCr formats, the input vector is assumed to be ``{ Y, Cb, Cr }``.
+ *
  * “GAMMA_LUT”:
  *	Blob property to set the gamma lookup table (LUT) mapping pixel data
  *	after the transformation matrix to data sent to the connector. The
-- 
1.7.9.5

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-01-27 14:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-27 10:47 [PATCH] drm/color: Include CTM equations in kerneldoc Brian Starkey
2017-01-27 13:27 ` Ville Syrjälä
2017-01-27 13:50   ` Brian Starkey
2017-01-27 14:13     ` Ville Syrjälä
2017-01-27 14:31       ` Daniel Vetter
2017-01-27 14:40         ` Ville Syrjälä

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox