diff options
author | David Herrmann <dh.herrmann@gmail.com> | 2013-07-26 12:09:32 +0200 |
---|---|---|
committer | Dave Airlie <airlied@gmail.com> | 2013-07-26 20:28:02 +1000 |
commit | aed2c03c8d96ea471b86761129c213e05ab6fbef (patch) | |
tree | 35ee952a2eccc3226e443eafcd85ef2724633d8f /include/drm/drm_mm.h | |
parent | 51335df9f044ccfafb029f4d7fbeb11c4526340a (diff) | |
download | op-kernel-dev-aed2c03c8d96ea471b86761129c213e05ab6fbef.zip op-kernel-dev-aed2c03c8d96ea471b86761129c213e05ab6fbef.tar.gz |
drm/gem: fix mmap vma size calculations
The VMA manager is page-size based so drm_vma_node_size() returns the size
in pages. However, drm_gem_mmap_obj() requires the size in bytes. Apply
PAGE_SHIFT so we no longer get EINVAL during mmaps due to too small
buffers.
This bug was introduced in commit:
0de23977cfeb5b357ec884ba15417ae118ff9e9b
"drm/gem: convert to new unified vma manager"
Fixes i915 gtt mmap failure reported by Sedat Dilek in:
Re: linux-next: Tree for Jul 25 [ call-trace: drm | drm-intel related? ]
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Dave Airlie <airlied@gmail.com>
Diffstat (limited to 'include/drm/drm_mm.h')
0 files changed, 0 insertions, 0 deletions