From: Ulrich Hecht <uli@fpond.eu>
To: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
dri-devel@lists.freedesktop.org
Cc: linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
Kieran Bingham <kieran.bingham@ideasonboard.com>
Subject: Re: [PATCH v3 03/10] drm: rcar-du: Convert to the new VSP atomic API
Date: Tue, 18 Jun 2019 14:39:22 +0200 (CEST) [thread overview]
Message-ID: <285737736.787668.1560861562177@webmail.strato.com> (raw)
In-Reply-To: <20190617210930.6054-4-laurent.pinchart+renesas@ideasonboard.com>
> On June 17, 2019 at 11:09 PM Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> wrote:
>
>
> From: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
>
> The configuration API between the VSP and the DU has been updated to
> provide finer grain control over modesetting, and enablement.
>
> Split rcar_du_vsp_enable() into rcar_du_vsp_modeset() and
> rcar_du_vsp_enable() accordingly, and update each function to use the
> new VSP API.
>
> There are no further users of the deprecated vsp1_du_setup_lif() which
> can now be removed.
>
> Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> ---
> Changes since v2:
>
> - Minor formatting changes
> ---
> drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 4 +++-
> drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 20 ++++++++++++++------
> drivers/gpu/drm/rcar-du/rcar_du_vsp.h | 2 ++
> 3 files changed, 19 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
> index 2da46e3dc4ae..cccd6fe85749 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
> @@ -492,8 +492,10 @@ static void rcar_du_crtc_setup(struct rcar_du_crtc *rcrtc)
> rcar_du_group_write(rcrtc->group, rcrtc->index % 2 ? DS2PR : DS1PR, 0);
>
> /* Enable the VSP compositor. */
> - if (rcar_du_has(rcrtc->dev, RCAR_DU_FEATURE_VSP1_SOURCE))
> + if (rcar_du_has(rcrtc->dev, RCAR_DU_FEATURE_VSP1_SOURCE)) {
> + rcar_du_vsp_modeset(rcrtc);
> rcar_du_vsp_enable(rcrtc);
> + }
>
> /* Turn vertical blanking interrupt reporting on. */
> drm_crtc_vblank_on(&rcrtc->crtc);
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
> index 5e4faf258c31..3d007d38d7c1 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
> @@ -44,16 +44,14 @@ static void rcar_du_vsp_complete(void *private, unsigned int status, u32 crc)
> drm_crtc_add_crc_entry(&crtc->crtc, false, 0, &crc);
> }
>
> -void rcar_du_vsp_enable(struct rcar_du_crtc *crtc)
> +void rcar_du_vsp_modeset(struct rcar_du_crtc *crtc)
> {
> const struct drm_display_mode *mode = &crtc->crtc.state->adjusted_mode;
> struct rcar_du_device *rcdu = crtc->dev;
> - struct vsp1_du_lif_config cfg = {
> + struct vsp1_du_modeset_config cfg = {
> .width = mode->hdisplay,
> .height = mode->vdisplay,
> .interlaced = mode->flags & DRM_MODE_FLAG_INTERLACE,
> - .callback = rcar_du_vsp_complete,
> - .callback_data = crtc,
> };
> struct rcar_du_plane_state state = {
> .state = {
> @@ -90,12 +88,22 @@ void rcar_du_vsp_enable(struct rcar_du_crtc *crtc)
> */
> crtc->group->need_restart = true;
>
> - vsp1_du_setup_lif(crtc->vsp->vsp, crtc->vsp_pipe, &cfg);
> + vsp1_du_atomic_modeset(crtc->vsp->vsp, crtc->vsp_pipe, &cfg);
> +}
> +
> +void rcar_du_vsp_enable(struct rcar_du_crtc *crtc)
> +{
> + struct vsp1_du_enable_config cfg = {
> + .callback = rcar_du_vsp_complete,
> + .callback_data = crtc,
> + };
> +
> + vsp1_du_atomic_enable(crtc->vsp->vsp, crtc->vsp_pipe, &cfg);
> }
>
> void rcar_du_vsp_disable(struct rcar_du_crtc *crtc)
> {
> - vsp1_du_setup_lif(crtc->vsp->vsp, crtc->vsp_pipe, NULL);
> + vsp1_du_atomic_disable(crtc->vsp->vsp, crtc->vsp_pipe);
> }
>
> void rcar_du_vsp_atomic_begin(struct rcar_du_crtc *crtc)
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.h b/drivers/gpu/drm/rcar-du/rcar_du_vsp.h
> index 9b4724159378..a6f6bb4690f2 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.h
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.h
> @@ -58,6 +58,7 @@ to_rcar_vsp_plane_state(struct drm_plane_state *state)
> #ifdef CONFIG_DRM_RCAR_VSP
> int rcar_du_vsp_init(struct rcar_du_vsp *vsp, struct device_node *np,
> unsigned int crtcs);
> +void rcar_du_vsp_modeset(struct rcar_du_crtc *crtc);
> void rcar_du_vsp_enable(struct rcar_du_crtc *crtc);
> void rcar_du_vsp_disable(struct rcar_du_crtc *crtc);
> void rcar_du_vsp_atomic_begin(struct rcar_du_crtc *crtc);
> @@ -73,6 +74,7 @@ static inline int rcar_du_vsp_init(struct rcar_du_vsp *vsp,
> {
> return -ENXIO;
> }
> +static inlinc void rcar_du_vsp_modeset(struct rcar_du_crtc *crtc) { };
> static inline void rcar_du_vsp_enable(struct rcar_du_crtc *crtc) { };
> static inline void rcar_du_vsp_disable(struct rcar_du_crtc *crtc) { };
> static inline void rcar_du_vsp_atomic_begin(struct rcar_du_crtc *crtc) { };
> --
> Regards,
>
> Laurent Pinchart
>
Reviewed-by: Ulrich Hecht <uli+renesas@fpond.eu>
CU
Uli
next prev parent reply other threads:[~2019-06-18 12:39 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-17 21:09 [PATCH v3 00/10] drm: rcar-du: Rework CRTC and groups for atomic commits Laurent Pinchart
2019-06-17 21:09 ` [PATCH v3 01/10] media: vsp1: drm: Split vsp1_du_setup_lif() Laurent Pinchart
2019-06-18 12:32 ` Ulrich Hecht
2019-06-18 13:46 ` Laurent Pinchart
2019-06-17 21:09 ` [PATCH v3 02/10] media: vsp1: drm: Don't configure hardware when the pipeline is disabled Laurent Pinchart
2019-06-18 12:31 ` Kieran Bingham
2019-06-18 12:35 ` Ulrich Hecht
2019-06-17 21:09 ` [PATCH v3 03/10] drm: rcar-du: Convert to the new VSP atomic API Laurent Pinchart
2019-06-18 12:39 ` Ulrich Hecht [this message]
2019-06-17 21:09 ` [PATCH v3 04/10] media: vsp1: drm: Remove vsp1_du_setup_lif() Laurent Pinchart
2019-06-18 12:40 ` Ulrich Hecht
2019-06-17 21:09 ` [PATCH v3 05/10] drm: rcar-du: Handle CRTC standby from commit tail handler Laurent Pinchart
2019-06-18 13:03 ` Ulrich Hecht
2019-06-17 21:09 ` [PATCH v3 06/10] drm: rcar-du: Handle CRTC configuration " Laurent Pinchart
2019-06-18 13:11 ` Ulrich Hecht
2019-06-17 21:09 ` [PATCH v3 07/10] drm: rcar-du: Provide for_each_group helper Laurent Pinchart
2019-06-18 10:43 ` Kieran Bingham
2019-06-18 13:15 ` Ulrich Hecht
2019-06-17 21:09 ` [PATCH v3 08/10] drm: rcar-du: Create a group state object Laurent Pinchart
2019-06-18 13:36 ` Ulrich Hecht
2019-06-17 21:09 ` [PATCH v3 09/10] drm: rcar-du: Perform group setup from the atomic tail handler Laurent Pinchart
2019-06-18 13:46 ` Ulrich Hecht
2019-06-17 21:09 ` [PATCH v3 10/10] drm: rcar-du: Centralise routing configuration in commit " Laurent Pinchart
2019-06-18 14:12 ` Ulrich Hecht
2019-06-18 14:41 ` Laurent Pinchart
2019-06-18 17:16 ` [PATCH v3 00/10] drm: rcar-du: Rework CRTC and groups for atomic commits Kieran Bingham
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=285737736.787668.1560861562177@webmail.strato.com \
--to=uli@fpond.eu \
--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