Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp6655205ybh; Thu, 8 Aug 2019 03:38:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqxh3F+SQur39Yc/0XUkBBjiGPrbfKZcgxqu+bf82VRkLH1IgSgaalP/Qwc54xlTonK3J2HK X-Received: by 2002:a17:90a:2488:: with SMTP id i8mr3287089pje.123.1565260692130; Thu, 08 Aug 2019 03:38:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565260692; cv=none; d=google.com; s=arc-20160816; b=aBG4zVtUxHqU09SGbk6r4egIdQyfCGxuiku522aTqVYuMefY9CPIWJx4sVTl0mId3q 6V8QAbyqjliPDY6Yv4XxNi9aKT7ASynKgM2EXTq8H3ekAxCG17fLeCypH70RDPOwVYec iUJ2xv2T8Na7Sb2SvNbzMURurjVLNeJcn0w2A08OSTUyoJxxB1nBjsQuFdLtaFF0+803 2Nzh3fGOCV/eO3kVMB7Bu8241UdJWQGT3sbbFiFo0WECNDsyrOmWaRH22PAB7C93zQFc YpTGHLnPKsVljza3opQbm5y+z/MEKOSThCzsjmPp/zLgdwMRYttp/Tvm8YKMxWf7jkO3 DQAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=e0AL8KeCtu2xlun8yUe5BQ6Tnvo3FT+HlxY2z/71RRI=; b=iMzc3OrXhtsYXGDD77QKrQ1tG5kF+HAQ5R6BQoJ0EV1dIYymCsXYGxWaKPgHXGACyj I3bHpWkOaTUaQ56KY/91OTEbL3WZImEzTpcUwH/JXTLQ4Vk2HYQM6I5K1zi2WnCnymfa QxSqCn/DHZPhJC2IH7XieQRv4quGYZ/EwguMLaNZ/cbnFrzeV7KdDvOGypPvtV3HxWGf 1B08EY15HOas9L+pY2s7umSp8pE2n6P1h+8LSh7SAqk/zP8J3dNq66ziX9HnXsx0IgR0 7fXz7vSJ9RRrReXShH4vSEDaQ/5TUay9jyItH0lp8G9oDS7M36zhG86WWzyJ/8n34f5K M4jg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t17si53501163pfe.269.2019.08.08.03.37.55; Thu, 08 Aug 2019 03:38:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390006AbfHHKfZ (ORCPT + 99 others); Thu, 8 Aug 2019 06:35:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34536 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389981AbfHHKfW (ORCPT ); Thu, 8 Aug 2019 06:35:22 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 81CBBEE563; Thu, 8 Aug 2019 10:35:22 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-144.ams2.redhat.com [10.36.116.144]) by smtp.corp.redhat.com (Postfix) with ESMTP id 143C2600C8; Thu, 8 Aug 2019 10:35:22 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 4F40F16E08; Thu, 8 Aug 2019 12:35:21 +0200 (CEST) Date: Thu, 8 Aug 2019 12:35:21 +0200 From: Gerd Hoffmann To: "Koenig, Christian" Cc: "dri-devel@lists.freedesktop.org" , David Airlie , "Huang, Ray" , "tzimmermann@suse.de" , open list Subject: Re: [PATCH v3 2/8] ttm: turn ttm_bo_device.vma_manager into a pointer Message-ID: <20190808103521.u6ggltj4ftns77je@sirius.home.kraxel.org> References: <20190808093702.29512-1-kraxel@redhat.com> <20190808093702.29512-3-kraxel@redhat.com> <2a90c899-19eb-5be2-3eda-f20efd31aa29@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2a90c899-19eb-5be2-3eda-f20efd31aa29@amd.com> User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 08 Aug 2019 10:35:22 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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). > 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 ... cheers, Gerd