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: [PATCH 2/4] v4l: vsp1: Move vsp1_video_pipeline_setup_partitions() function
Date: Mon, 13 Feb 2017 21:23:51 +0200 [thread overview]
Message-ID: <9209013.DxhxRJN60N@avalon> (raw)
In-Reply-To: <1478283570-19688-3-git-send-email-kieran.bingham+renesas@ideasonboard.com>
Hi Kieran,
Thank you for the patch.
On Friday 04 Nov 2016 18:19:28 Kieran Bingham wrote:
> Separate the code change from the function move so that code changes can
> be clearly identified. This commit has no functional change.
>
> The partition algorithm functions will be changed, and
> vsp1_video_partition() will call vsp1_video_pipeline_setup_partitions().
> To prepare for that, move the function without any code change.
>
> Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
(assuming I don't conclude in my review of patches 3/4 and 4/4 that this isn't
needed :-))
> ---
> drivers/media/platform/vsp1/vsp1_video.c | 74 ++++++++++++++---------------
> 1 file changed, 37 insertions(+), 37 deletions(-)
>
> diff --git a/drivers/media/platform/vsp1/vsp1_video.c
> b/drivers/media/platform/vsp1/vsp1_video.c index d1d3413c6fdf..6d43c02bbc56
> 100644
> --- a/drivers/media/platform/vsp1/vsp1_video.c
> +++ b/drivers/media/platform/vsp1/vsp1_video.c
> @@ -175,43 +175,6 @@ static int __vsp1_video_try_format(struct vsp1_video
> *video, * VSP1 Partition Algorithm support
> */
>
> -static void vsp1_video_pipeline_setup_partitions(struct vsp1_pipeline
> *pipe) -{
> - struct vsp1_device *vsp1 = pipe->output->entity.vsp1;
> - const struct v4l2_mbus_framefmt *format;
> - struct vsp1_entity *entity;
> - unsigned int div_size;
> -
> - /*
> - * Partitions are computed on the size before rotation, use the format
> - * at the WPF sink.
> - */
> - format = vsp1_entity_get_pad_format(&pipe->output->entity,
> - pipe->output->entity.config,
> - RWPF_PAD_SINK);
> - div_size = format->width;
> -
> - /* Gen2 hardware doesn't require image partitioning. */
> - if (vsp1->info->gen == 2) {
> - pipe->div_size = div_size;
> - pipe->partitions = 1;
> - return;
> - }
> -
> - list_for_each_entry(entity, &pipe->entities, list_pipe) {
> - unsigned int entity_max = VSP1_VIDEO_MAX_WIDTH;
> -
> - if (entity->ops->max_width) {
> - entity_max = entity->ops->max_width(entity, pipe);
> - if (entity_max)
> - div_size = min(div_size, entity_max);
> - }
> - }
> -
> - pipe->div_size = div_size;
> - pipe->partitions = DIV_ROUND_UP(format->width, div_size);
> -}
> -
> /**
> * vsp1_video_partition - Calculate the active partition output window
> *
> @@ -286,6 +249,43 @@ static struct v4l2_rect vsp1_video_partition(struct
> vsp1_pipeline *pipe, return partition;
> }
>
> +static void vsp1_video_pipeline_setup_partitions(struct vsp1_pipeline
> *pipe) +{
> + struct vsp1_device *vsp1 = pipe->output->entity.vsp1;
> + const struct v4l2_mbus_framefmt *format;
> + struct vsp1_entity *entity;
> + unsigned int div_size;
> +
> + /*
> + * Partitions are computed on the size before rotation, use the format
> + * at the WPF sink.
> + */
> + format = vsp1_entity_get_pad_format(&pipe->output->entity,
> + pipe->output->entity.config,
> + RWPF_PAD_SINK);
> + div_size = format->width;
> +
> + /* Gen2 hardware doesn't require image partitioning. */
> + if (vsp1->info->gen == 2) {
> + pipe->div_size = div_size;
> + pipe->partitions = 1;
> + return;
> + }
> +
> + list_for_each_entry(entity, &pipe->entities, list_pipe) {
> + unsigned int entity_max = VSP1_VIDEO_MAX_WIDTH;
> +
> + if (entity->ops->max_width) {
> + entity_max = entity->ops->max_width(entity, pipe);
> + if (entity_max)
> + div_size = min(div_size, entity_max);
> + }
> + }
> +
> + pipe->div_size = div_size;
> + pipe->partitions = DIV_ROUND_UP(format->width, div_size);
> +}
> +
> /*
> ---------------------------------------------------------------------------
> -- * Pipeline Management
> */
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2017-02-13 19:23 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-04 18:19 [PATCH 0/4] vsp1 partition algorithm improvements Kieran Bingham
2016-11-04 18:19 ` [PATCH 1/4] v4l: vsp1: Implement partition algorithm restrictions Kieran Bingham
2017-02-13 19:17 ` Laurent Pinchart
2017-02-14 1:15 ` Kuninori Morimoto
2017-03-01 2:26 ` Kuninori Morimoto
2017-03-06 6:17 ` Kuninori Morimoto
2017-03-06 15:16 ` Laurent Pinchart
2017-03-06 17:07 ` Kieran Bingham
2017-05-09 15:45 ` Kieran Bingham
2016-11-04 18:19 ` [PATCH 2/4] v4l: vsp1: Move vsp1_video_pipeline_setup_partitions() function Kieran Bingham
2017-02-13 19:23 ` Laurent Pinchart [this message]
2016-11-04 18:19 ` [PATCH 3/4] v4l: vsp1: Calculate partition sizes at stream start Kieran Bingham
2017-02-13 21:21 ` Laurent Pinchart
2017-05-08 18:31 ` Kieran Bingham
2016-11-04 18:19 ` [PATCH 4/4] v4l: vsp1: Remove redundant context variables Kieran Bingham
2017-02-13 21:21 ` 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=9209013.DxhxRJN60N@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