Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1586021

Re: [PATCH v5 3/3] [media] s5p-mfc: Check and set 'v4l2_pix_format:field' field in try_fmt

From Andrzej Hajda <a.hajda@samsung.com>
Newsgroups linux.kernel
Subject Re: [PATCH v5 3/3] [media] s5p-mfc: Check and set 'v4l2_pix_format:field' field in try_fmt
Date 2017-02-22 10:40 +0100
Message-ID <tdByW-7Zb-37@gated-at.bofh.it> (permalink)
References <tdoil-6Y4-5@gated-at.bofh.it> <tdByW-7Zb-39@gated-at.bofh.it> <tdoil-6Y4-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 21.02.2017 20:20, Thibault Saunier wrote:
> It is required by the standard that the field order is set by the
> driver.
>
> Signed-off-by: Thibault Saunier <thibault.saunier@osg.samsung.com>
>
> ---
>
> Changes in v5:
> - Just adapt the field and never error out.
>
> Changes in v4: None
> Changes in v3:
> - Do not check values in the g_fmt functions as Andrzej explained in previous review
>
> Changes in v2:
> - Fix a silly build error that slipped in while rebasing the patches
>
>  drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
> index 0976c3e0a5ce..44ed2afe0780 100644
> --- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
> @@ -386,6 +386,9 @@ static int vidioc_try_fmt(struct file *file, void *priv, struct v4l2_format *f)
>  	struct v4l2_pix_format_mplane *pix_mp = &f->fmt.pix_mp;
>  	struct s5p_mfc_fmt *fmt;
>  
> +	if (f->fmt.pix.field == V4L2_FIELD_ANY)
> +		f->fmt.pix.field = V4L2_FIELD_NONE;
> +

In previous version the only supported field type was NONE, here you
support everything.
If the only supported format is none you should set 'field'
unconditionally to NONE, nothing more.

Regards
Andrzej

>  	mfc_debug(2, "Type is %d\n", f->type);
>  	if (f->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) {
>  		fmt = find_format(f, MFC_FMT_DEC);

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v5 3/3] [media] s5p-mfc: Check and set 'v4l2_pix_format:field' field in try_fmt Thibault Saunier <thibault.saunier@osg.samsung.com> - 2017-02-21 20:30 +0100
  Re: [PATCH v5 3/3] [media] s5p-mfc: Check and set  'v4l2_pix_format:field' field in try_fmt Andrzej Hajda <a.hajda@samsung.com> - 2017-02-22 10:40 +0100
    Re: [PATCH v5 3/3] [media] s5p-mfc: Check and set  'v4l2_pix_format:field' field in try_fmt Thibault Saunier <thibault.saunier@osg.samsung.com> - 2017-02-22 14:20 +0100
      Re: [PATCH v5 3/3] [media] s5p-mfc: Check and set  'v4l2_pix_format:field' field in try_fmt Nicolas Dufresne <nicolas.dufresne@collabora.com> - 2017-02-22 15:50 +0100
      Re: [PATCH v5 3/3] [media] s5p-mfc: Check and set  'v4l2_pix_format:field' field in try_fmt Andrzej Hajda <a.hajda@samsung.com> - 2017-02-23 12:20 +0100

csiph-web