[Libva] I want to use VA-API to support new platform, I want know something about Intel implementation

Xiang, Haihao haihao.xiang at intel.com
Wed Aug 24 15:35:35 UTC 2016



>-----Original Message-----
>From: Randy Li [mailto:randy.li at rock-chips.com]
>Sent: Wednesday, August 24, 2016 6:30 PM
>To: Xiang, Haihao <haihao.xiang at intel.com>; libva at lists.freedesktop.org
>Cc: nicolas.dufresne at collabora.co.uk; Balachandran, Sreerenj
><sreerenj.balachandran at intel.com>
>Subject: Re: I want to use VA-API to support new platform, I want know
>something about Intel implementation
>
>
>
>On 08/18/2016 10:31 AM, Xiang, Haihao wrote:
>>
>> Hi Randy,
>>
>> You can get lots of information / docs via internet. You may search for
>> dri, libdrm, drm, gem, i915 etc.
>>
>> dri wiki
>> https://dri.freedesktop.org/wiki/
>>
>> drm:
>> https://en.wikipedia.org/wiki/Direct_Rendering_Manager
>>
>> libdrm:
>> https://01.org/linuxgraphics/community/libdrm
>>
>> intel graphics kernel
>> https://01.org/linuxgraphics/community/kernel
>I have read the documents you offered to me, I have a basic view of them
>and the relationship of them.
>
>But I want to know more about the detail of Intel implementation.I have
>read the Intel driver of VA-API before, I think the Intel video process
>video in this way.
>1. Allocate the DRI buffer from the kernel driver using the libdrm.

It is a GEM buffer object in intel driver.

>2. Intel DRM driver in kernel would allocate buffer throught the GEM.
>3. Intel VA-API driver push the codec data and parameters to those buffers

And setup the corresponding pipeline in a batch buffer which is also a gem buffer object and submit this batch buffer 
to i915 driver  via libdrm.  The batch buffer will be chained into a ring buffer via MI_BATCH_BUFFER_START command
for execution.   You can refer to https://01.org/linuxgraphics/documentation/hardware-specification-prms (Programmer's
Reference Manuals) for how do ring buffer and batch buffer work.

>4. Got result from DRI buffer.
>
>Is it correct ?
>
>If it is correct, does it mean that the registers(used for configure
>decoding parameters) at Intel video processing unit would be mapped as
>PRIME buffers to be used in DRI?
>And where is the kernel driver do that ? I know it is easy to find the
>DRM driver in linux kernel in drivers/gpu/drm/i915/ , but which file is
>doing the job for video processing part? They looks like the graphics
>to me. I think different Intel platform generation would have a
>different registers.
>
>>
>> Hope it can help you.
>>
>> Thanks
>> Haihao
>>
>>
>>> Hi all
>>>    I am using VA-API to support the Video Process Unit in a ARM
>>> platform, but it didn't use the standard kernel interface. Without
>>> the
>>> help of DRI, I can't implement something like vaDeriveImage() leading
>>> a lose in performance.
>>>    I read the Intel driver, it looks the Intel driver could access
>>> the
>>> the Memory of Video Unit of Intel Graphics card through the libdrm.
>>> If that is right, could somebody told me how does it implemented in
>>> linux kernel(which files?).
>>> And I am really newbies to this area(DRI), could somebody give me
>>> guide and documents about this?
>>>    Thank you all very much.
>
>Thank you so much.
>--
>Randy Li
>The third produce department



More information about the Libva mailing list