linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jacopo Mondi <jacopo@jmondi.org>
To: Marco Felsch <m.felsch@pengutronix.de>
Cc: Akinobu Mita <akinobu.mita@gmail.com>,
	linux-media@vger.kernel.org,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>
Subject: Re: [PATCH 2/4] media: mt9m111: make VIDIOC_SUBDEV_G_FMT ioctl work with V4L2_SUBDEV_FORMAT_TRY
Date: Fri, 4 Jan 2019 14:35:41 +0100	[thread overview]
Message-ID: <20190104133541.zlqn2rlimvjdrg2q@uno.localdomain> (raw)
In-Reply-To: <20190103134704.3rabugqd3pqzrazb@pengutronix.de>

[-- Attachment #1: Type: text/plain, Size: 2136 bytes --]

Hello,
  sorry to jump in

On Thu, Jan 03, 2019 at 02:47:04PM +0100, Marco Felsch wrote:
> On 19-01-01 02:07, Akinobu Mita wrote:
> > 2018年12月31日(月) 19:54 Marco Felsch <m.felsch@pengutronix.de>:
> > >
> > > On 18-12-30 02:07, Akinobu Mita wrote:
> > > > The VIDIOC_SUBDEV_G_FMT ioctl for this driver doesn't recognize
> > > > V4L2_SUBDEV_FORMAT_TRY and always works as if V4L2_SUBDEV_FORMAT_ACTIVE
> > > > is specified.
> > > >
> > > > Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
> > > > Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> > > > Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
> > > > ---
> > > >  drivers/media/i2c/mt9m111.c | 31 +++++++++++++++++++++++++++++++
> > > >  1 file changed, 31 insertions(+)
> > > >
> > > > diff --git a/drivers/media/i2c/mt9m111.c b/drivers/media/i2c/mt9m111.c
> > > > index f0e47fd..acb4dee 100644
> > > > --- a/drivers/media/i2c/mt9m111.c
> > > > +++ b/drivers/media/i2c/mt9m111.c
> > > > @@ -528,6 +528,16 @@ static int mt9m111_get_fmt(struct v4l2_subdev *sd,
> > > >       if (format->pad)
> > > >               return -EINVAL;
> > > >
> > > > +     if (format->which == V4L2_SUBDEV_FORMAT_TRY) {
> > > > +#ifdef CONFIG_VIDEO_V4L2_SUBDEV_API
> > >
> > > This ifdef is made in the include/media/v4l2-subdev.h, so I would drop
> > > it.
> >
> > I sent similar fix for ov2640 driver and kerel test robot reported
> > build test failure.  So I think this ifdef is necessary.
> >
> > v1: https://www.mail-archive.com/linux-media@vger.kernel.org/msg137098.html
> > v2: https://www.mail-archive.com/linux-media@vger.kernel.org/msg141735.html
>
> You are absolutely true, sorry my mistake.. Unfortunately my patch [1] wasn't
> applied which fixes it commonly. This patch will avoid the 2nd ifdef in
> init_cfg() too.
>
> [1] https://www.spinics.net/lists/linux-media/msg138940.html
>

There have been recents attempts to do the same, please see:
https://lkml.org/lkml/2018/11/28/1080
and Hans' attempt at
https://patchwork.kernel.org/patch/10717699/

Unfortunately seems like we're gonna live with those ifdefs

Thanks
  j

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2019-01-04 13:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-29 17:07 [PATCH 0/4] media: bugfixes for mt9m111 driver Akinobu Mita
2018-12-29 17:07 ` [PATCH 1/4] media: mt9m111: fix setting pixclk polarity Akinobu Mita
2018-12-31 10:30   ` Marco Felsch
2018-12-31 16:57     ` Akinobu Mita
2018-12-29 17:07 ` [PATCH 2/4] media: mt9m111: make VIDIOC_SUBDEV_G_FMT ioctl work with V4L2_SUBDEV_FORMAT_TRY Akinobu Mita
2018-12-31 10:54   ` Marco Felsch
2018-12-31 17:07     ` Akinobu Mita
2019-01-03 13:47       ` Marco Felsch
2019-01-04 13:35         ` Jacopo Mondi [this message]
2019-01-05 14:52         ` Akinobu Mita
2018-12-29 17:07 ` [PATCH 3/4] media: mt9m111: set all mbus format field when G_FMT and S_FMT ioctls Akinobu Mita
2018-12-29 17:07 ` [PATCH 4/4] media: mt9m111: set initial frame size other than 0x0 Akinobu Mita

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=20190104133541.zlqn2rlimvjdrg2q@uno.localdomain \
    --to=jacopo@jmondi.org \
    --cc=akinobu.mita@gmail.com \
    --cc=linux-media@vger.kernel.org \
    --cc=m.felsch@pengutronix.de \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).