From: Nicolas Dufresne <nicolas.dufresne@collabora.com>
To: Thibault Saunier <thibault.saunier@osg.samsung.com>,
Andrzej Hajda <a.hajda@samsung.com>,
linux-kernel@vger.kernel.org
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Kukjin Kim <kgene@kernel.org>,
Mauro Carvalho Chehab <mchehab@s-opensource.com>,
Andi Shyti <andi.shyti@samsung.com>,
linux-media@vger.kernel.org, Shuah Khan <shuahkh@osg.samsung.com>,
Javier Martinez Canillas <javier@osg.samsung.com>,
linux-samsung-soc@vger.kernel.org,
Krzysztof Kozlowski <krzk@kernel.org>,
Inki Dae <inki.dae@samsung.com>,
Sylwester Nawrocki <s.nawrocki@samsung.com>,
linux-arm-kernel@lists.infradead.org,
Ulf Hansson <ulf.hansson@linaro.org>,
Jeongtae Park <jtp.park@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
Kamil Debski <kamil@wypas.org>
Subject: Re: [PATCH v5 3/3] [media] s5p-mfc: Check and set 'v4l2_pix_format:field' field in try_fmt
Date: Wed, 22 Feb 2017 09:42:25 -0500 [thread overview]
Message-ID: <1487774545.5907.17.camel@collabora.com> (raw)
In-Reply-To: <ed287d5a-687b-b344-3f20-10154071852c@osg.samsung.com>
[-- Attachment #1: Type: text/plain, Size: 2492 bytes --]
Le mercredi 22 février 2017 à 10:10 -0300, Thibault Saunier a écrit :
> Hello,
>
> On 02/22/2017 06:29 AM, Andrzej Hajda wrote:
> > 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.
>
> Afaict we support 2 things:
>
> 1. NONE
> 2. INTERLACE
>
> Until now we were not checking what was supported or not and
> basically
> ignoring that info, this patch
> keeps the old behaviour making sure to be compliant.
>
> I had a doubt and was pondering doing:
>
> ``` diff
>
> + if (f->fmt.pix.field != V4L2_FIELD_INTERLACED)
> + f->fmt.pix.field = V4L2_FIELD_NONE;
> +
>
This looks better to me.
> ```
>
> instead, it is probably more correct, do you think it is what should
> be
> done here?
>
> Regards,
>
> Thibault
>
> >
> > 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);
>
>
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
next prev parent reply other threads:[~2017-02-22 14:42 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-21 19:20 [PATCH v5 0/3] Fixes for colorspace logic in exynos-gsc and s5p-mfc drivers Thibault Saunier
2017-02-21 19:20 ` [PATCH v5 1/3] [media] exynos-gsc: Use user configured colorspace if provided Thibault Saunier
2017-02-22 2:19 ` Hans Verkuil
2017-02-22 13:05 ` Thibault Saunier
2017-02-22 18:06 ` Hans Verkuil
2017-02-22 18:57 ` Thibault Saunier
2017-02-22 20:03 ` Nicolas Dufresne
2017-02-22 20:08 ` Thibault Saunier
2017-02-21 19:20 ` [PATCH v5 2/3] [media] s5p-mfc: Set colorspace in VIDIO_{G,TRY}_FMT if DEFAULT provided Thibault Saunier
2017-02-23 13:42 ` Andrzej Hajda
2017-02-21 19:20 ` [PATCH v5 3/3] [media] s5p-mfc: Check and set 'v4l2_pix_format:field' field in try_fmt Thibault Saunier
2017-02-22 9:29 ` Andrzej Hajda
2017-02-22 13:10 ` Thibault Saunier
2017-02-22 14:42 ` Nicolas Dufresne [this message]
2017-02-23 11:17 ` Andrzej Hajda
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=1487774545.5907.17.camel@collabora.com \
--to=nicolas.dufresne@collabora.com \
--cc=a.hajda@samsung.com \
--cc=andi.shyti@samsung.com \
--cc=inki.dae@samsung.com \
--cc=javier@osg.samsung.com \
--cc=jtp.park@samsung.com \
--cc=kamil@wypas.org \
--cc=kgene@kernel.org \
--cc=krzk@kernel.org \
--cc=kyungmin.park@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=mchehab@kernel.org \
--cc=mchehab@s-opensource.com \
--cc=s.nawrocki@samsung.com \
--cc=shuahkh@osg.samsung.com \
--cc=thibault.saunier@osg.samsung.com \
--cc=ulf.hansson@linaro.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