All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Jacopo Mondi <jacopo+renesas@jmondi.org>
Cc: linux-renesas-soc@vger.kernel.org,
	VenkataRajesh.Kalakodima@in.bosch.com,
	Harsha.ManjulaMallikarjun@in.bosch.com,
	Jacopo Mondi <jacopo@jmondi.org>
Subject: Re: [RFC 7/9] drm: rcar-du: group: Enable CMM unit
Date: Sat, 11 May 2019 22:02:17 +0300	[thread overview]
Message-ID: <20190511190217.GB16838@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20190508173428.22054-8-jacopo+renesas@jmondi.org>

Hi Jacopo,

Thank you for the patch.

On Wed, May 08, 2019 at 07:34:26PM +0200, Jacopo Mondi wrote:
> 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);
> +	}
> +

I would guard this with the CMM feature bit instead of cmms_mask, in
order to write the register with 0 if CMMs are not supported, just in
case it maye have been written to another value by the boot loader (or
before a warm reboot).

Apart from that,

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

>  	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
>   */

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2019-05-11 19:02 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 ` [RFC 7/9] drm: rcar-du: group: Enable CMM unit Jacopo Mondi
2019-05-11 19:02   ` Laurent Pinchart [this message]
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=20190511190217.GB16838@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=Harsha.ManjulaMallikarjun@in.bosch.com \
    --cc=VenkataRajesh.Kalakodima@in.bosch.com \
    --cc=jacopo+renesas@jmondi.org \
    --cc=jacopo@jmondi.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.