From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Cc: linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
kieran.bingham@ideasonboard.com
Subject: Re: [PATCH 2/8] v4l: vsp1: Track the SRU entity in the pipeline
Date: Mon, 13 Feb 2017 23:36:38 +0200 [thread overview]
Message-ID: <1593556.4hIcOfm2vc@avalon> (raw)
In-Reply-To: <8ad9d316c05ab254b65ad5230fb9232325e783ec.1486758327.git-series.kieran.bingham+renesas@ideasonboard.com>
Hi Kieran,
Thank you for the patch.
On Friday 10 Feb 2017 20:27:30 Kieran Bingham wrote:
> The UDS and other entities are already tracked directly through the
> pipeline object. To follow the design pattern, and allow us to reference
> the SRU convert the usage of 'sru_found'
I propose squashing this into "v4l: vsp1: Implement partition algorithm
restrictions" as it hasn't been merged yet. Or, given that that patch requires
more work, we can also reorder them to merge this series first.
> Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
> ---
> drivers/media/platform/vsp1/vsp1_pipe.h | 2 ++
> drivers/media/platform/vsp1/vsp1_video.c | 11 ++++++++---
> 2 files changed, 10 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/media/platform/vsp1/vsp1_pipe.h
> b/drivers/media/platform/vsp1/vsp1_pipe.h index bc419ef48d8d..5aa31143ce59
> 100644
> --- a/drivers/media/platform/vsp1/vsp1_pipe.h
> +++ b/drivers/media/platform/vsp1/vsp1_pipe.h
> @@ -76,6 +76,7 @@ enum vsp1_pipeline_state {
> * @output: WPF at the output of the pipeline
> * @bru: BRU entity, if present
> * @lif: LIF entity, if present
> + * @sru: SRU entity, if present
> * @uds: UDS entity, if present
> * @uds_input: entity at the input of the UDS, if the UDS is present
> * @entities: list of entities in the pipeline
> @@ -104,6 +105,7 @@ struct vsp1_pipeline {
> struct vsp1_rwpf *output;
> struct vsp1_entity *bru;
> struct vsp1_entity *lif;
> + struct vsp1_entity *sru;
> struct vsp1_entity *uds;
> struct vsp1_entity *uds_input;
>
> diff --git a/drivers/media/platform/vsp1/vsp1_video.c
> b/drivers/media/platform/vsp1/vsp1_video.c index e2f242e7f0fa..be9c860b1c04
> 100644
> --- a/drivers/media/platform/vsp1/vsp1_video.c
> +++ b/drivers/media/platform/vsp1/vsp1_video.c
> @@ -473,7 +473,6 @@ static int vsp1_video_pipeline_build_branch(struct
> vsp1_pipeline *pipe, struct vsp1_entity *entity;
> struct media_pad *pad;
> bool bru_found = false;
> - bool sru_found = false;
> int ret;
>
> ret = media_entity_enum_init(&ent_enum, &input->entity.vsp1-
>media_dev);
> @@ -523,6 +522,12 @@ static int vsp1_video_pipeline_build_branch(struct
> vsp1_pipeline *pipe, if (entity->type == VSP1_ENTITY_SRU) {
> struct vsp1_sru *sru = to_sru(&entity->subdev);
>
> + /* SRU can't be chained. */
> + if (pipe->sru) {
> + ret = -EPIPE;
> + goto out;
> + }
You can drop this, there's at most one SRU per VSP instance.
> +
> /*
> * Gen3 partition algorithm restricts SRU double-
scaled
> * resolution if it is connected after a UDS entity
> @@ -530,7 +535,7 @@ static int vsp1_video_pipeline_build_branch(struct
> vsp1_pipeline *pipe, if (vsp1->info->gen == 3 && pipe->uds)
> sru->force_identity_mode = true;
>
> - sru_found = true;
> + pipe->sru = entity;
> }
>
> if (entity->type == VSP1_ENTITY_UDS) {
> @@ -546,7 +551,7 @@ static int vsp1_video_pipeline_build_branch(struct
> vsp1_pipeline *pipe, * SRU on Gen3 will always engage the partition
> * algorithm
> */
> - if (vsp1->info->gen == 3 && sru_found) {
> + if (vsp1->info->gen == 3 && pipe->sru) {
> ret = -EPIPE;
> goto out;
> }
You need to update vsp1_pipeline_reset() as well.
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2017-02-13 21:36 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-10 20:27 [PATCH 0/8] v4l: vsp1: Partition phase developments Kieran Bingham
2017-02-10 20:27 ` [PATCH 1/8] v4l: vsp1: Provide UDS register updates Kieran Bingham
2017-02-13 21:30 ` Laurent Pinchart
2017-02-10 20:27 ` [PATCH 2/8] v4l: vsp1: Track the SRU entity in the pipeline Kieran Bingham
2017-02-13 21:36 ` Laurent Pinchart [this message]
2017-02-10 20:27 ` [PATCH 3/8] v4l: vsp1: Correct image partition parameters Kieran Bingham
2017-02-13 21:45 ` Laurent Pinchart
2017-02-10 20:27 ` [PATCH 4/8] v4l: vsp1: Move partition rectangles to struct Kieran Bingham
2017-02-13 21:52 ` Laurent Pinchart
2017-02-10 20:27 ` [PATCH 5/8] v4l: vsp1: Operate on partition struct data directly Kieran Bingham
2017-02-13 22:05 ` Laurent Pinchart
2017-02-10 20:27 ` [PATCH 6/8] v4l: vsp1: Allow entities to participate in the partition algorithm Kieran Bingham
2017-02-13 22:51 ` Laurent Pinchart
2017-02-13 23:03 ` Laurent Pinchart
2017-02-10 20:27 ` [PATCH 7/8] v4l: vsp1: Calculate UDS phase for partitions Kieran Bingham
2017-02-13 23:21 ` Laurent Pinchart
2017-02-10 20:27 ` [PATCH 8/8] v4l: vsp1: Implement left edge partition algorithm overlap Kieran Bingham
2017-02-13 23:30 ` Laurent Pinchart
2017-02-14 0:01 ` [PATCH 0/8] v4l: vsp1: Partition phase developments 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=1593556.4hIcOfm2vc@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=kieran.bingham+renesas@ideasonboard.com \
--cc=kieran.bingham@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 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.