DRM_GEM_CMA_PRIME_IM(9)

NAME
drm_gem_cma_prime_import_sg_table - produce a CMA GEM object from another driver's scatter/gather table of pinned pages

SYNOPSIS

struct drm_gem_object * drm_gem_cma_prime_import_sg_table(struct drm_device * dev, struct dma_buf_attachment * attach, struct sg_table * sgt);

ARGUMENTS

dev
    device to import into

attach
    DMA-BUF attachment

sgt
    scatter/gather table of pinned pages

DESCRIPTION

This function imports a scatter/gather table exported via DMA-BUF by another driver. Imported buffers must be physically contiguous in memory (i.e. the scatter/gather table must contain a single entry). Drivers that use the CMA helpers should set this as their DRM driver's ->gem_prime_import_sg_table callback.

RETURNS

A pointer to a newly created GEM object or an ERR_PTR-encoded negative error code on failure.

AUTHORS

Jesse Barnes <jesse.barnes@intel.com>
Intel Corporation,

    Initial version

Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Ideas on board SPRL,

    Driver internals

Daniel Vetter <daniel.vetter@ffwll.ch>
Intel Corporation,

    Contributions all over the place

COPYRIGHT