linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jacopo Mondi <jacopo+renesas@jmondi.org>
To: laurent.pinchart@ideasonboard.com,
	kieran.bingham+renesas@ideasonboard.com, geert@linux-m68k.org,
	horms@verge.net.au, uli+renesas@fpond.eu,
	VenkataRajesh.Kalakodima@in.bosch.com
Cc: Jacopo Mondi <jacopo+renesas@jmondi.org>,
	airlied@linux.ie, daniel@ffwll.ch, koji.matsuoka.xm@renesas.com,
	muroya@ksk.co.jp, Harsha.ManjulaMallikarjun@in.bosch.com,
	ezequiel@collabora.com, seanpaul@chromium.org,
	linux-renesas-soc@vger.kernel.org,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: [PATCH v5 6/8] drm: rcar-du: crtc: Register GAMMA_LUT properties
Date: Tue, 15 Oct 2019 12:46:19 +0200	[thread overview]
Message-ID: <20191015104621.62514-7-jacopo+renesas@jmondi.org> (raw)
In-Reply-To: <20191015104621.62514-1-jacopo+renesas@jmondi.org>

Enable the GAMMA_LUT KMS property using the framework helpers to
register the property and set the associated gamma table maximum size.

Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: Ulrich Hecht <uli+renesas@fpond.eu>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
---
 drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
index 4bc50a3f4a00..603f9f716721 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
@@ -1154,6 +1154,7 @@ static const struct drm_crtc_funcs crtc_funcs_gen3 = {
 	.set_crc_source = rcar_du_crtc_set_crc_source,
 	.verify_crc_source = rcar_du_crtc_verify_crc_source,
 	.get_crc_sources = rcar_du_crtc_get_crc_sources,
+	.gamma_set = drm_atomic_helper_legacy_gamma_set,
 };
 
 /* -----------------------------------------------------------------------------
@@ -1277,6 +1278,9 @@ int rcar_du_crtc_create(struct rcar_du_group *rgrp, unsigned int swindex,
 	if (rcdu->cmms[swindex]) {
 		rcrtc->cmm = rcdu->cmms[swindex];
 		rgrp->cmms_mask |= BIT(hwindex % 2);
+
+		drm_mode_crtc_set_gamma_size(crtc, CM2_LUT_SIZE);
+		drm_crtc_enable_color_mgmt(crtc, 0, false, CM2_LUT_SIZE);
 	}
 
 	drm_crtc_helper_add(crtc, &crtc_helper_funcs);
-- 
2.23.0


  parent reply	other threads:[~2019-10-15 10:45 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-15 10:46 [PATCH v5 0/8] drm: rcar-du: Add Color Management Module (CMM) Jacopo Mondi
2019-10-15 10:46 ` [PATCH v5 1/8] dt-bindings: display: renesas,cmm: Add R-Car CMM documentation Jacopo Mondi
2019-10-15 11:38   ` Kieran Bingham
2019-10-15 14:03   ` Geert Uytterhoeven
2019-10-15 10:46 ` [PATCH v5 2/8] dt-bindings: display, renesas,du: Document cmms property Jacopo Mondi
2019-10-15 10:46 ` [PATCH v5 3/8] drm: rcar-du: Add support for CMM Jacopo Mondi
2019-10-15 11:53   ` Kieran Bingham
2019-10-15 13:17     ` Kieran Bingham
2019-10-15 13:33     ` Jacopo Mondi
2019-10-15 14:26       ` Kieran Bingham
2019-10-15 17:25   ` Laurent Pinchart
2019-10-15 10:46 ` [PATCH v5 4/8] drm: rcar-du: kms: Initialize CMM instances Jacopo Mondi
2019-10-15 10:46 ` [PATCH v5 5/8] drm: rcar-du: crtc: Control CMM operations Jacopo Mondi
2019-10-15 13:15   ` Kieran Bingham
2019-10-15 13:37     ` Jacopo Mondi
2019-10-15 17:54       ` Laurent Pinchart
2019-10-15 19:17         ` Jacopo Mondi
2019-10-15 19:53           ` Laurent Pinchart
2019-10-15 10:46 ` Jacopo Mondi [this message]
2019-10-15 10:46 ` [PATCH v5 7/8] arm64: dts: renesas: Add CMM units to Gen3 SoCs Jacopo Mondi
2019-10-15 12:52   ` Kieran Bingham
2019-10-15 18:06     ` Laurent Pinchart
2019-10-15 10:46 ` [PATCH v5 8/8] drm: rcar-du: kms: Expand comment in vsps parsing routine Jacopo Mondi
2019-10-15 13:04   ` Kieran Bingham
2019-10-15 16:54 ` [PATCH v5 0/8] drm: rcar-du: Add Color Management Module (CMM) Laurent Pinchart
2019-11-11 11:21 ` Kalakodima Venkata Rajesh (RBEI/ECF3)
2019-11-11 13:06   ` Jacopo Mondi
2020-05-27  7:15 ` Eugeniu Rosca
2020-05-27  7:34   ` Geert Uytterhoeven
2020-05-27  7:40     ` Gotthard Voellmeke
2020-05-27  7:44     ` Eugeniu Rosca
2020-06-05 13:29   ` Jacopo Mondi
2020-06-05 13:41     ` Eugeniu Rosca
2020-06-05 13:53       ` Jacopo Mondi
2020-06-07  2:41         ` Laurent Pinchart
2020-06-08  9:44           ` Eugeniu Rosca
2020-06-12 15:12             ` Jacopo Mondi
2020-06-15 14:17               ` Eugeniu Rosca
2020-07-17 15:06                 ` Jacopo Mondi
2020-06-09 14:29           ` Eugeniu Rosca
2020-06-12 15:00             ` Jacopo Mondi
2020-06-12 15:10               ` Laurent Pinchart
2020-06-12 15:36                 ` Eugeniu Rosca
2020-06-12 15:50                   ` Laurent Pinchart
2020-08-18  9:50                     ` Geert Uytterhoeven
2020-06-05 19:05     ` Laurent Pinchart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191015104621.62514-7-jacopo+renesas@jmondi.org \
    --to=jacopo+renesas@jmondi.org \
    --cc=Harsha.ManjulaMallikarjun@in.bosch.com \
    --cc=VenkataRajesh.Kalakodima@in.bosch.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ezequiel@collabora.com \
    --cc=geert@linux-m68k.org \
    --cc=horms@verge.net.au \
    --cc=kieran.bingham+renesas@ideasonboard.com \
    --cc=koji.matsuoka.xm@renesas.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=muroya@ksk.co.jp \
    --cc=seanpaul@chromium.org \
    --cc=uli+renesas@fpond.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).