aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2014-12-16 01:33:09 -0500
committerDave Airlie <airlied@redhat.com>2014-12-22 17:11:43 -0500
commit2036eaa74031b11028ee8fc1f44f128fdc871dda (patch)
tree56bc33a7b5fed78b78f7d3e3232cdb02316c7592 /drivers/gpu/drm
parent97bf6af1f928216fd6c5a66e8a57bfa95a659672 (diff)
nouveau: bring back legacy mmap handler
nouveau userspace back at 1.0.1 used to call the X server DRIOpenDRMMaster interface even for DRI2 (doh!), this attempts to map the sarea and fails if it can't. Since 884c6dabb0eafe7227f099c9e78e514191efaf13 from Daniel, this fails, but only ancient drivers would see it. Revert the nouveau bits of that fix. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: <stable@vger.kernel.org> # 3.18 Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_ttm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_ttm.c b/drivers/gpu/drm/nouveau/nouveau_ttm.c
index 753a6def61e7..3d1cfcb96b6b 100644
--- a/drivers/gpu/drm/nouveau/nouveau_ttm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_ttm.c
@@ -28,6 +28,7 @@
28#include "nouveau_ttm.h" 28#include "nouveau_ttm.h"
29#include "nouveau_gem.h" 29#include "nouveau_gem.h"
30 30
31#include "drm_legacy.h"
31static int 32static int
32nouveau_vram_manager_init(struct ttm_mem_type_manager *man, unsigned long psize) 33nouveau_vram_manager_init(struct ttm_mem_type_manager *man, unsigned long psize)
33{ 34{
@@ -281,7 +282,7 @@ nouveau_ttm_mmap(struct file *filp, struct vm_area_struct *vma)
281 struct nouveau_drm *drm = nouveau_drm(file_priv->minor->dev); 282 struct nouveau_drm *drm = nouveau_drm(file_priv->minor->dev);
282 283
283 if (unlikely(vma->vm_pgoff < DRM_FILE_PAGE_OFFSET)) 284 if (unlikely(vma->vm_pgoff < DRM_FILE_PAGE_OFFSET))
284 return -EINVAL; 285 return drm_legacy_mmap(filp, vma);
285 286
286 return ttm_bo_mmap(filp, vma, &drm->ttm.bdev); 287 return ttm_bo_mmap(filp, vma, &drm->ttm.bdev);
287} 288}