diff options
author | Inki Dae <daeinki@gmail.com> | 2012-11-04 00:53:24 -0400 |
---|---|---|
committer | Inki Dae <inki.dae@samsung.com> | 2012-12-04 00:45:58 -0500 |
commit | d87342c10de68d75ecd976556299c68a300c3834 (patch) | |
tree | 6fa9624a0e36b17044ed9ee0264e238271339b15 /drivers/gpu/drm/exynos/exynos_drm_gem.h | |
parent | 1055b39facd1bf8f84031a07385f84b46a20540f (diff) |
drm/exynos: add iommu support for g2d
Chagelog v2:
removed unnecessary structure, struct g2d_gem_node.
Chagelog v1:
This patch adds iommu support for g2d driver. For this, it
adds subdrv_probe/remove callback to enable or disable
g2d iommu. And with this patch, in case of using g2d iommu,
we can get or put device address to a gem handle from user
through exynos_drm_gem_get/put_dma_addr(). Actually, these
functions take a reference to a gem handle so that the gem
object used by g2d dma is released properly.
And runqueue_node has a pointer to drm_file object of current
process to manage gem handles to owner.
This patch is based on the below patch set, "drm/exynos: add
iommu support for -next".
http://www.spinics.net/lists/dri-devel/msg29041.html
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_drm_gem.h')
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_gem.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_gem.h b/drivers/gpu/drm/exynos/exynos_drm_gem.h index 0236321521a1..83d21ef1d1e9 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_gem.h +++ b/drivers/gpu/drm/exynos/exynos_drm_gem.h | |||
@@ -105,9 +105,9 @@ int exynos_drm_gem_create_ioctl(struct drm_device *dev, void *data, | |||
105 | * other drivers such as 2d/3d acceleration drivers. | 105 | * other drivers such as 2d/3d acceleration drivers. |
106 | * with this function call, gem object reference count would be increased. | 106 | * with this function call, gem object reference count would be increased. |
107 | */ | 107 | */ |
108 | void *exynos_drm_gem_get_dma_addr(struct drm_device *dev, | 108 | dma_addr_t *exynos_drm_gem_get_dma_addr(struct drm_device *dev, |
109 | unsigned int gem_handle, | 109 | unsigned int gem_handle, |
110 | struct drm_file *file_priv); | 110 | struct drm_file *filp); |
111 | 111 | ||
112 | /* | 112 | /* |
113 | * put dma address from gem handle and this function could be used for | 113 | * put dma address from gem handle and this function could be used for |
@@ -116,7 +116,7 @@ void *exynos_drm_gem_get_dma_addr(struct drm_device *dev, | |||
116 | */ | 116 | */ |
117 | void exynos_drm_gem_put_dma_addr(struct drm_device *dev, | 117 | void exynos_drm_gem_put_dma_addr(struct drm_device *dev, |
118 | unsigned int gem_handle, | 118 | unsigned int gem_handle, |
119 | struct drm_file *file_priv); | 119 | struct drm_file *filp); |
120 | 120 | ||
121 | /* get buffer offset to map to user space. */ | 121 | /* get buffer offset to map to user space. */ |
122 | int exynos_drm_gem_map_offset_ioctl(struct drm_device *dev, void *data, | 122 | int exynos_drm_gem_map_offset_ioctl(struct drm_device *dev, void *data, |