public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: "Koenig, Christian" <Christian.Koenig@amd.com>,
	David Airlie <airlied@linux.ie>, "Huang, Ray" <Ray.Huang@amd.com>,
	"tzimmermann@suse.de" <tzimmermann@suse.de>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 2/8] ttm: turn ttm_bo_device.vma_manager into a pointer
Date: Thu, 8 Aug 2019 14:02:52 +0200	[thread overview]
Message-ID: <20190808120252.GO7444@phenom.ffwll.local> (raw)
In-Reply-To: <20190808103521.u6ggltj4ftns77je@sirius.home.kraxel.org>

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:
> > Am 08.08.19 um 11:36 schrieb Gerd Hoffmann:
> > > Rename the embedded struct vma_offset_manager, it is named _vma_manager
> > > 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.
> > 
> > Can't we go down the route of completely removing the vma_manager from 
> > TTM? ttm_bo_mmap() would get the BO as parameter instead.
> 
> It surely makes sense to target that.  This patch can be a first step
> 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).

+1 on cleaning this up for good, at least long-term ...

> > That would also make the verify_access callback completely superfluous 
> > and looks like a good step into the right direction of de-midlayering.
> 
> Hmm, right, noticed that too while working on another patch series.
> Guess I'll try to merge those two and see where I end up ...

... but if it gets too invasive I'd vote for incremental changes. Even if
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
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

  reply	other threads:[~2019-08-08 12:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190808093702.29512-1-kraxel@redhat.com>
2019-08-08  9:36 ` [PATCH v3 1/8] scsi: core: fix the dma_max_mapping_size call Gerd Hoffmann
2019-08-08 10:23   ` Gerd Hoffmann
2019-08-08  9:36 ` [PATCH v3 2/8] ttm: turn ttm_bo_device.vma_manager into a pointer Gerd Hoffmann
2019-08-08  9:48   ` Koenig, Christian
2019-08-08 10:35     ` Gerd Hoffmann
2019-08-08 12:02       ` Daniel Vetter [this message]
2019-08-08 12:43         ` Thomas Hellström (VMware)
2019-08-08 12:57           ` Koenig, Christian
2019-08-08 13:40         ` Gerd Hoffmann
2019-08-08  9:36 ` [PATCH v3 3/8] drm/ttm: add gem_ttm_bo_device_init() Gerd Hoffmann
2019-08-08  9:36 ` [PATCH v3 4/8] drm/vram: switch vram helpers to the new gem_ttm_bo_device_init() Gerd Hoffmann
2019-08-08  9:36 ` [PATCH v3 5/8] drm/qxl: switch qxl " Gerd Hoffmann
2019-08-08  9:37 ` [PATCH v3 6/8] drm/ttm: add drm_gem_ttm_bo_driver_verify_access() Gerd Hoffmann
2019-08-08  9:37 ` [PATCH v3 7/8] gem/vram: use drm_gem_ttm_bo_driver_verify_access() Gerd Hoffmann
2019-08-08  9:37 ` [PATCH v3 8/8] gem/qxl: " Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190808120252.GO7444@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=Christian.Koenig@amd.com \
    --cc=Ray.Huang@amd.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kraxel@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox