drm: call drm_gem_object_funcs.mmap with fake offset
The fake offset is going to stay, so change the calling convention for drm_gem_object_funcs.mmap to include the fake offset. Update all users accordingly. Note that this reverts83b8a6f242
("drm/gem: Fix mmap fake offset handling for drm_gem_object_funcs.mmap") and on top then adds the fake offset to drm_gem_prime_mmap to make sure all paths leading to obj->funcs->mmap are consistent. v3: move fake-offset tweak in drm_gem_prime_mmap() so we have this code only once in the function (Rob Herring). Fixes:83b8a6f242
("drm/gem: Fix mmap fake offset handling for drm_gem_object_funcs.mmap") Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Rob Herring <robh@kernel.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20191127092523.5620-2-kraxel@redhat.com
This commit is contained in:
@@ -514,13 +514,6 @@ EXPORT_SYMBOL(ttm_bo_mmap);
|
||||
int ttm_bo_mmap_obj(struct vm_area_struct *vma, struct ttm_buffer_object *bo)
|
||||
{
|
||||
ttm_bo_get(bo);
|
||||
|
||||
/*
|
||||
* FIXME: &drm_gem_object_funcs.mmap is called with the fake offset
|
||||
* removed. Add it back here until the rest of TTM works without it.
|
||||
*/
|
||||
vma->vm_pgoff += drm_vma_node_start(&bo->base.vma_node);
|
||||
|
||||
ttm_bo_mmap_vma_setup(bo, vma);
|
||||
return 0;
|
||||
}
|
||||
|
مرجع در شماره جدید
Block a user