/* * exynos drm buffer structure. * * @base: a gem object. * - a new handle to this gem object would be created * by drm_gem_handle_create(). * @flags: indicate memory type to allocated buffer and cache attruibute. * @size: size requested from user, in bytes and this size is aligned * in page unit. * @cookie: cookie returned by dma_alloc_attrs * @kvaddr: kernel virtual address to allocated memory region (for fbdev) * @dma_addr: bus address(accessed by dma) to allocated memory region. * - this address could be physical address without IOMMU and * device address with IOMMU. * @dma_attrs: attrs passed dma mapping framework * @sgt: Imported sg_table. * * P.S. this object would be transferred to user as kms_bo.handle so * user can access the buffer through kms_bo.handle.
*/ struct exynos_drm_gem { struct drm_gem_object base; unsignedint flags; unsignedlong size; void *cookie; void *kvaddr;
dma_addr_t dma_addr; unsignedlong dma_attrs; struct sg_table *sgt;
};
/* destroy a buffer with gem object */ void exynos_drm_gem_destroy(struct exynos_drm_gem *exynos_gem);
/* create a new buffer with gem object */ struct exynos_drm_gem *exynos_drm_gem_create(struct drm_device *dev, unsignedint flags, unsignedlong size, bool kvmap);
/* * request gem object creation and buffer allocation as the size * that it is calculated with framebuffer information such as width, * height and bpp.
*/ int exynos_drm_gem_create_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv);
/* get fake-offset of gem object that can be used with mmap. */ int exynos_drm_gem_map_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv);
/* * get exynos drm object from gem handle, this function could be used for * other drivers such as 2d/3d acceleration drivers. * with this function call, gem object reference count would be increased.
*/ struct exynos_drm_gem *exynos_drm_gem_get(struct drm_file *filp, unsignedint gem_handle);
/* * put exynos drm object acquired from exynos_drm_gem_get(), * gem object reference count would be decreased.
*/ staticinlinevoid exynos_drm_gem_put(struct exynos_drm_gem *exynos_gem)
{
drm_gem_object_put(&exynos_gem->base);
}
/* get buffer information to memory region allocated by gem. */ int exynos_drm_gem_get_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.