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

Zhao Yakui yakui.zhao at intel.com
Fri Aug 26 00:20:42 UTC 2016


On 08/24/2016 06:29 PM, Randy Li wrote:
>
>
> 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.
> 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
> 4. Got result from DRI buffer.
>
> Is it correct ?

[Yakui]: This is right. It works like what you mentioned.

>
> 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.

[Yakui]: For the driver's responsibility, it includes the following main 
functions.
      The first is to allocate the corresponding buffers(For example: 
the data buffer, parameter buffer and so on). The buffer allocation is 
implemented by using libdrm API. The buffer can be allocated by driver. 
And it is also ok to be mapped from the prime buffer, which is allocated 
by other component.

      The second is to prepare and submit the GPU command buffer. The 
GPU command buffer will include all the GPU commands that should be 
executed. This will be specific to the platform. BTW: The register 
access is also treated as the GPU command. After the GPU command buffer 
is submitted, we can then get the expected result.

Thanks
    Yakui

>
>>
>> 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.



More information about the Libva mailing list