Re: [PATCH 40/59] drm/vram-helper: Drop drm_gem_prime_export/import

Gerd Hoffmann
2019-06-17T08:24:38Z

Hi,

> Aside: Would be really nice to switch the others over to
> drm_gem_object_funcs.

While most callbacks are pretty straight forward (just hook the same
callbacks into the drm_gem_object_funcs. struct) the mmap bits are a
bit more obscure.

First, there seem to be two ways to mmap a gem buffer:

(1) drm_driver->fops->mmap, and
(2) drm_driver->gem_prime_mmap.

drm_gem_object_funcs has just a single vm_ops ...

Also it is not obvious how one would convert something which basically
calls ttm_bo_mmap() in drm_driver->fops->mmap to the new interface.

thanks,
Gerd