Skip to content

Commit

Permalink
nouveau: bring back legacy mmap handler
Browse files Browse the repository at this point in the history
commit 2036eaa 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 884c6da 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>
  • Loading branch information
Dave Airlie authored and Greg Kroah-Hartman committed Jan 16, 2015
1 parent f4589f7 commit cc01e9c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpu/drm/nouveau/nouveau_ttm.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "nouveau_ttm.h"
#include "nouveau_gem.h"

#include "drm_legacy.h"
static int
nouveau_vram_manager_init(struct ttm_mem_type_manager *man, unsigned long psize)
{
Expand Down Expand Up @@ -281,7 +282,7 @@ nouveau_ttm_mmap(struct file *filp, struct vm_area_struct *vma)
struct nouveau_drm *drm = nouveau_drm(file_priv->minor->dev);

if (unlikely(vma->vm_pgoff < DRM_FILE_PAGE_OFFSET))
return -EINVAL;
return drm_legacy_mmap(filp, vma);

return ttm_bo_mmap(filp, vma, &drm->ttm.bdev);
}
Expand Down

0 comments on commit cc01e9c

Please sign in to comment.