[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1456154364.1943.3.camel@mtksdaap41>
Date: Mon, 22 Feb 2016 23:19:24 +0800
From: tiffany lin <tiffany.lin@...iatek.com>
To: Hans Verkuil <hverkuil@...all.nl>
CC: Hans Verkuil <hans.verkuil@...co.com>,
<daniel.thompson@...aro.org>, "Rob Herring" <robh+dt@...nel.org>,
Mauro Carvalho Chehab <mchehab@....samsung.com>,
Matthias Brugger <matthias.bgg@...il.com>,
Daniel Kurtz <djkurtz@...omium.org>,
Pawel Osciak <posciak@...omium.org>,
Eddie Huang <eddie.huang@...iatek.com>,
Yingjoe Chen <yingjoe.chen@...iatek.com>,
<devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-media@...r.kernel.org>,
<linux-mediatek@...ts.infradead.org>, <PoChun.Lin@...iatek.com>,
Andrew-CT Chen <andrew-ct.chen@...iatek.com>
Subject: Re: [PATCH v4 5/8] [Media] vcodec: mediatek: Add Mediatek V4L2
Video Encoder Driver
Hi Hans,
On Sat, 2016-02-20 at 10:18 +0100, Hans Verkuil wrote:
> On 02/20/2016 10:11 AM, tiffany lin wrote:
> > Hi Hans,
> >
> > On Tue, 2016-02-16 at 08:44 +0100, Hans Verkuil wrote:
> >> On 02/16/2016 07:37 AM, tiffany lin wrote:
> >>>>> +
> >>>>> +const struct v4l2_ioctl_ops mtk_venc_ioctl_ops = {
> >>>>> + .vidioc_streamon = v4l2_m2m_ioctl_streamon,
> >>>>> + .vidioc_streamoff = v4l2_m2m_ioctl_streamoff,
> >>>>> +
> >>>>> + .vidioc_reqbufs = v4l2_m2m_ioctl_reqbufs,
> >>>>> + .vidioc_querybuf = v4l2_m2m_ioctl_querybuf,
> >>>>> + .vidioc_qbuf = vidioc_venc_qbuf,
> >>>>> + .vidioc_dqbuf = vidioc_venc_dqbuf,
> >>>>> +
> >>>>> + .vidioc_querycap = vidioc_venc_querycap,
> >>>>> + .vidioc_enum_fmt_vid_cap_mplane = vidioc_enum_fmt_vid_cap_mplane,
> >>>>> + .vidioc_enum_fmt_vid_out_mplane = vidioc_enum_fmt_vid_out_mplane,
> >>>>> + .vidioc_enum_framesizes = vidioc_enum_framesizes,
> >>>>> +
> >>>>> + .vidioc_try_fmt_vid_cap_mplane = vidioc_try_fmt_vid_cap_mplane,
> >>>>> + .vidioc_try_fmt_vid_out_mplane = vidioc_try_fmt_vid_out_mplane,
> >>>>> + .vidioc_expbuf = v4l2_m2m_ioctl_expbuf,
> >>>>
> >>>> Please add vidioc_create_bufs and vidioc_prepare_buf as well.
> >>>>
> >>>
> >>> Currently we do not support these use cases, do we need to add
> >>> vidioc_create_bufs and vidioc_prepare_buf now?
> >>
> >> I would suggest you do. The vb2 framework gives it (almost) for free.
> >> prepare_buf is completely free (just add the helper) and create_bufs
> >> needs a few small changes in the queue_setup function, that's all.
> >>
> > After try to add vidioc_create_bufs directly using
> > vb2_ioctl_create_bufs, it will have problem in
>
> This is a m2m device, so you should use the m2m variant of this:
> v4l2_m2m_ioctl_create_bufs
>
> That should solve this problem.
>
> Ditto for prepare_buf: you need to use v4l2_m2m_ioctl_prepare_buf.
>
Got it. After using v4l2_m2m_ioctl_create_bufs, the problem was solved.
Thanks for your help.
> Regards,
>
> Hans
Powered by blists - more mailing lists