All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] [RFC] Addition of dma-mapping IOMMU framework in Exynos DRM
@ 2012-04-14 11:52 Prathyush
  2012-04-14 11:52 ` [PATCH 1/4] [RFC] drm/exynos: DMABUF: Added support for exporting non-contig buffers Prathyush
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Prathyush @ 2012-04-14 11:52 UTC (permalink / raw)
  To: dri-devel, linaro-mm-sig
  Cc: inki.dae, sunilm, subash.rp, prashanth.g, prathyush.k

From: Prathyush K <prathyush.k@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
http://lists.infradead.org/pipermail/linux-arm-kernel/2011-December/078636.htm
2> DMA-MAPPING IOMMU framework by Marek Szyprowski
http://lists.infradead.org/pipermail/linux-arm-kernel/2011-June/053636.html
3> DRM-PRIME by Dave Airlie
http://patches.linaro.org/7480/
4> DRM Exynos DMABUF module by Inki Dae
http://git.infradead.org/users/kmpark/linux-2.6-samsung/commit/
d59d3e521d8a9d27e7b329f89f24a8473f32f50c/
5> Support for dma_get_pages by Tomasz Stanislawski
http://patchwork.linuxtv.org/patch/9639/

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

  [PATCH 1/4]:
	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.

  [PATCH 2/4]:
	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.

  [PATCH 3/4]:
	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
	functionality.

  [PATCH 4/4]:
	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(-)

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-04-16  9:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-14 11:52 [PATCH 0/4] [RFC] Addition of dma-mapping IOMMU framework in Exynos DRM Prathyush
2012-04-14 11:52 ` [PATCH 1/4] [RFC] drm/exynos: DMABUF: Added support for exporting non-contig buffers Prathyush
2012-04-16  1:38   ` Kyungmin Park
2012-04-16  9:02     ` Tomasz Stanislawski
2012-04-16  2:09   ` Inki Dae
2012-04-14 11:52 ` [PATCH 2/4] [RFC] drm/exynos: Mapping of gem objects uses dma_mmap_writecombine Prathyush
2012-04-16  2:21   ` Inki Dae
2012-04-14 11:52 ` [PATCH 3/4] [RFC] drm/Exynos: Added 'disable' function to Exynos drm crtc module Prathyush
2012-04-16  2:42   ` Inki Dae
2012-04-14 11:52 ` [PATCH 4/4] [RFC] drm: Releasing FBs before releasing GEM objects during drm_release Prathyush

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.