Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp5279025ybh; Wed, 7 Aug 2019 03:38:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqwbM0arF+gqVrDRcifAlcIZNoWGKyxm6w6QzYqsnJZu724Zqd6omXhWGIV6YHTFaZrKHlQj X-Received: by 2002:a17:902:7b97:: with SMTP id w23mr1631401pll.149.1565174315570; Wed, 07 Aug 2019 03:38:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565174315; cv=none; d=google.com; s=arc-20160816; b=KHJkLjuvB5UtELRJHZl9z+O6xQaFYbCOI/Bq3VnrMtWlFRWrYXPN+RMI38+gbM9F3v eYhUhnTV2T3MwPdAte0Nluj5UadLRVN5CqBnGJ4lNxmaZOV9CZSGJvNinDH9uyplmx6z +amf+7uYXt149Mlz0ct6WLuI+WTsFg1o/4F6dGDObkLYvFc8Hg/SuiK2NE6er/6aMLA7 LO5yJe8qaXoNANQhuS9j9qeET0D9jsppBaJ/JhQLswkmSLllUvZoH+21AvioZZsvEgfh ngEWp6MdDNlkzxnXuXTnpUH5QCw+XU1DqkMlC2/vJj+/r9cRW3q1Q0j5S22A7OBzE4Il t02w== 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=/Bl5CC/DzfqixDr5Df2ygPckMDOa1QnrFySzHV57SDg=; b=ah6zJjVQ9+c8fbYU9k5vgYLFG/6WCf32ZWnmILWUUt9CWrgSzEcm9iFwJa4vac6Cg+ sM8Tro9ZCfPFgc42NSQjIrvxV0fUvGaS+DzAH26lVsLfKjIzZ4J3JBcuwsttjimKhL7M z4d7nqQie7No+0Ou4Yr2eO6wIU1lI5Zsa/CYboXH4tCDKHU6JRPpyPtHrbsA7SomHNrW 8VtW1GT477cUWoC+ujoqW9H0vod2P3wxfWWWIMrGs9STeqcG8jWUigmqBUEB/pxhjIq8 DB2k74fTDaLzBHdBo7CbPSOF+C0mCpFMlW1Haf6oj3b0HUMMZ6GsrodWoGVcgjI9apwo 83pA== 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 p2si49187054pff.164.2019.08.07.03.38.20; Wed, 07 Aug 2019 03:38:35 -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 S1727464AbfHGKgw (ORCPT + 99 others); Wed, 7 Aug 2019 06:36:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47335 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726837AbfHGKgv (ORCPT ); Wed, 7 Aug 2019 06:36:51 -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 69E694C95D; Wed, 7 Aug 2019 10:36:51 +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 DCBE5600C6; Wed, 7 Aug 2019 10:36:50 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 8B82716E32; Wed, 7 Aug 2019 12:36:49 +0200 (CEST) Date: Wed, 7 Aug 2019 12:36:49 +0200 From: Gerd Hoffmann To: Daniel Vetter Cc: dri-devel , Thomas Zimmermann , Maarten Lankhorst , Maxime Ripard , Sean Paul , David Airlie , open list Subject: Re: [PATCH 1/3] drm: add gem ttm helpers Message-ID: <20190807103649.aedmac63eop6ktlk@sirius.home.kraxel.org> References: <20190806133454.8254-1-kraxel@redhat.com> <20190806133454.8254-2-kraxel@redhat.com> <20190806135426.GA7444@phenom.ffwll.local> <20190807072654.arqvx37p4yxhegcu@sirius.home.kraxel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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.26]); Wed, 07 Aug 2019 10:36:51 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, > > > Same for this, you're just upcasting to ttm_bo and then downcasting to > > > gem_bo again ... I think just a series to roll out the existing gem > > > helpers everywhere should work? > > > > I don't think so. drm_gem_dumb_map_offset() calls > > drm_gem_create_mmap_offset(), which I think is not correct for ttm > > objects because ttm_bo_init() handles vma_node initialization. > > More code to unify first? This should work exactly the same way for > all gem based drivers I think ... Only tricky bit is making sure > vmwgfx keeps working correctly. Yea. Unifying on the gem way of doing things isn't going to work very well. We would have to keep the current way of doing things in the ttm code, wrapped into "if (ttm_bo_uses_embedded_gem_object()) { ... }", to not break vmwgfx. So adding gem ttm helpers (where gem+ttm drivers can opt-in) looked like the better way of handling this to me ... cheers, Gerd