Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp3935538ybe; Mon, 9 Sep 2019 01:16:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqyCszIBRoQ63F3b94zU4dLQvGM6AoaOundGyDSwHsB6GMFt7+1bjNkhSiMtCD72jVGKLL0i X-Received: by 2002:a50:9512:: with SMTP id u18mr22722249eda.182.1568017019053; Mon, 09 Sep 2019 01:16:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568017019; cv=none; d=google.com; s=arc-20160816; b=XYgsV9MX8ScjoxyLbcy3dWTbvuKf4E//JzbjxxpgnrtJitNS1RVLZVEwvmqmWVle27 Xd2T9l3+tp1Og++Raz1XSh1pwoIwL7zYJpx+YYO9p58Keb5U+Gt2YADhnuQsYxX+46Nw qX3L9p5i5FSSojIuS9GfF7FzZL+0v19TOx4DH3y7bJZsI4judcNeONLP12mA2sBwITN0 hGqQmzKrQIAdQN90Pc/6rJk0NY1mZd6Ka8pj+RB7VZyTBFi12opWcsZjZl3PXqOAwX+n bWgcSVlzRxJTwPIrGd1pl5C04ZGCaiXFGgr8gYfZITsU9PfeFLRT2gaiiuKW5vhqhqkv wFtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=9wvcp3nV7La4YoI+ieadHx02sDBCIHvis3wKPKJAabs=; b=BuHzYV/BqfrJh3+WPkVrpjgQkQuxs+KnnedLDjHt5Koc+ApqM9KO3UdB774DH6L+mT SgMBExE59BBmATb26wt5T2UaDvwFpBRNp3MpIdtNpfxiABh4W8tryTy4VxEnaJe7dtvX dyo/AkQlr4g2er+m12GcU9gAGP25QFmzCziNchH2aGWTjnS8uuWAh1bwyFAd3TsdOg30 f28+B4V3BVwmkCuQs3jTCdT03L/GRLxVA2m8TBvX7E6Bqzeyy3GdNARpmomSeFfBP7sN XSwkdYhUrPWuXsUQpK0PF1Z+lkHSFjnFfgGl772X3pJw6scnbjYddqaysyZ8Fkla+Q1y GGKQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q17si5495213edb.154.2019.09.09.01.16.35; Mon, 09 Sep 2019 01:16:59 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387452AbfIHB67 (ORCPT + 99 others); Sat, 7 Sep 2019 21:58:59 -0400 Received: from mail-vs1-f67.google.com ([209.85.217.67]:40461 "EHLO mail-vs1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726060AbfIHB67 (ORCPT ); Sat, 7 Sep 2019 21:58:59 -0400 Received: by mail-vs1-f67.google.com with SMTP id v10so3320272vsc.7 for ; Sat, 07 Sep 2019 18:58:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9wvcp3nV7La4YoI+ieadHx02sDBCIHvis3wKPKJAabs=; b=b6HiGLnU9c7DdRS2rxcupMjmCs9fFhUZamLF97Axg54X2UqhBrg58HEi5PNBQ6fxzn my02Hvw7Z33rRD8svkRf6HT4pmCSZ8VP7yJupuH5styJ6mobAAy7Ih2e4g+R9tAMpLLf BRKsStguEpfQGKkBR+xQqblSxWX5v5OHF1QPV5md7tfVUCllgY+sSlkU3Cw2wGjunibS 57yASjQpOf5K4H8sYUUflZrA4elX1cI152czf2vkiLFxPDtw+sC7vgR6jlhQwIu9rmv8 ah9nLTVC+OTTxYr+xgc4slKo6Qy7T5GbcYx2jWozpnR0caX2ErYTMKW1WFXceLB7cKV0 JYlg== X-Gm-Message-State: APjAAAV1zc/99h5FXlUcLsEJFmdwcakURZnwyAMpjBtKWc800weY9TD6 FCgVraMo1I/rWaRK9Tu0+DxB3UfDpEWhgqJZvl4= X-Received: by 2002:a67:db12:: with SMTP id z18mr7697263vsj.18.1567907937861; Sat, 07 Sep 2019 18:58:57 -0700 (PDT) MIME-Version: 1.0 References: <20190805140119.7337-1-kraxel@redhat.com> <20190805140119.7337-9-kraxel@redhat.com> <20190813151115.GA29955@ulmo> <20190814055827.6hrxj6daovxxnnvw@sirius.home.kraxel.org> <20190814093524.GA31345@ulmo> <20190814101411.lj3p6zjzbjvnnjf4@sirius.home.kraxel.org> <20190821115523.GA21839@ulmo> In-Reply-To: <20190821115523.GA21839@ulmo> From: Ilia Mirkin Date: Sat, 7 Sep 2019 21:58:46 -0400 Message-ID: Subject: Re: [Nouveau] [Intel-gfx] [PATCH v6 08/17] drm/ttm: use gem vma_node To: Thierry Reding Cc: Ben Skeggs , ML dri-devel , ML nouveau , intel-gfx , LKML , amd-gfx mailing list , linux-graphics-maintainer@vmware.com, Gerd Hoffmann , spice-devel@lists.freedesktop.org, Ben Skeggs Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 21, 2019 at 7:55 AM Thierry Reding wrote: > > On Wed, Aug 21, 2019 at 04:33:58PM +1000, Ben Skeggs wrote: > > On Wed, 14 Aug 2019 at 20:14, Gerd Hoffmann wrote: > > > > > > Hi, > > > > > > > > Changing the order doesn't look hard. Patch attached (untested, have no > > > > > test hardware). But maybe I missed some detail ... > > > > > > > > I came up with something very similar by splitting up nouveau_bo_new() > > > > into allocation and initialization steps, so that when necessary the GEM > > > > object can be initialized in between. I think that's slightly more > > > > flexible and easier to understand than a boolean flag. > > > > > > Yes, that should work too. > > > > > > Acked-by: Gerd Hoffmann > > Acked-by: Ben Skeggs > > Thanks guys, applied to drm-misc-next. Hi Thierry, Initial investigations suggest that this commit currently in drm-next commit 019cbd4a4feb3aa3a917d78e7110e3011bbff6d5 Author: Thierry Reding Date: Wed Aug 14 11:00:48 2019 +0200 drm/nouveau: Initialize GEM object before TTM object breaks nouveau userspace which tries to allocate GEM objects with a non-page-aligned size. Previously nouveau_gem_new would just call nouveau_bo_init which would call nouveau_bo_fixup_align before initializing the GEM object. With this change, it is done after. What do you think -- OK to just move that bit of logic into the new nouveau_bo_alloc() (and make size/align be pointers so that they can be fixed up?) Cheers, -ilia