]> git.baikalelectronics.ru Git - kernel.git/commit
drm/bochs: fix bochs_gem_prime_mmap
authorGerd Hoffmann <kraxel@redhat.com>
Mon, 4 Feb 2019 18:38:58 +0000 (19:38 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 5 Feb 2019 09:28:15 +0000 (10:28 +0100)
commit3bf686772b0f4043deee9d02069aa2f22a91cce4
tree4a855626a4beba47a092f37a9c40b38320da1332
parent4c8b74a2fc1148d9be99c6a7e38e99750427b0c2
drm/bochs: fix bochs_gem_prime_mmap

ttm_fbdev_mmap() just doesn't work.  It appears to work fine, mmap()
returns success, but any attempt to actually access the mapping causes a
SIGBUS.

We can just use drm_gem_prime_mmap() instead.  Almost.  We have to copy
over the start offset from the ttm_buffer_object vm_node to the
drm_gem_object vm_node so the offset math in drm_gem_prime_mmap() works
correctly for us even though we use ttm to manage our objects.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20190204183858.8976-1-kraxel@redhat.com
drivers/gpu/drm/bochs/bochs_mm.c