All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Mauro Carvalho Chehab <mchehab@s-opensource.com>,
	Linux Media Mailing List <linux-media@vger.kernel.org>,
	Mauro Carvalho Chehab <mchehab@infradead.org>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
	Stanimir Varbanov <stanimir.varbanov@linaro.org>,
	Tomasz Figa <tfiga@chromium.org>,
	Daniel Mentz <danielmentz@google.com>,
	Hans Verkuil <hans.verkuil@cisco.com>
Subject: Re: [PATCH RESEND 0/3] v4l2-compat-ioctl32.c: better detect pointer controls
Date: Fri, 11 Aug 2017 12:46:37 +0300	[thread overview]
Message-ID: <4610701.cORc3TMU1z@avalon> (raw)
In-Reply-To: <173e50c4-77ae-a718-46bd-01963e07785f@xs4all.nl>

Hi Hans,

On Friday 11 Aug 2017 08:05:03 Hans Verkuil wrote:
> On 11/08/17 02:16, Mauro Carvalho Chehab wrote:
> > In the past, only string controls were pointers. That changed when
> > compounded types got added, but the compat32 code was not updated.
> > 
> > We could just add those controls there, but maintaining it is flaw, as we
> > often forget about the compat code. So, instead, rely on the control type,
> > as this is always updated when new controls are added.
> > 
> > As both v4l2-ctrl and compat32 code are at videodev.ko module, we can
> > move the ctrl_is_pointer() helper function to v4l2-ctrl.c.
> 
> This series doesn't really solve anything:
> 
> - it introduces a circular dependency between two modules
> - it doesn't handle driver-custom controls (the old code didn't either). For
> example vivid has custom pointer controls.
> - it replaces a list of control IDs with a list of type IDs, which also has
> to be kept up to date.
> 
> I thought this over and I have a better and much simpler idea. I'll post a
> patch for that.

Wouldn't it be time to replace the large switch/case with an array of control 
information ? Maybe that was your better idea already :-)

> > ---
> > 
> > Re-sending this patch series, as it was c/c to the linux-doc ML by
> > mistake.
> > 
> > Mauro Carvalho Chehab (3):
> >   media: v4l2-ctrls.h: better document the arguments for v4l2_ctrl_fill
> >   media: v4l2-ctrls: prepare the function to be used by compat32 code
> >   media: compat32: reimplement ctrl_is_pointer()
> >  
> >  drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 18 +---------
> >  drivers/media/v4l2-core/v4l2-ctrls.c          | 49 ++++++++++++++++++++--
> >  include/media/v4l2-ctrls.h                    | 28 ++++++++++-----
> >  3 files changed, 67 insertions(+), 28 deletions(-)

-- 
Regards,

Laurent Pinchart

      parent reply	other threads:[~2017-08-11  9:46 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-04 11:25 [PATCH] v4l2-compat-ioctl32.c: add missing controls to, ctrl_is_pointer Hans Verkuil
2017-08-10 23:45 ` [PATCH 0/3] v4l2-compat-ioctl32.c: better detect pointer controls Mauro Carvalho Chehab
2017-08-10 23:45   ` [PATCH 1/3] media: v4l2-ctrls.h: better document the arguments for v4l2_ctrl_fill Mauro Carvalho Chehab
2017-08-10 23:45   ` [PATCH 2/3] media: v4l2-ctrls: prepare the function to be used by compat32 code Mauro Carvalho Chehab
2017-08-10 23:45   ` [PATCH 3/3] media: compat32: reimplement ctrl_is_pointer() Mauro Carvalho Chehab
2017-08-10 23:52   ` [PATCH 0/3] v4l2-compat-ioctl32.c: better detect pointer controls Mauro Carvalho Chehab
2017-08-11  0:16 ` [PATCH RESEND " Mauro Carvalho Chehab
2017-08-11  0:16   ` [PATCH 1/3] media: v4l2-ctrls.h: better document the arguments for v4l2_ctrl_fill Mauro Carvalho Chehab
2017-08-11  6:01     ` Hans Verkuil
2017-08-11  9:10       ` Mauro Carvalho Chehab
2017-08-11  9:35         ` Hans Verkuil
2017-08-12  9:57           ` [PATCH v3] " Mauro Carvalho Chehab
2017-08-11  0:16   ` [PATCH 2/3] media: v4l2-ctrls: prepare the function to be used by compat32 code Mauro Carvalho Chehab
2017-08-11  0:16   ` [PATCH 3/3] media: compat32: reimplement ctrl_is_pointer() Mauro Carvalho Chehab
2017-08-11  6:05   ` [PATCH RESEND 0/3] v4l2-compat-ioctl32.c: better detect pointer controls Hans Verkuil
2017-08-11  9:00     ` Mauro Carvalho Chehab
2017-08-11  9:24       ` Hans Verkuil
2017-08-11  9:46     ` Laurent Pinchart [this message]

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=4610701.cORc3TMU1z@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=danielmentz@google.com \
    --cc=hans.verkuil@cisco.com \
    --cc=hverkuil@xs4all.nl \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=mchehab@s-opensource.com \
    --cc=sakari.ailus@linux.intel.com \
    --cc=stanimir.varbanov@linaro.org \
    --cc=tfiga@chromium.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 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.