All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Philipp Zabel <philipp.zabel@gmail.com>, linux-media@vger.kernel.org
Cc: Mauro Carvalho Chehab <m.chehab@samsung.com>,
	Kamil Debski <k.debski@samsung.com>,
	Nicolas Dufresne <nicolas.dufresne@collabora.com>,
	kernel@pengutronix.de
Subject: Re: [PATCH 2/3] [media] coda: fix coda_g_selection
Date: Sat, 26 Jul 2014 17:12:56 +0200	[thread overview]
Message-ID: <53D3C578.8000802@xs4all.nl> (raw)
In-Reply-To: <1406385272-425-2-git-send-email-philipp.zabel@gmail.com>

On 07/26/2014 04:34 PM, Philipp Zabel wrote:
> Crop targets are valid on the capture side and compose targets are valid
> on the output side, not the other way around.

Are you sure about this? Usually for m2m devices the capture side supports
compose (i.e. the result of the m2m operation can be composed into the capture
buffer) and the output side supports crop (i.e. the m2m operates on the cropped
part of the output buffer instead of on the full buffer), like the coda driver
does today.

As a result of that the old G/S_CROP API cannot be used with most m2m devices
since it does the opposite operation, which does not apply to m2m devices.

Regards,

	Hans

> 
> Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
> ---
>  drivers/media/platform/coda/coda-common.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c
> index 95d0b04..b542340 100644
> --- a/drivers/media/platform/coda/coda-common.c
> +++ b/drivers/media/platform/coda/coda-common.c
> @@ -600,7 +600,7 @@ static int coda_g_selection(struct file *file, void *fh,
>  		rsel = &r;
>  		/* fallthrough */
>  	case V4L2_SEL_TGT_CROP:
> -		if (s->type != V4L2_BUF_TYPE_VIDEO_OUTPUT)
> +		if (s->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
>  			return -EINVAL;
>  		break;
>  	case V4L2_SEL_TGT_COMPOSE_BOUNDS:
> @@ -609,7 +609,7 @@ static int coda_g_selection(struct file *file, void *fh,
>  		/* fallthrough */
>  	case V4L2_SEL_TGT_COMPOSE:
>  	case V4L2_SEL_TGT_COMPOSE_DEFAULT:
> -		if (s->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
> +		if (s->type != V4L2_BUF_TYPE_VIDEO_OUTPUT)
>  			return -EINVAL;
>  		break;
>  	default:
> 


  reply	other threads:[~2014-07-26 15:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-26 14:34 [PATCH 1/3] [media] coda: fix coda_s_fmt_vid_out Philipp Zabel
2014-07-26 14:34 ` [PATCH 2/3] [media] coda: fix coda_g_selection Philipp Zabel
2014-07-26 15:12   ` Hans Verkuil [this message]
2014-07-26 16:37     ` Philipp Zabel
2014-07-26 17:08       ` Hans Verkuil
2014-07-27 16:53       ` Nicolas Dufresne
2014-07-27 18:21         ` Hans Verkuil
2014-07-27 21:32           ` Nicolas Dufresne
2014-07-27 22:22             ` Hans Verkuil
2014-07-28  9:28               ` Philipp Zabel
2014-07-26 14:34 ` [PATCH 3/3] [media] coda: set capture frame size with output S_FMT Philipp Zabel

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=53D3C578.8000802@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=k.debski@samsung.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-media@vger.kernel.org \
    --cc=m.chehab@samsung.com \
    --cc=nicolas.dufresne@collabora.com \
    --cc=philipp.zabel@gmail.com \
    /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.