From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
linux-media@vger.kernel.org
Cc: linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH v2 08/13] v4l: vsp1: Make vsp1_entity_get_pad_compose() more generic
Date: Tue, 26 Apr 2016 21:09:10 +0300 [thread overview]
Message-ID: <571FAEC6.8010901@cogentembedded.com> (raw)
In-Reply-To: <1461620198-13428-9-git-send-email-laurent.pinchart+renesas@ideasonboard.com>
Hello.
On 04/26/2016 12:36 AM, Laurent Pinchart wrote:
> Turn the helper into a function that can retrieve crop and compose
> selection rectangles.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> ---
> drivers/media/platform/vsp1/vsp1_entity.c | 24 ++++++++++++++++++++----
> drivers/media/platform/vsp1/vsp1_entity.h | 6 +++---
> drivers/media/platform/vsp1/vsp1_rpf.c | 7 ++++---
> 3 files changed, 27 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/media/platform/vsp1/vsp1_entity.c b/drivers/media/platform/vsp1/vsp1_entity.c
> index f60d7926d53f..8c49a74381a1 100644
> --- a/drivers/media/platform/vsp1/vsp1_entity.c
> +++ b/drivers/media/platform/vsp1/vsp1_entity.c
> @@ -87,12 +87,28 @@ vsp1_entity_get_pad_format(struct vsp1_entity *entity,
> return v4l2_subdev_get_try_format(&entity->subdev, cfg, pad);
> }
>
> +/**
> + * vsp1_entity_get_pad_selection - Get a pad selection from storage for entity
> + * @entity: the entity
> + * @cfg: the configuration storage
> + * @pad: the pad number
> + * @target: the selection target
> + *
> + * Return the selection rectangle stored in the given configuration for an
> + * entity's pad. The configuration can be an ACTIVE or TRY configuration. The
> + * selection target can be COMPOSE or CROP.
> + */
> struct v4l2_rect *
> -vsp1_entity_get_pad_compose(struct vsp1_entity *entity,
> - struct v4l2_subdev_pad_config *cfg,
> - unsigned int pad)
> +vsp1_entity_get_pad_selection(struct vsp1_entity *entity,
> + struct v4l2_subdev_pad_config *cfg,
> + unsigned int pad, unsigned int target)
> {
> - return v4l2_subdev_get_try_compose(&entity->subdev, cfg, pad);
> + if (target == V4L2_SEL_TGT_COMPOSE)
> + return v4l2_subdev_get_try_compose(&entity->subdev, cfg, pad);
> + else if (target == V4L2_SEL_TGT_CROP)
> + return v4l2_subdev_get_try_crop(&entity->subdev, cfg, pad);
> + else
> + return NULL;
How about *switch* instead?
[...]
MBR, Sergei
next prev parent reply other threads:[~2016-04-26 18:09 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-25 21:36 [PATCH v2 00/13] R-Car VSP improvements for v4.7 - Round 2 Laurent Pinchart
2016-04-25 21:36 ` [PATCH v2 01/13] dt-bindings: Add Renesas R-Car FCP DT bindings Laurent Pinchart
2016-04-28 2:54 ` Rob Herring
2016-04-28 6:36 ` Laurent Pinchart
2016-04-28 8:00 ` Geert Uytterhoeven
2016-05-11 12:36 ` [PATCH v2.1] " Laurent Pinchart
2016-05-11 12:38 ` Geert Uytterhoeven
2016-05-11 13:05 ` Rob Herring
2016-04-25 21:36 ` [PATCH v2 02/13] v4l: Add Renesas R-Car FCP driver Laurent Pinchart
2016-04-25 21:36 ` [PATCH v2 03/13] v4l: vsp1: Implement runtime PM support Laurent Pinchart
2016-04-25 21:36 ` [PATCH v2 04/13] v4l: vsp1: Don't handle clocks manually Laurent Pinchart
2016-04-25 21:36 ` [PATCH v2 05/13] v4l: vsp1: Add FCP support Laurent Pinchart
2016-06-17 11:07 ` Mauro Carvalho Chehab
2016-06-17 14:35 ` Laurent Pinchart
2016-04-25 21:36 ` [PATCH v2 06/13] v4l: vsp1: Add output node value to routing table Laurent Pinchart
2016-04-25 21:36 ` [PATCH v2 07/13] v4l: vsp1: Replace container_of() with dedicated macro Laurent Pinchart
2016-04-25 21:36 ` [PATCH v2 08/13] v4l: vsp1: Make vsp1_entity_get_pad_compose() more generic Laurent Pinchart
2016-04-26 18:09 ` Sergei Shtylyov [this message]
2016-04-27 15:26 ` Laurent Pinchart
2016-04-25 21:36 ` [PATCH v2 09/13] v4l: vsp1: Move frame sequence number from video node to pipeline Laurent Pinchart
2016-04-25 21:36 ` [PATCH v2 10/13] v4l: vsp1: Group DRM RPF parameters in a structure Laurent Pinchart
2016-04-25 21:36 ` [PATCH v2 11/13] drm: rcar-du: Add alpha support for VSP planes Laurent Pinchart
2016-04-25 21:36 ` [PATCH v2 12/13] drm: rcar-du: Add Z-order " Laurent Pinchart
2016-04-25 21:36 ` [PATCH v2 13/13] v4l: vsp1: Remove deprecated DRM API 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=571FAEC6.8010901@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--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: 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