[PATCH v4 3/7] accel/ivpu: Add GEM buffer object management

Andrew Davis afd at ti.com
Thu Jan 5 18:46:51 UTC 2023


On 12/8/22 5:07 AM, Jacek Lawrynowicz wrote:
> Adds four types of GEM-based BOs for the VPU:
>    - shmem
>    - userptr

Do you have some specific need for userptr that would not
be covered by prime import + heaps? I'm just trying to get
a feel for the typical use-cases for these.

Andrew

>    - internal
>    - prime
> 
> All types are implemented as struct ivpu_bo, based on
> struct drm_gem_object. VPU address is allocated when buffer is created
> except for imported prime buffers that allocate it in BO_INFO IOCTL due
> to missing file_priv arg in gem_prime_import callback.
> Internal buffers are pinned on creation, the rest of buffers types
> can be pinned on demand (in SUBMIT IOCTL).
> Buffer VPU address, allocated pages and mappings are relased when the
> buffer is destroyed.
> Eviction mechism is planned for future versions.
> 
> Add three new IOCTLs: BO_CREATE, BO_INFO, BO_USERPTR
> 
> Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz at linux.intel.com>


More information about the dri-devel mailing list