From: Kieran Bingham <kieran.bingham@ideasonboard.com> 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 Subject: Re: [PATCH v3 02/10] media: vsp1: drm: Don't configure hardware when the pipeline is disabled Date: Tue, 18 Jun 2019 13:31:49 +0100 [thread overview] Message-ID: <3f59dd31-33bc-50ab-6bb5-c7c332e4291b@ideasonboard.com> (raw) In-Reply-To: <20190617210930.6054-3-laurent.pinchart+renesas@ideasonboard.com> Hi Laurent, On 17/06/2019 22:09, Laurent Pinchart wrote: > The vsp1_du_atomic_flush() function calls vsp1_du_pipeline_configure() > to configure the hardware pipeline. The function is currently guaranteed > to be called with the pipeline enabled, but this will change by future > rework of the DU driver. Guard the hardware configuration to skip it > when the pipeline is disabled. The hardware will be configured the next > time the pipeline gets enabled. Aha, Yes, I think this now makes sense to why I was still getting hangs! Thanks for the fix! > Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> > --- > drivers/media/platform/vsp1/vsp1_drm.c | 13 ++++++++++++- > drivers/media/platform/vsp1/vsp1_drm.h | 2 ++ > 2 files changed, 14 insertions(+), 1 deletion(-) > > diff --git a/drivers/media/platform/vsp1/vsp1_drm.c b/drivers/media/platform/vsp1/vsp1_drm.c > index 7957e1439de0..900465caf1bf 100644 > --- a/drivers/media/platform/vsp1/vsp1_drm.c > +++ b/drivers/media/platform/vsp1/vsp1_drm.c > @@ -723,6 +723,8 @@ int vsp1_du_atomic_enable(struct device *dev, unsigned int pipe_index, > /* Configure all entities in the pipeline. */ > vsp1_du_pipeline_configure(pipe); > > + drm_pipe->enabled = true; > + > unlock: > mutex_unlock(&vsp1->drm->lock); > > @@ -800,6 +802,8 @@ int vsp1_du_atomic_disable(struct device *dev, unsigned int pipe_index) > pipe->brx->pipe = NULL; > pipe->brx = NULL; > > + drm_pipe->enabled = false; > + > mutex_unlock(&vsp1->drm->lock); > > vsp1_dlm_reset(pipe->output->dlm); > @@ -992,7 +996,14 @@ void vsp1_du_atomic_flush(struct device *dev, unsigned int pipe_index, > } > > vsp1_du_pipeline_setup_inputs(vsp1, pipe); > - vsp1_du_pipeline_configure(pipe); > + > + /* > + * We may get called before the pipeline gets enabled, postpone > + * configuration in that case. vsp1_du_pipeline_configure() will be > + * called from vsp1_du_atomic_enable(). > + */ > + if (drm_pipe->enabled) > + vsp1_du_pipeline_configure(pipe); > > done: > mutex_unlock(&vsp1->drm->lock); > diff --git a/drivers/media/platform/vsp1/vsp1_drm.h b/drivers/media/platform/vsp1/vsp1_drm.h > index e85ad4366fbb..d780dafc1324 100644 > --- a/drivers/media/platform/vsp1/vsp1_drm.h > +++ b/drivers/media/platform/vsp1/vsp1_drm.h > @@ -20,6 +20,7 @@ > /** > * vsp1_drm_pipeline - State for the API exposed to the DRM driver > * @pipe: the VSP1 pipeline used for display > + * @enabled: true if the pipeline is enabled > * @width: output display width > * @height: output display height > * @force_brx_release: when set, release the BRx during the next reconfiguration > @@ -31,6 +32,7 @@ > */ > struct vsp1_drm_pipeline { > struct vsp1_pipeline pipe; > + bool enabled; > > unsigned int width; > unsigned int height; > -- Regards -- Kieran
WARNING: multiple messages have this Message-ID (diff)
From: Kieran Bingham <kieran.bingham@ideasonboard.com> To: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>, dri-devel@lists.freedesktop.org Cc: linux-renesas-soc@vger.kernel.org, linux-media@vger.kernel.org Subject: Re: [PATCH v3 02/10] media: vsp1: drm: Don't configure hardware when the pipeline is disabled Date: Tue, 18 Jun 2019 13:31:49 +0100 [thread overview] Message-ID: <3f59dd31-33bc-50ab-6bb5-c7c332e4291b@ideasonboard.com> (raw) In-Reply-To: <20190617210930.6054-3-laurent.pinchart+renesas@ideasonboard.com> Hi Laurent, On 17/06/2019 22:09, Laurent Pinchart wrote: > The vsp1_du_atomic_flush() function calls vsp1_du_pipeline_configure() > to configure the hardware pipeline. The function is currently guaranteed > to be called with the pipeline enabled, but this will change by future > rework of the DU driver. Guard the hardware configuration to skip it > when the pipeline is disabled. The hardware will be configured the next > time the pipeline gets enabled. Aha, Yes, I think this now makes sense to why I was still getting hangs! Thanks for the fix! > Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> > --- > drivers/media/platform/vsp1/vsp1_drm.c | 13 ++++++++++++- > drivers/media/platform/vsp1/vsp1_drm.h | 2 ++ > 2 files changed, 14 insertions(+), 1 deletion(-) > > diff --git a/drivers/media/platform/vsp1/vsp1_drm.c b/drivers/media/platform/vsp1/vsp1_drm.c > index 7957e1439de0..900465caf1bf 100644 > --- a/drivers/media/platform/vsp1/vsp1_drm.c > +++ b/drivers/media/platform/vsp1/vsp1_drm.c > @@ -723,6 +723,8 @@ int vsp1_du_atomic_enable(struct device *dev, unsigned int pipe_index, > /* Configure all entities in the pipeline. */ > vsp1_du_pipeline_configure(pipe); > > + drm_pipe->enabled = true; > + > unlock: > mutex_unlock(&vsp1->drm->lock); > > @@ -800,6 +802,8 @@ int vsp1_du_atomic_disable(struct device *dev, unsigned int pipe_index) > pipe->brx->pipe = NULL; > pipe->brx = NULL; > > + drm_pipe->enabled = false; > + > mutex_unlock(&vsp1->drm->lock); > > vsp1_dlm_reset(pipe->output->dlm); > @@ -992,7 +996,14 @@ void vsp1_du_atomic_flush(struct device *dev, unsigned int pipe_index, > } > > vsp1_du_pipeline_setup_inputs(vsp1, pipe); > - vsp1_du_pipeline_configure(pipe); > + > + /* > + * We may get called before the pipeline gets enabled, postpone > + * configuration in that case. vsp1_du_pipeline_configure() will be > + * called from vsp1_du_atomic_enable(). > + */ > + if (drm_pipe->enabled) > + vsp1_du_pipeline_configure(pipe); > > done: > mutex_unlock(&vsp1->drm->lock); > diff --git a/drivers/media/platform/vsp1/vsp1_drm.h b/drivers/media/platform/vsp1/vsp1_drm.h > index e85ad4366fbb..d780dafc1324 100644 > --- a/drivers/media/platform/vsp1/vsp1_drm.h > +++ b/drivers/media/platform/vsp1/vsp1_drm.h > @@ -20,6 +20,7 @@ > /** > * vsp1_drm_pipeline - State for the API exposed to the DRM driver > * @pipe: the VSP1 pipeline used for display > + * @enabled: true if the pipeline is enabled > * @width: output display width > * @height: output display height > * @force_brx_release: when set, release the BRx during the next reconfiguration > @@ -31,6 +32,7 @@ > */ > struct vsp1_drm_pipeline { > struct vsp1_pipeline pipe; > + bool enabled; > > unsigned int width; > unsigned int height; > -- Regards -- Kieran _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-06-18 12:31 UTC|newest] Thread overview: 52+ 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 ` Laurent Pinchart 2019-06-17 21:09 ` [PATCH v3 01/10] media: vsp1: drm: Split vsp1_du_setup_lif() Laurent Pinchart 2019-06-17 21:09 ` Laurent Pinchart 2019-06-18 12:32 ` Ulrich Hecht 2019-06-18 12:32 ` Ulrich Hecht 2019-06-18 13:46 ` Laurent Pinchart 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-17 21:09 ` Laurent Pinchart 2019-06-18 12:31 ` Kieran Bingham [this message] 2019-06-18 12:31 ` Kieran Bingham 2019-06-18 12:35 ` Ulrich Hecht 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-17 21:09 ` Laurent Pinchart 2019-06-18 12:39 ` Ulrich Hecht 2019-06-18 12:39 ` Ulrich Hecht 2019-06-17 21:09 ` [PATCH v3 04/10] media: vsp1: drm: Remove vsp1_du_setup_lif() Laurent Pinchart 2019-06-17 21:09 ` Laurent Pinchart 2019-06-18 12:40 ` Ulrich Hecht 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-17 21:09 ` Laurent Pinchart 2019-06-18 13:03 ` Ulrich Hecht 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-17 21:09 ` Laurent Pinchart 2019-06-18 13:11 ` Ulrich Hecht 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-17 21:09 ` Laurent Pinchart 2019-06-18 10:43 ` Kieran Bingham 2019-06-18 10:43 ` Kieran Bingham 2019-06-18 13:15 ` Ulrich Hecht 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-17 21:09 ` Laurent Pinchart 2019-06-18 13:36 ` Ulrich Hecht 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-17 21:09 ` Laurent Pinchart 2019-06-18 13:46 ` Ulrich Hecht 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-17 21:09 ` Laurent Pinchart 2019-06-18 14:12 ` Ulrich Hecht 2019-06-18 14:12 ` Ulrich Hecht 2019-06-18 14:41 ` Laurent Pinchart 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 2019-06-18 17:16 ` 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=3f59dd31-33bc-50ab-6bb5-c7c332e4291b@ideasonboard.com \ --to=kieran.bingham@ideasonboard.com \ --cc=dri-devel@lists.freedesktop.org \ --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: linkBe 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.