From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: kieran.bingham@ideasonboard.com
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
dri-devel@lists.freedesktop.org,
linux-renesas-soc@vger.kernel.org, linux-media@vger.kernel.org
Subject: Re: [PATCH v2 2/3] drm: rcar-du: Fix planes to CRTC assignment when using the VSP
Date: Wed, 12 Jul 2017 15:13:09 +0300 [thread overview]
Message-ID: <9618964.U0u9UE4uZN@avalon> (raw)
In-Reply-To: <23b0037c-defe-4e95-771b-ad99b86d5c26@ideasonboard.com>
Hi Kieran,
On Wednesday 12 Jul 2017 11:30:19 Kieran Bingham wrote:
> On 11/07/17 23:29, Laurent Pinchart wrote:
> > The DU can compose the output of a VSP with other planes on Gen2
> > hardware, and of two VSPs on Gen3 hardware. Neither of these features
> > are supported by the driver, and the current implementation always
> > assigns planes to CRTCs the same way.
> >
> > Simplify the implementation by configuring plane assignment when setting
> > up DU groups, instead of recomputing it for every atomic plane update.
> > This allows skipping the wait for vertical blanking when stopping a
> > CRTC, as there's no need to reconfigure plane assignment at that point.
> >
> > Signed-off-by: Laurent Pinchart
> > <laurent.pinchart+renesas@ideasonboard.com>
>
> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
>
> > ---
> >
> > drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 31 ++++++++++++++-------------
> > drivers/gpu/drm/rcar-du/rcar_du_group.c | 12 ++++++++++++
> > drivers/gpu/drm/rcar-du/rcar_du_kms.c | 28 +++++++++++++++++-----------
> > drivers/gpu/drm/rcar-du/rcar_du_plane.c | 10 +---------
> > drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 9 ---------
> > 5 files changed, 46 insertions(+), 44 deletions(-)
[snip]
> > diff --git a/drivers/gpu/drm/rcar-du/rcar_du_group.c
> > b/drivers/gpu/drm/rcar-du/rcar_du_group.c index
> > 00d5f470d377..d26b647207b8 100644
> > --- a/drivers/gpu/drm/rcar-du/rcar_du_group.c
> > +++ b/drivers/gpu/drm/rcar-du/rcar_du_group.c
> > @@ -126,6 +126,18 @@ static void rcar_du_group_setup(struct rcar_du_group
> > *rgrp)>
> > if (rcdu->info->gen >= 3)
> > rcar_du_group_write(rgrp, DEFR10, DEFR10_CODE |
DEFR10_DEFE10);
> >
> > + if (rcar_du_has(rcdu, RCAR_DU_FEATURE_VSP1_SOURCE)) {
> > + /*
> > + * The CRTCs can compose the output of a VSP with other planes
> > + * on Gen2 hardware, and of two VSPs on Gen3 hardware. Neither
> > + * of these features are supported by the driver, so we
hardcode
> > + * plane assignment to CRTCs when setting the group up to
avoid
> > + * the need to restart then group when setting planes up.
>
> Minor nits in comment:
>
> /restart then group/restart the group/
>
> I would also possibly swap the final 'planes up' as 'up planes' if you
> update here anyway:
>
> * so we hardcode plane assignment to CRTCs when setting the group up to
> avoid
> * the need to restart the group when setting up planes.
>
> Up to you of course :)
Thanks, I've fixed both, and also replaced "setting the group up" with
"setting up the group".
> > + */
> > + rcar_du_group_write(rgrp, DS1PR, 1);
> > + rcar_du_group_write(rgrp, DS2PR, rcdu->info->gen >= 3 ? 3 :
2);
>
> whew ... that DS2PR indexing change from g2 to g3 looks annoying ... I had
> to write out the logic tables on paper to verify the change here from the
> previous code.
That's also how I wrote the code :-)
> > + }
> > +
> >
> > /*
> >
> > * Use DS1PR and DS2PR to configure planes priorities and connects the
> > * superposition 0 to DU0 pins. DU1 pins will be configured
dynamically.
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2017-07-12 12:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-11 22:29 [PATCH v2 0/2] drm: rcar-du: Repair vblank event handling Laurent Pinchart
2017-07-11 22:29 ` [PATCH v2 1/3] drm: rcar-du: Use the VBK interrupt for vblank events Laurent Pinchart
2017-07-12 10:34 ` Kieran Bingham
2017-07-11 22:29 ` [PATCH v2 2/3] drm: rcar-du: Fix planes to CRTC assignment when using the VSP Laurent Pinchart
2017-07-12 10:30 ` Kieran Bingham
2017-07-12 12:13 ` Laurent Pinchart [this message]
2017-07-11 22:29 ` [PATCH v2 3/3] drm: rcar-du: Repair vblank for DRM page flips " Laurent Pinchart
2017-07-20 14:22 ` Mauro Carvalho Chehab
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=9618964.U0u9UE4uZN@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kieran.bingham@ideasonboard.com \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linux-media@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox