Commit cc01e9c0c8ebbbe181e9c93259301fef8b84f99c

Authored by Dave Airlie
Committed by Greg Kroah-Hartman
1 parent f4589f7bdc

nouveau: bring back legacy mmap handler

commit 2036eaa74031b11028ee8fc1f44f128fdc871dda upstream.

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>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff

drivers/gpu/drm/nouveau/nouveau_ttm.c
... ... @@ -28,6 +28,7 @@
28 28 #include "nouveau_ttm.h"
29 29 #include "nouveau_gem.h"
30 30  
  31 +#include "drm_legacy.h"
31 32 static int
32 33 nouveau_vram_manager_init(struct ttm_mem_type_manager *man, unsigned long psize)
33 34 {
... ... @@ -281,7 +282,7 @@
281 282 struct nouveau_drm *drm = nouveau_drm(file_priv->minor->dev);
282 283  
283 284 if (unlikely(vma->vm_pgoff < DRM_FILE_PAGE_OFFSET))
284   - return -EINVAL;
  285 + return drm_legacy_mmap(filp, vma);
285 286  
286 287 return ttm_bo_mmap(filp, vma, &drm->ttm.bdev);
287 288 }