From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Cc: linux-renesas-soc@vger.kernel.org, linux-media@vger.kernel.org
Subject: Re: [PATCHv3 1/4] v4l: vsp1: Move vsp1_video_setup_pipeline()
Date: Wed, 14 Dec 2016 22:21:47 +0200 [thread overview]
Message-ID: <2672723.BZYFsk6GIb@avalon> (raw)
In-Reply-To: <1481651984-7687-2-git-send-email-kieran.bingham+renesas@ideasonboard.com>
Hi Kieran,
Thank you for the patch.
On Tuesday 13 Dec 2016 17:59:41 Kieran Bingham wrote:
> Move the static vsp1_video_setup_pipeline() function in preparation for
> the callee updates so that the vsp1_video_pipeline_run() call can
> configure pipelines following suspend resume actions.
>
> This commit is just a code move for clarity performing no functional
> change.
>
> Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
provided of course we still need this after the rework of 2/4.
> ---
> drivers/media/platform/vsp1/vsp1_video.c | 82 ++++++++++++++---------------
> 1 file changed, 41 insertions(+), 41 deletions(-)
>
> diff --git a/drivers/media/platform/vsp1/vsp1_video.c
> b/drivers/media/platform/vsp1/vsp1_video.c index d351b9c768d2..44b687c0b8df
> 100644
> --- a/drivers/media/platform/vsp1/vsp1_video.c
> +++ b/drivers/media/platform/vsp1/vsp1_video.c
> @@ -350,6 +350,47 @@ static void vsp1_video_frame_end(struct vsp1_pipeline
> *pipe, pipe->buffers_ready |= 1 << video->pipe_index;
> }
>
> +static int vsp1_video_setup_pipeline(struct vsp1_pipeline *pipe)
> +{
> + struct vsp1_entity *entity;
> +
> + /* Determine this pipelines sizes for image partitioning support. */
> + vsp1_video_pipeline_setup_partitions(pipe);
> +
> + /* Prepare the display list. */
> + pipe->dl = vsp1_dl_list_get(pipe->output->dlm);
> + if (!pipe->dl)
> + return -ENOMEM;
> +
> + if (pipe->uds) {
> + struct vsp1_uds *uds = to_uds(&pipe->uds->subdev);
> +
> + /* If a BRU is present in the pipeline before the UDS, the
alpha
> + * component doesn't need to be scaled as the BRU output alpha
> + * value is fixed to 255. Otherwise we need to scale the alpha
> + * component only when available at the input RPF.
> + */
> + if (pipe->uds_input->type == VSP1_ENTITY_BRU) {
> + uds->scale_alpha = false;
> + } else {
> + struct vsp1_rwpf *rpf =
> + to_rwpf(&pipe->uds_input->subdev);
> +
> + uds->scale_alpha = rpf->fmtinfo->alpha;
> + }
> + }
> +
> + list_for_each_entry(entity, &pipe->entities, list_pipe) {
> + vsp1_entity_route_setup(entity, pipe->dl);
> +
> + if (entity->ops->configure)
> + entity->ops->configure(entity, pipe, pipe->dl,
> + VSP1_ENTITY_PARAMS_INIT);
> + }
> +
> + return 0;
> +}
> +
> static void vsp1_video_pipeline_run_partition(struct vsp1_pipeline *pipe,
> struct vsp1_dl_list *dl)
> {
> @@ -747,47 +788,6 @@ static void vsp1_video_buffer_queue(struct vb2_buffer
> *vb) spin_unlock_irqrestore(&pipe->irqlock, flags);
> }
>
> -static int vsp1_video_setup_pipeline(struct vsp1_pipeline *pipe)
> -{
> - struct vsp1_entity *entity;
> -
> - /* Determine this pipelines sizes for image partitioning support. */
> - vsp1_video_pipeline_setup_partitions(pipe);
> -
> - /* Prepare the display list. */
> - pipe->dl = vsp1_dl_list_get(pipe->output->dlm);
> - if (!pipe->dl)
> - return -ENOMEM;
> -
> - if (pipe->uds) {
> - struct vsp1_uds *uds = to_uds(&pipe->uds->subdev);
> -
> - /* If a BRU is present in the pipeline before the UDS, the
alpha
> - * component doesn't need to be scaled as the BRU output alpha
> - * value is fixed to 255. Otherwise we need to scale the alpha
> - * component only when available at the input RPF.
> - */
> - if (pipe->uds_input->type == VSP1_ENTITY_BRU) {
> - uds->scale_alpha = false;
> - } else {
> - struct vsp1_rwpf *rpf =
> - to_rwpf(&pipe->uds_input->subdev);
> -
> - uds->scale_alpha = rpf->fmtinfo->alpha;
> - }
> - }
> -
> - list_for_each_entry(entity, &pipe->entities, list_pipe) {
> - vsp1_entity_route_setup(entity, pipe->dl);
> -
> - if (entity->ops->configure)
> - entity->ops->configure(entity, pipe, pipe->dl,
> - VSP1_ENTITY_PARAMS_INIT);
> - }
> -
> - return 0;
> -}
> -
> static int vsp1_video_start_streaming(struct vb2_queue *vq, unsigned int
> count) {
> struct vsp1_video *video = vb2_get_drv_priv(vq);
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2016-12-14 20:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-13 17:59 [PATCHv3 0/4] v4l: vsp1: Fix suspend/resume and race on M2M pipelines Kieran Bingham
2016-12-13 17:59 ` [PATCHv3 1/4] v4l: vsp1: Move vsp1_video_setup_pipeline() Kieran Bingham
2016-12-14 20:21 ` Laurent Pinchart [this message]
2016-12-13 17:59 ` [PATCHv3 2/4] v4l: vsp1: Refactor video pipeline configuration Kieran Bingham
2016-12-14 16:30 ` Laurent Pinchart
2016-12-15 11:50 ` Kieran Bingham
2017-01-06 11:11 ` Kieran Bingham
2016-12-13 17:59 ` [PATCHv3 3/4] v4l: vsp1: Use local display lists and remove global pipe->dl Kieran Bingham
2016-12-13 17:59 ` [PATCHv3 RFC 4/4] media: Catch null pipes on pipeline stop Kieran Bingham
2016-12-14 7:28 ` Sakari Ailus
2016-12-14 12:27 ` Kieran Bingham
2016-12-14 12:43 ` Sakari Ailus
2016-12-14 17:53 ` Kieran Bingham
2016-12-15 7:14 ` Sakari Ailus
2016-12-14 19:56 ` Kieran Bingham
2016-12-14 21:16 ` 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=2672723.BZYFsk6GIb@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=kieran.bingham+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;
as well as URLs for NNTP newsgroup(s).