From mboxrd@z Thu Jan 1 00:00:00 1970 From: Inki Dae Subject: [PATCH 0/3] drm/exynos: add iommu support for -next Date: Sat, 20 Oct 2012 09:18:48 -0700 Message-ID: <1350749931-9232-1-git-send-email-daeinki@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-pb0-f49.google.com (mail-pb0-f49.google.com [209.85.160.49]) by gabe.freedesktop.org (Postfix) with ESMTP id D243A9E70A for ; Sat, 20 Oct 2012 09:19:20 -0700 (PDT) Received: by mail-pb0-f49.google.com with SMTP id xa7so1068280pbc.36 for ; Sat, 20 Oct 2012 09:19:20 -0700 (PDT) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: airlied@linux.ie, dri-devel@lists.freedesktop.org Cc: kyungmin.park@samsung.com, sw0312.kim@samsung.com List-Id: dri-devel@lists.freedesktop.org Hi all, This patch set adds iommu support for exynos drm framework and also relevant drivers, fimd and hdmi. Exynos4xxx SoC and later have some iommu hardware units for video codec, Camera, Post Processer(FIMC and GScaler), FIMD, HDMI, Graphics 2D and so on. In other words, each device has its own iommu hardware unit. So each device could have its own device address space. But in case of using DRM GEM and DMA Mapping API as allocator, there is one issue. the issue is that we can't know which device a gem buffer should be allocated for. So this patch set will use unified device address space. Simply saying, exynos drm-based all devices of using iommu have same device address space. For example, if user process requested gem allocation, exynos drm gem framework allocates desired physical memory region and maps it with unified iommu mapping table through DMA Mapping API call, dma_allc_attrs function. And this patch set is based on the following patch, "DMA-mapping & IOMMU - physically contiguous allocations" Marek posted before as RFC. For this, you can refer to below link, http://www.serverphorums.com/read.php?12,581741 As you know, RFC to the above patch is in progress so we have to wait for the patch to be merged to mainline. Thanks, Inki Dae Inki Dae (3): drm/exynos: add iommu support for exynos drm framework drm/exynos: add iommu support to fimd driver drm/exynos: add iommu support for hdmi driver drivers/gpu/drm/exynos/Kconfig | 6 + drivers/gpu/drm/exynos/Makefile | 1 + drivers/gpu/drm/exynos/exynos_drm_buf.c | 88 +++++------- drivers/gpu/drm/exynos/exynos_drm_dmabuf.c | 87 +++++------- drivers/gpu/drm/exynos/exynos_drm_drv.c | 23 +++- drivers/gpu/drm/exynos/exynos_drm_drv.h | 11 ++ drivers/gpu/drm/exynos/exynos_drm_fb.c | 52 ++++++- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 9 +- drivers/gpu/drm/exynos/exynos_drm_gem.c | 210 +++-------------------------- drivers/gpu/drm/exynos/exynos_drm_gem.h | 1 + drivers/gpu/drm/exynos/exynos_drm_hdmi.c | 15 +++ drivers/gpu/drm/exynos/exynos_drm_hdmi.h | 1 + drivers/gpu/drm/exynos/exynos_drm_iommu.c | 156 +++++++++++++++++++++ drivers/gpu/drm/exynos/exynos_drm_iommu.h | 85 ++++++++++++ drivers/gpu/drm/exynos/exynos_hdmi.c | 21 +++ 15 files changed, 460 insertions(+), 306 deletions(-) create mode 100644 drivers/gpu/drm/exynos/exynos_drm_iommu.c create mode 100644 drivers/gpu/drm/exynos/exynos_drm_iommu.h -- 1.8.0.rc3.16.g8ead1bf