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 v3 1/5] media: vsp1: Define partition algorithm helper
Date: Thu, 18 Apr 2019 09:30:51 +0300 [thread overview]
Message-ID: <20190418063051.GE4806@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20190411161256.19607-2-kieran.bingham+renesas@ideasonboard.com>
Hi Kieran,
Thank you for the patch.
On Thu, Apr 11, 2019 at 05:12:52PM +0100, Kieran Bingham wrote:
> Provide a helper to describe when the partition algorithm is in use on a
> given pipeline. This improves readability to the purpose of the code,
s/ / /
> rather than obtusely checking the number of partitions.
>
> Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
> ---
> drivers/media/platform/vsp1/vsp1_pipe.c | 8 ++++++++
> drivers/media/platform/vsp1/vsp1_pipe.h | 1 +
> drivers/media/platform/vsp1/vsp1_rpf.c | 2 +-
> drivers/media/platform/vsp1/vsp1_video.c | 2 +-
> drivers/media/platform/vsp1/vsp1_wpf.c | 2 +-
> 5 files changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/media/platform/vsp1/vsp1_pipe.c b/drivers/media/platform/vsp1/vsp1_pipe.c
> index 54ff539ffea0..f1bd21a01bcd 100644
> --- a/drivers/media/platform/vsp1/vsp1_pipe.c
> +++ b/drivers/media/platform/vsp1/vsp1_pipe.c
> @@ -364,6 +364,14 @@ void vsp1_pipeline_propagate_alpha(struct vsp1_pipeline *pipe,
> vsp1_uds_set_alpha(pipe->uds, dlb, alpha);
> }
>
> +/*
> + * Identify if the partition algorithm is in use or not
s/$/./
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> + */
> +bool vsp1_pipeline_partitioned(struct vsp1_pipeline *pipe)
> +{
> + return pipe->partitions > 1;
> +}
> +
> /*
> * Propagate the partition calculations through the pipeline
> *
> diff --git a/drivers/media/platform/vsp1/vsp1_pipe.h b/drivers/media/platform/vsp1/vsp1_pipe.h
> index ae646c9ef337..dd8b2cdc6452 100644
> --- a/drivers/media/platform/vsp1/vsp1_pipe.h
> +++ b/drivers/media/platform/vsp1/vsp1_pipe.h
> @@ -164,6 +164,7 @@ void vsp1_pipeline_propagate_alpha(struct vsp1_pipeline *pipe,
> struct vsp1_dl_body *dlb,
> unsigned int alpha);
>
> +bool vsp1_pipeline_partitioned(struct vsp1_pipeline *pipe);
> void vsp1_pipeline_propagate_partition(struct vsp1_pipeline *pipe,
> struct vsp1_partition *partition,
> unsigned int index,
> diff --git a/drivers/media/platform/vsp1/vsp1_rpf.c b/drivers/media/platform/vsp1/vsp1_rpf.c
> index 616afa7e165f..ef9bf5dd55a0 100644
> --- a/drivers/media/platform/vsp1/vsp1_rpf.c
> +++ b/drivers/media/platform/vsp1/vsp1_rpf.c
> @@ -269,7 +269,7 @@ static void rpf_configure_partition(struct vsp1_entity *entity,
> * matching the expected partition window. Only 'left' and
> * 'width' need to be adjusted.
> */
> - if (pipe->partitions > 1) {
> + if (vsp1_pipeline_partitioned(pipe)) {
> crop.width = pipe->partition->rpf.width;
> crop.left += pipe->partition->rpf.left;
> }
> diff --git a/drivers/media/platform/vsp1/vsp1_video.c b/drivers/media/platform/vsp1/vsp1_video.c
> index 7ceaf3222145..ee2fb8261a6a 100644
> --- a/drivers/media/platform/vsp1/vsp1_video.c
> +++ b/drivers/media/platform/vsp1/vsp1_video.c
> @@ -201,7 +201,7 @@ static void vsp1_video_calculate_partition(struct vsp1_pipeline *pipe,
> RWPF_PAD_SINK);
>
> /* A single partition simply processes the output size in full. */
> - if (pipe->partitions <= 1) {
> + if (!vsp1_pipeline_partitioned(pipe)) {
> window.left = 0;
> window.width = format->width;
>
> diff --git a/drivers/media/platform/vsp1/vsp1_wpf.c b/drivers/media/platform/vsp1/vsp1_wpf.c
> index 32bb207b2007..9e8dbf99878b 100644
> --- a/drivers/media/platform/vsp1/vsp1_wpf.c
> +++ b/drivers/media/platform/vsp1/vsp1_wpf.c
> @@ -376,7 +376,7 @@ static void wpf_configure_partition(struct vsp1_entity *entity,
> * Cropping. The partition algorithm can split the image into
> * multiple slices.
> */
> - if (pipe->partitions > 1)
> + if (vsp1_pipeline_partitioned(pipe))
> width = pipe->partition->wpf.width;
>
> vsp1_wpf_write(wpf, dlb, VI6_WPF_HSZCLIP, VI6_WPF_SZCLIP_EN |
> --
> 2.19.1
>
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2019-04-18 6:31 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-11 16:12 [PATCH v3 0/5] media: vsp1: Phased partition overlap support Kieran Bingham
2019-04-11 16:12 ` [PATCH v3 1/5] media: vsp1: Define partition algorithm helper Kieran Bingham
2019-04-18 6:30 ` Laurent Pinchart [this message]
2019-04-11 16:12 ` [PATCH v3 2/5] media: vsp1: Initialise partition windows Kieran Bingham
2019-04-18 6:32 ` Laurent Pinchart
2019-05-07 10:20 ` Kieran Bingham
2019-04-11 16:12 ` [PATCH v3 3/5] media: vsp1: Document partition algorithm in code header Kieran Bingham
2019-04-18 6:33 ` Laurent Pinchart
2019-05-07 10:22 ` Kieran Bingham
2019-04-11 16:12 ` [PATCH v3 4/5] media: vsp1: Split out pre-filter multiplier Kieran Bingham
2019-04-18 6:37 ` Laurent Pinchart
2019-05-10 11:15 ` Kieran Bingham
2019-04-11 16:12 ` [PATCH v3 5/5] media: vsp1: Provide partition overlap algorithm Kieran Bingham
2019-04-18 12:42 ` Laurent Pinchart
2019-05-13 15:32 ` 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=20190418063051.GE4806@pendragon.ideasonboard.com \
--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