From: Jacopo Mondi <jacopo+renesas@jmondi.org>
To: laurent.pinchart@ideasonboard.com, linux-renesas-soc@vger.kernel.org
Cc: Jacopo Mondi <jacopo+renesas@jmondi.org>,
VenkataRajesh.Kalakodima@in.bosch.com,
Harsha.ManjulaMallikarjun@in.bosch.com,
Jacopo Mondi <jacopo@jmondi.org>
Subject: [RFC 7/9] drm: rcar-du: group: Enable CMM unit
Date: Wed, 8 May 2019 19:34:26 +0200 [thread overview]
Message-ID: <20190508173428.22054-8-jacopo+renesas@jmondi.org> (raw)
In-Reply-To: <20190508173428.22054-1-jacopo+renesas@jmondi.org>
Enable the CMM units present in the group through the display unit
extensional function control group register DEFR7.
Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
---
drivers/gpu/drm/rcar-du/rcar_du_group.c | 8 ++++++++
drivers/gpu/drm/rcar-du/rcar_du_regs.h | 5 +++++
2 files changed, 13 insertions(+)
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_group.c b/drivers/gpu/drm/rcar-du/rcar_du_group.c
index 9eee47969e77..ce25e41b04bc 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_group.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_group.c
@@ -147,6 +147,14 @@ static void rcar_du_group_setup(struct rcar_du_group *rgrp)
rcar_du_group_setup_pins(rgrp);
+ if (rgrp->cmms_mask) {
+ u32 defr7 = DEFR7_CODE;
+ defr7 |= rgrp->cmms_mask & BIT(1) ? DEFR7_CMME1 : 0;
+ defr7 |= rgrp->cmms_mask & BIT(0) ? DEFR7_CMME0 : 0;
+
+ rcar_du_group_write(rgrp, DEFR7, defr7);
+ }
+
if (rcdu->info->gen >= 2) {
rcar_du_group_setup_defr8(rgrp);
rcar_du_group_setup_didsr(rgrp);
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_regs.h b/drivers/gpu/drm/rcar-du/rcar_du_regs.h
index bc87f080b170..fb9964949368 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_regs.h
+++ b/drivers/gpu/drm/rcar-du/rcar_du_regs.h
@@ -197,6 +197,11 @@
#define DEFR6_MLOS1 (1 << 2)
#define DEFR6_DEFAULT (DEFR6_CODE | DEFR6_TCNE1)
+#define DEFR7 0x000ec
+#define DEFR7_CODE (0x7779 << 16)
+#define DEFR7_CMME1 BIT(6)
+#define DEFR7_CMME0 BIT(4)
+
/* -----------------------------------------------------------------------------
* R8A7790-only Control Registers
*/
--
2.21.0
next prev parent reply other threads:[~2019-05-08 17:33 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-08 17:34 [RFC 0/9] drm: rcar-du: Add CMM support to M3-W (plumbing only) Jacopo Mondi
2019-05-08 17:34 ` [RFC 1/9] dt-bindings: display: renesas,cmm: Add R-Car CMM documentation Jacopo Mondi
2019-05-11 18:16 ` Laurent Pinchart
2019-05-28 12:37 ` Jacopo Mondi
2019-05-28 14:25 ` Laurent Pinchart
2019-05-28 14:50 ` Geert Uytterhoeven
2019-05-08 17:34 ` [RFC 2/9] dt-bindings: display, renesas,du: Document cmms property Jacopo Mondi
2019-05-11 18:23 ` Laurent Pinchart
2019-05-15 14:12 ` Jacopo Mondi
2019-05-16 10:40 ` Laurent Pinchart
2019-05-08 17:34 ` [RFC 3/9] [TODO] drm: rcar-du: Add basic support for CMM Jacopo Mondi
2019-05-11 18:45 ` Laurent Pinchart
2019-05-08 17:34 ` [RFC 4/9] drm: rcar-du: kms: Create CMM instances Jacopo Mondi
2019-05-11 18:56 ` Laurent Pinchart
2019-05-08 17:34 ` [RFC 5/9] drm: rcar-du: Add CMM support for M3-W Jacopo Mondi
2019-05-11 18:47 ` Laurent Pinchart
2019-05-08 17:34 ` [RFC 6/9] drm: rcar-du: crtc: Setup the CMM Jacopo Mondi
2019-05-11 18:59 ` Laurent Pinchart
2019-05-08 17:34 ` Jacopo Mondi [this message]
2019-05-11 19:02 ` [RFC 7/9] drm: rcar-du: group: Enable CMM unit Laurent Pinchart
2019-05-08 17:34 ` [RFC 8/9] clk: renesas: r8a7796: Add CMM clocks Jacopo Mondi
2019-05-09 9:12 ` Geert Uytterhoeven
2019-05-11 18:21 ` Laurent Pinchart
2019-05-21 8:47 ` Geert Uytterhoeven
2019-05-08 17:34 ` [RFC 9/9] arm64: dts: renesas: r8a7796: Add CMM units Jacopo Mondi
2019-05-11 18:25 ` 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=20190508173428.22054-8-jacopo+renesas@jmondi.org \
--to=jacopo+renesas@jmondi.org \
--cc=Harsha.ManjulaMallikarjun@in.bosch.com \
--cc=VenkataRajesh.Kalakodima@in.bosch.com \
--cc=jacopo@jmondi.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-renesas-soc@vger.kernel.org \
/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).