From patchwork Fri Jan 27 10:47:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Brian Starkey X-Patchwork-Id: 9541027 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D3C9F60429 for ; Fri, 27 Jan 2017 10:49:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CB8FC20649 for ; Fri, 27 Jan 2017 10:49:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C046B27FBB; Fri, 27 Jan 2017 10:49:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2599020649 for ; Fri, 27 Jan 2017 10:49:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DA7276ECF0; Fri, 27 Jan 2017 10:49:06 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from foss.arm.com (foss.arm.com [217.140.101.70]) by gabe.freedesktop.org (Postfix) with ESMTP id 8046E6ECEF for ; Fri, 27 Jan 2017 10:49:05 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3053B14F6; Fri, 27 Jan 2017 02:49:05 -0800 (PST) Received: from e106950-lin.cambridge.arm.com (e106950-lin.cambridge.arm.com [10.2.133.193]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 50CE53F318; Fri, 27 Jan 2017 02:49:04 -0800 (PST) From: Brian Starkey To: dri-devel@lists.freedesktop.org Subject: =?UTF-8?q?=5BPATCH=5D=20drm/color=3A=20Include=20CTM=20equations=20in=20kerneldoc?= Date: Fri, 27 Jan 2017 10:47:48 +0000 Message-Id: <1485514068-31435-1-git-send-email-brian.starkey@arm.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Cc: Daniel Vetter X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Explicitly state the expected CTM equations in the kerneldoc for the CTM property. Cc: Ville Syrjälä Cc: Lionel Landwerlin Cc: Daniel Vetter Signed-off-by: Brian Starkey --- 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