Re: [PATCH 2/3] [media] coda: fix coda_g_selection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
> ---
>  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:
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux