linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
	Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	DRI Development <dri-devel@lists.freedesktop.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
	<devicetree@vger.kernel.org>
Subject: Re: [PATCH v5] dt-bindings: display: renesas: du: Document optional reset properties
Date: Wed, 19 Feb 2020 18:48:38 +0200	[thread overview]
Message-ID: <20200219164838.GC5070@pendragon.ideasonboard.com> (raw)
In-Reply-To: <CAMuHMdVEW1pjg=mf55dzi0uJ6f-qQCGXzzvTikffX+JAeJQEsQ@mail.gmail.com>

Hi Geert,

On Wed, Feb 19, 2020 at 05:36:57PM +0100, Geert Uytterhoeven wrote:
> On Wed, Feb 19, 2020 at 5:04 PM Laurent Pinchart wrote:
> > On Fri, Feb 14, 2020 at 09:26:23AM +0100, Geert Uytterhoeven wrote:
> > > Document the optional properties for describing module resets, to
> > > support resetting display channels on R-Car Gen2 and Gen3.
> > >
> > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > > Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > > Acked-by: Rob Herring <robh@kernel.org>
> 
> > > --- a/Documentation/devicetree/bindings/display/renesas,du.txt
> > > +++ b/Documentation/devicetree/bindings/display/renesas,du.txt
> > > @@ -50,6 +50,14 @@ Required Properties:
> > >      VSP instance that serves the DU channel, and the channel index identifies
> > >      the LIF instance in that VSP.
> > >
> > > +Optional properties:
> > > +  - resets: A list of phandle + reset-specifier pairs, one for each entry in
> > > +    the reset-names property.
> > > +  - reset-names: Names of the resets. This property is model-dependent.
> > > +    - All but R8A7779 use one reset for a group of one or more successive
> > > +      channels. The resets must be named "du.x" with "x" being the numerical
> > > +      index of the lowest channel in the group.
> >
> > I've now reviewed the patches that add those properties to our .dtsi
> > files, and I wonder how we should handle the two SoCs that have DU0, DU1
> > and DU3, but not DU2. The reset resource is tied to a group of two
> > channels, so we would use du.0 and du.2 respectively, but that conflicts
> > with the above text.
> >
> > I'm trying to think about the implementation on the driver side, where
> > group resources are associated with a group object, whose index is
> > computed by dividing the channel number by 2. We could have a special
> > case in group initialization that uses du.3 instead of du.2 for the
> > second group.
> >
> > What do you think ? Probably overkill, and we should go for du.3 ?
> 
> The "division by 2" rule is valid for R-Car Gen3, but not for R-Car
> Gen2, where there is only a single reset for all channels.
> 
> Originally we had "du.0-1" and "du.2-3" (hmm, somehow I missed adding
> this to the changelog for the bindings,  but it is present in the
> changelog for the DTS files), but after switching to "du.0" and "du.2",
> I always envisioned implementing this by finding a "du.x" reset by
> looping from the current channel index to 0.  That algorithm works for all
> supported SoCs (irrespective of naming the second reset on R-Car H3-N
> and M3-N "du.2" or "du.3" ;-)
> 
> As per your comment about single resets, we could drop reset-names on
> R-Car Gen2, but doing so would mean another special case in the driver.

Probably not worth it indeed. We can handle all this in the driver,
let's keep it as-is.

-- 
Regards,

Laurent Pinchart

      reply	other threads:[~2020-02-19 16:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-14  8:26 [PATCH v5] dt-bindings: display: renesas: du: Document optional reset properties Geert Uytterhoeven
2020-02-14  9:35 ` Kieran Bingham
2020-02-19 16:04 ` Laurent Pinchart
2020-02-19 16:36   ` Geert Uytterhoeven
2020-02-19 16:48     ` Laurent Pinchart [this message]

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=20200219164838.GC5070@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=geert+renesas@glider.be \
    --cc=geert@linux-m68k.org \
    --cc=kieran.bingham+renesas@ideasonboard.com \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@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).