[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56716B88.7090301@xs4all.nl>
Date: Wed, 16 Dec 2015 14:47:52 +0100
From: Hans Verkuil <hverkuil@...all.nl>
To: tiffany lin <tiffany.lin@...iatek.com>,
Hans Verkuil <hansverk@...co.com>
Cc: daniel.thompson@...aro.org, Rob Herring <robh+dt@...nel.org>,
Pawel Moll <pawel.moll@....com>,
Mark Rutland <mark.rutland@....com>,
Ian Campbell <ijc+devicetree@...lion.org.uk>,
Kumar Gala <galak@...eaurora.org>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will.deacon@....com>,
Mauro Carvalho Chehab <mchehab@....samsung.com>,
Matthias Brugger <matthias.bgg@...il.com>,
Daniel Kurtz <djkurtz@...omium.org>,
Hans Verkuil <hans.verkuil@...co.com>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Sakari Ailus <sakari.ailus@....fi>,
Mikhail Ulyanov <mikhail.ulyanov@...entembedded.com>,
Fabien Dessenne <fabien.dessenne@...com>,
Arnd Bergmann <arnd@...db.de>,
Darren Etheridge <detheridge@...com>,
Peter Griffin <peter.griffin@...aro.org>,
Benoit Parrot <bparrot@...com>,
Andrew-CT Chen <andrew-ct.chen@...iatek.com>,
Eddie Huang <eddie.huang@...iatek.com>,
Yingjoe Chen <yingjoe.chen@...iatek.com>,
James Liao <jamesjj.liao@...iatek.com>,
Hongzhou Yang <hongzhou.yang@...iatek.com>,
Daniel Hsiao <daniel.hsiao@...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
Subject: Re: [PATCH v2 6/8] [Media] vcodec: mediatek: Add Mediatek V4L2 Video
Encoder Driver
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists