linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Koenig, Christian" <Christian.Koenig@amd.com>
To: "Thomas Hellström (VMware)" <thomas@shipmail.org>,
	"Gerd Hoffmann" <kraxel@redhat.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 12:57:03 +0000	[thread overview]
Message-ID: <bfe6eb50-7d90-3699-607d-9146b47bb6e4@amd.com> (raw)
In-Reply-To: <36145412-3c31-e635-1e8b-b42439811742@shipmail.org>

Am 08.08.19 um 14:43 schrieb Thomas Hellström (VMware):
> On 8/8/19 2:02 PM, Daniel Vetter wrote:
>> 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?
>
> I don't think it would be too invasive. We could simply move 
> ttm_bo_vm_lookup into a vmw_mmap.

Yeah, agree. vmwgfx would just inherit what TTM is currently doing and 
everybody else would start to use the GEM helpers.

Switching the vma_manager to a pointer might be helpful in the middle of 
the patch set, but as stand a lone change that looks like a detour to me.

I suggest to start by adding the bo as parameter to ttm_bo_mmap and 
moving the lockup out of that function.

Christian.

>
> /Thomas
>
>
>
>
>> -Daniel
>
>


  reply	other threads:[~2019-08-08 12:57 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
2019-08-08 12:43         ` Thomas Hellström (VMware)
2019-08-08 12:57           ` Koenig, Christian [this message]
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=bfe6eb50-7d90-3699-607d-9146b47bb6e4@amd.com \
    --to=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=thomas@shipmail.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;
as well as URLs for NNTP newsgroup(s).