From: Hans Verkuil <hverkuil@xs4all.nl>
To: tiffany lin <tiffany.lin@mediatek.com>,
Hans Verkuil <hansverk@cisco.com>
Cc: daniel.thompson@linaro.org, Rob Herring <robh+dt@kernel.org>,
Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will.deacon@arm.com>,
Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
Daniel Kurtz <djkurtz@chromium.org>,
Hans Verkuil <hans.verkuil@cisco.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Sakari Ailus <sakari.ailus@iki.fi>,
Mikhail Ulyanov <mikhail.ulyanov@cogentembedded.com>,
Fabien Dessenne <fabien.dessenne@st.com>,
Arnd Bergmann <arnd@arndb.de>,
Darren Etheridge <detheridge@ti.com>,
Peter Griffin <peter.griffin@linaro.org>,
Benoit Parrot <bparrot@ti.com>,
Andrew-CT Chen <andrew-ct.chen@mediatek.com>,
Eddie Huang <eddie.huang@mediatek.com>,
Yingjoe Chen <yingjoe.chen@mediatek.com>,
James Liao <jamesjj.liao@mediatek.com>,
Hongzhou Yang <hongzhou.yang@mediatek.com>,
Daniel Hsiao <daniel.hsiao@mediatek.com>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-media@vger.kernel.org, linux-mediatek@lists.infradead.org,
PoChun.Lin@mediatek.com
Subject: Re: [PATCH v2 6/8] [Media] vcodec: mediatek: Add Mediatek V4L2 Video Encoder Driver
Date: Wed, 16 Dec 2015 14:47:52 +0100 [thread overview]
Message-ID: <56716B88.7090301@xs4all.nl> (raw)
In-Reply-To: <1450271857.6730.26.camel@mtksdaap41>
On 12/16/15 14:17, tiffany lin wrote:
> Hi Hans,
>
>
> On Tue, 2015-12-15 at 15:17 +0100, Hans Verkuil wrote:
>>
>> On 12/15/15 14:51, tiffany lin wrote:
>>> We are not familiar with v4l2-compliance utility, we will check how to
>>> use it.
>>
>> It's part of v4l-utils.git (http://git.linuxtv.org/v4l-utils.git/). There is a
>> fairly decent man page. It does exhaustive compliance tests for V4L2 devices.
>>
>> That said, the support for memory-to-memory codec devices is not great, so I wouldn't
>> trust any failures it reports when using the streaming tests (i.e. the --stream*
>> options). By default just run 'v4l2-compliance -d /dev/videoX' to do the compliance
>> test.
>>
>> Note: before I accept this driver I do want to see that compliance test output!
>>
> Got it. We will provide it in next version.
> Now our driver is developed and run base on kernel v3.18.
> V4L2 and vb2 have some difference between Linux 4.4-rc1 and 3.18 kernel.
> Is it ok we provided test output base on v3.18 or we need to base on
> 4.4-rc1?
I'm actually not sure if the latest v4l2-compliance test suite will work with a 3.18
kernel. so either you have to go back to an older version of v4l2-compliance that
works with 3.18 (go back to commit 4a57509a8334aca6ca8e81cd3beb08d5be397dac, that
might do the trick) or (and that's what I recommend) go with the latest kernel.
For the media tree that is http://git.linuxtv.org/media_tree.git/log/.
The final version of the patch has to be against that kernel anyway.
>>>>> +}
>>>>> +
>>>>> +int m2mctx_venc_queue_init(void *priv, struct vb2_queue *src_vq,
>>>>> + struct vb2_queue *dst_vq)
>>>>> +{
>>>>> + struct mtk_vcodec_ctx *ctx = priv;
>>>>> + int ret;
>>>>> +
>>>>> + src_vq->type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
>>>>> + src_vq->io_modes = VB2_DMABUF | VB2_MMAP | VB2_USERPTR;
>>>>
>>>> You're using videobuf2-dma-contig, so VB2_USERPTR is generally useless in that
>>>> case. I would drop it.
>>>>
>>> Sorry, I don't get it.
>>> We are using videobuf2-dma-contig, but we also using VB2_USERPTR.
>>
>> ???? In that case the user pointer you pass in must point to physically contiguous
>> memory. Which means you got it through some magic. Typically what should be used
>> are dmabuf handles to pass buffers around between different subsystems.
>>
>> The use of VB2_USERPTR for that purpose is deprecated.
>>
>> Or am I misunderstanding you as well?
>>
> Our encoder support all three modes.
> In case that A driver + Encode driver flow, OUTPUT buffer will be
> VB2_DMABUF from A driver.
> In case that read YCbCr frame data from file and encode them to bit
> stream flow, we use VB2_USERPTR and VB2_MMAP.
> In VB2_USERPTR case, videobuf2-dma-contig will help us get continuous
> dma address.
> Our chip has IOMMU and M4U that help us get continuous phy address for
> encode HW.
>
> http://lists.infradead.org/pipermail/linux-mediatek/2015-October/002525.html
Ah, OK. Have you tested this with malloc()ed buffers? Just asking :-)
Regards,
Hans
next prev parent reply other threads:[~2015-12-16 13:45 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-11 9:55 [PATCH v2 0/8] Add MT8173 Video Encoder Driver and VPU Driver Tiffany Lin
2015-12-11 9:55 ` [PATCH v2 1/8] dt-bindings: Add a binding for Mediatek Video Processor Tiffany Lin
2015-12-11 17:21 ` Rob Herring
2015-12-11 9:55 ` [PATCH v2 2/8] arm64: dts: mediatek: Add node for Mediatek Video Processor Unit Tiffany Lin
2015-12-11 9:55 ` [PATCH v2 3/8] [media] VPU: mediatek: support Mediatek VPU Tiffany Lin
2015-12-11 9:55 ` [PATCH v2 4/8] dt-bindings: Add a binding for Mediatek Video Encoder Tiffany Lin
2015-12-11 17:29 ` Rob Herring
2015-12-14 8:26 ` tiffany lin
2015-12-14 11:36 ` Matthias Brugger
2015-12-15 8:26 ` tiffany lin
2015-12-11 9:55 ` [PATCH v2 5/8] arm64: dts: mediatek: Add Video Encoder for MT8173 Tiffany Lin
2015-12-14 18:18 ` Matthias Brugger
2015-12-15 8:29 ` tiffany lin
2015-12-11 9:55 ` [PATCH v2 6/8] [Media] vcodec: mediatek: Add Mediatek V4L2 Video Encoder Driver Tiffany Lin
2015-12-14 12:50 ` Hans Verkuil
2015-12-15 13:51 ` tiffany lin
2015-12-15 14:17 ` Hans Verkuil
2015-12-16 13:17 ` tiffany lin
2015-12-16 13:47 ` Hans Verkuil [this message]
2015-12-17 5:52 ` tiffany lin
2015-12-11 9:55 ` [PATCH v2 7/8] [media] vcodec: mediatek: Add Mediatek VP8 " Tiffany Lin
2015-12-11 9:55 ` [PATCH v2 8/8] [media] vcodec: mediatek: Add Mediatek H264 " Tiffany Lin
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=56716B88.7090301@xs4all.nl \
--to=hverkuil@xs4all.nl \
--cc=PoChun.Lin@mediatek.com \
--cc=andrew-ct.chen@mediatek.com \
--cc=arnd@arndb.de \
--cc=bparrot@ti.com \
--cc=catalin.marinas@arm.com \
--cc=daniel.hsiao@mediatek.com \
--cc=daniel.thompson@linaro.org \
--cc=detheridge@ti.com \
--cc=devicetree@vger.kernel.org \
--cc=djkurtz@chromium.org \
--cc=eddie.huang@mediatek.com \
--cc=fabien.dessenne@st.com \
--cc=galak@codeaurora.org \
--cc=hans.verkuil@cisco.com \
--cc=hansverk@cisco.com \
--cc=hongzhou.yang@mediatek.com \
--cc=ijc+devicetree@hellion.org.uk \
--cc=jamesjj.liao@mediatek.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=matthias.bgg@gmail.com \
--cc=mchehab@osg.samsung.com \
--cc=mikhail.ulyanov@cogentembedded.com \
--cc=pawel.moll@arm.com \
--cc=peter.griffin@linaro.org \
--cc=robh+dt@kernel.org \
--cc=sakari.ailus@iki.fi \
--cc=tiffany.lin@mediatek.com \
--cc=will.deacon@arm.com \
--cc=yingjoe.chen@mediatek.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