diff options
author | Joonyoung Shim <jy0922.shim@samsung.com> | 2013-06-28 14:24:53 +0900 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2013-07-05 15:44:44 +1000 |
commit | 7c397cd97b8f46659698396b420bd48c3e6703e6 (patch) | |
tree | 9125dd69b151ae14c47fa4f3b9e11c27b626821a /drivers | |
parent | f9d8a1294d37449f3f1b842ffb275e2ca41f5cf4 (diff) | |
download | op-kernel-dev-7c397cd97b8f46659698396b420bd48c3e6703e6.zip op-kernel-dev-7c397cd97b8f46659698396b420bd48c3e6703e6.tar.gz |
drm: add mmap function to prime helpers
This adds to call low-level mmap() from prime helpers.
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/drm_prime.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_prime.c b/drivers/gpu/drm/drm_prime.c index ff5fece..85e450e 100644 --- a/drivers/gpu/drm/drm_prime.c +++ b/drivers/gpu/drm/drm_prime.c @@ -245,7 +245,13 @@ 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; + + if (!dev->driver->gem_prime_mmap) + return -ENOSYS; + + return dev->driver->gem_prime_mmap(obj, vma); } static const struct dma_buf_ops drm_gem_prime_dmabuf_ops = { |