[PATCH 0/4] [RFC] Addition of dma-mapping IOMMU framework in Exynos DRM
prathyush.k at samsung.com
Sat Apr 14 04:52:09 PDT 2012
From: Prathyush K <prathyush.k at samsung.com>
With these set of patches, the Exynos5 DRM module will be able to
allocate, export and map non-contiguous memory for GEM objects using the
dma-mapping IOMMU framework.
These patches are based on the following references:
1> Exynos 5 SYSMMU driver by Kyongho Cho
2> DMA-MAPPING IOMMU framework by Marek Szyprowski
3> DRM-PRIME by Dave Airlie
4> DRM Exynos DMABUF module by Inki Dae
5> Support for dma_get_pages by Tomasz Stanislawski
The updated GEM framework by Inki Dae is not considered for this patch set.
IOMMU mapping is created for exynos-drm-device initially.
Allocation of GEM objects happens through dma_alloc_writecombine which
inturn calls arm_iommu_alloc_attrs. This will allocate a non-contig set of
pages, allocate a iova and map all the pages.
The following changes are done to support non-contiguous memory for GEM objects
drm/exynos: DMABUF: Added support for exporting non-contig buffers.
This patch is for creating and mapping a SGT in map_dma_buf by
retrieving the pages by calling dma_get_pages.
drm/exynos: Mapping of gem objects uses dma_mmap_writecombine.
This patch is for mapping the non-contiguous GEM objects to user
space by calling dma_mmap_writecombine.
drm/Exynos: Added 'disable' function to Exynos drm crtc module.
This patch is required for safe release of DRM. If a FB of a CRTC
is released, the driver tries to disable the CRTC if that is
supported by the CRTC. This patch adds Exynos DRM CRTC disable
drm: Releasing FBs before releasing GEM objects during drm_release.
This patch is required for safe release of DRM. During drm release,
all the FBs and GEM objects are released. A gem object which is used
as a FB must not be freed first before releasing the FB. This patch
modifies the drm release function to first release the FBs and then
release the GEMs.
drivers/gpu/drm/drm_fops.c | 6 +-
drivers/gpu/drm/exynos/exynos_drm_crtc.c | 11 +++
drivers/gpu/drm/exynos/exynos_drm_dmabuf.c | 98 +++++++++++++++++++++++-----
drivers/gpu/drm/exynos/exynos_drm_gem.c | 70 +++++++++-----------
4 files changed, 128 insertions(+), 57 deletions(-)
More information about the dri-devel