summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/udl/udl_gem.c
diff options
context:
space:
mode:
authorKonstantin Khlebnikov <khlebnikov@openvz.org>2012-03-31 13:29:25 +0400
committerDave Airlie <airlied@redhat.com>2012-04-02 11:08:17 +0100
commitfa9e855025b19e96e493ee00de7d933a9794f742 (patch)
treef58d289ecb25d82483b9158406f510a3783022fb /drivers/gpu/drm/udl/udl_gem.c
parent402976fe51b2d1a58a29ba06fa1ca5ace3a4cdcd (diff)
downloadlwn-fa9e855025b19e96e493ee00de7d933a9794f742.tar.gz
lwn-fa9e855025b19e96e493ee00de7d933a9794f742.zip
mm, drm/udl: fixup vma flags on mmap
There should be VM_MIXEDMAP, not VM_PFNMAP, because udl_gem_fault() inserts pages via vm_insert_page(). Other drm/gem drivers already do this. Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org> Cc: Dave Airlie <airlied@redhat.com> Cc: dri-devel@lists.freedesktop.org Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/udl/udl_gem.c')
-rw-r--r--drivers/gpu/drm/udl/udl_gem.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/drm/udl/udl_gem.c b/drivers/gpu/drm/udl/udl_gem.c
index 852642dc1187..92f19ef329b0 100644
--- a/drivers/gpu/drm/udl/udl_gem.c
+++ b/drivers/gpu/drm/udl/udl_gem.c
@@ -71,6 +71,20 @@ int udl_dumb_destroy(struct drm_file *file, struct drm_device *dev,
return drm_gem_handle_delete(file, handle);
}
+int udl_drm_gem_mmap(struct file *filp, struct vm_area_struct *vma)
+{
+ int ret;
+
+ ret = drm_gem_mmap(filp, vma);
+ if (ret)
+ return ret;
+
+ vma->vm_flags &= ~VM_PFNMAP;
+ vma->vm_flags |= VM_MIXEDMAP;
+
+ return ret;
+}
+
int udl_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
{
struct udl_gem_object *obj = to_udl_bo(vma->vm_private_data);