[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190917095435.oenv4a6ryhvkfmtv@sirius.home.kraxel.org>
Date: Tue, 17 Sep 2019 11:54:35 +0200
From: Gerd Hoffmann <kraxel@...hat.com>
To: Thomas Zimmermann <tzimmermann@...e.de>
Cc: David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel.vetter@...ll.ch>,
open list <linux-kernel@...r.kernel.org>,
dri-devel@...ts.freedesktop.org, Huang Rui <ray.huang@....com>,
Christian Koenig <christian.koenig@....com>
Subject: Re: [PATCH 4/8] drm/ttm: factor out ttm_bo_mmap_vma_setup
> It may not be worth blocking on this, so
>
> Acked-by: Thomas Zimmermann <tzimmermann@...e.de>
>
> But I still think it's not a good interface because it exposes internal
> details.
>
> Please consider another idea: how about splitting off the ttm_bo_get()
> and vma-flags setup of ttm_fbdev_mmap() into a separate function, like this:
>
> void ttm_bo_mmap_refed(vma, bo)
> {
> ttm_bo_get(bo)
> ttm_bo_mmap_vma_setup(vma);
> }
> EXPORT_SYMBOL(ttm_bo_mmap_refed)
ttm_bo_mmap_refed and ttm_bo_mmap_vma_setup are almost identical ...
But, yes, moving the ttm_bo_get call to ttm_bo_mmap_vma_setup probably
makes sense and hides this little detail to the outside.
> ttm_fbdev_mmap() sounds like it is only for fbdev and the only user is
> amdgpu. Can it be moved out of ttm entirely?
Exporting ttm_bo_mmap_vma_setup() allows to do that ;)
cheers,
Gerd
Powered by blists - more mailing lists