All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] drm: add mmap function to prime helpers
@ 2013-06-12 13:16 Joonyoung Shim
  2013-06-12 13:16 ` [PATCH 2/3] drm/cma: add low-level hook functions to use " Joonyoung Shim
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Joonyoung Shim @ 2013-06-12 13:16 UTC (permalink / raw)
  To: dri-devel; +Cc: laurent.pinchart

This adds to call low-level mmap() from prime helpers.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
---
 drivers/gpu/drm/drm_prime.c | 5 ++++-
 include/drm/drmP.h          | 2 ++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_prime.c b/drivers/gpu/drm/drm_prime.c
index d92853e..3a008b2 100644
--- a/drivers/gpu/drm/drm_prime.c
+++ b/drivers/gpu/drm/drm_prime.c
@@ -165,7 +165,10 @@ static void drm_gem_dmabuf_kunmap(struct dma_buf *dma_buf,
 static int drm_gem_dmabuf_mmap(struct dma_buf *dma_buf,
 		struct vm_area_struct *vma)
 {
-	return -EINVAL;
+	struct drm_gem_object *obj = dma_buf->priv;
+	struct drm_device *dev = obj->dev;
+
+	return dev->driver->gem_prime_mmap(obj, vma);
 }
 
 static const struct dma_buf_ops drm_gem_prime_dmabuf_ops =  {
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 82670ac..12083dc 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -937,6 +937,8 @@ struct drm_driver {
 				struct sg_table *sgt);
 	void *(*gem_prime_vmap)(struct drm_gem_object *obj);
 	void (*gem_prime_vunmap)(struct drm_gem_object *obj, void *vaddr);
+	int (*gem_prime_mmap)(struct drm_gem_object *obj,
+				struct vm_area_struct *vma);
 
 	/* vga arb irq handler */
 	void (*vgaarb_irq)(struct drm_device *dev, bool state);
-- 
1.8.1.2

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

end of thread, other threads:[~2013-06-17  2:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-12 13:16 [PATCH 1/3] drm: add mmap function to prime helpers Joonyoung Shim
2013-06-12 13:16 ` [PATCH 2/3] drm/cma: add low-level hook functions to use " Joonyoung Shim
2013-06-12 13:16 ` [PATCH 3/3] drm/cma: remove GEM CMA specific dma_buf functionality Joonyoung Shim
2013-06-14 17:16 ` [PATCH 1/3] drm: add mmap function to prime helpers Aaron Plattner
2013-06-17  2:02   ` Joonyoung Shim

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.