On Sun, 29 Mar 2009 11:06:19 +0200
Hans Verkuil <[email protected]> wrote:

> On Sunday 29 March 2009 10:50:02 Patch from Trent Piepho wrote:
> > The patch number 11260 was added via Trent Piepho <[email protected]>
> > to http://linuxtv.org/hg/v4l-dvb master development tree.
> >
> > Kernel patches in this development tree may be modified to be backward
> > compatible with older kernels. Compatibility modifications will be
> > removed before inclusion into the mainstream Kernel
> >
> > If anyone has any objections, please let us know by sending a message to:
> >     Linux Media Mailing List <[email protected]>
> >
> > ------
> >
> > From: Trent Piepho  <[email protected]>
> > v4l2-ioctl:  Check format for S_PARM and G_PARM
> >
> >
> > Return EINVAL if VIDIOC_S/G_PARM is called for a buffer type that the
> > driver doesn't define a ->vidioc_try_fmt_XXX() method for.  Several other
> > ioctls, like QUERYBUF, QBUF, and DQBUF, etc.  do this too.  It saves each
> > driver from having to check if the buffer type is one that it supports.
> 
> Hi Trent,
> 
> I wonder whether this change is correct. Looking at the spec I see that 
> g/s_parm only supports VIDEO_CAPTURE, VIDEO_OUTPUT and PRIVATE or up.
> 
> So what should happen if the type is VIDEO_OVERLAY? I think the g/s_parm 
> implementation in v4l2-ioctl.c should first exclude the unsupported types 
> before calling check_fmt.

Makes sense to me.

> I also wonder whether check_fmt shouldn't check for the presence of the 
> s_fmt callbacks instead of try_fmt since try_fmt is an optional ioctl.

One developer suggested to merge try_fmt and s_fmt into one callback.
IMO, this makes sense, since I have the feeling that this will simplify the
code a little bit on the drivers. If we go this way, then we can check for
the new try_s_fmt callback.

Cheers,
Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to