On Thu, Aug 08, 2019 at 12:35:21PM +0200, Gerd Hoffmann wrote:
On Thu, Aug 08, 2019 at 09:48:49AM +0000, Koenig, Christian wrote:+1 on cleaning this up for good, at least long-term ...
Am 08.08.19 um 11:36 schrieb Gerd Hoffmann:It surely makes sense to target that. This patch can be a first step
Rename the embedded struct vma_offset_manager, it is named _vma_managerCan't we go down the route of completely removing the vma_manager from
now. ttm_bo_device.vma_manager is a pointer now, pointing to the
embedded ttm_bo_device._vma_manager by default.
Add ttm_bo_device_init_with_vma_manager() function which allows to
initialize ttm with a different vma manager.
TTM? ttm_bo_mmap() would get the BO as parameter instead.
into that direction. It allows gem and ttm to use the same
vma_offset_manager (see patch #3), which in turn makes various gem
functions work on ttm objects (see patch #4 for vram helpers).
... but if it gets too invasive I'd vote for incremental changes. Even ifThat would also make the verify_access callback completely superfluousHmm, right, noticed that too while working on another patch series.
and looks like a good step into the right direction of de-midlayering.
Guess I'll try to merge those two and see where I end up ...
we completely rip out the vma/mmap lookup stuff from ttm, we still need to
keep a copy somewhere for vmwgfx. Or would the evil plan be the vmwgfx
would use the gem mmap helpers too?
-Daniel