Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp772731ybt; Wed, 17 Jun 2020 13:39:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwV6Jlvz5LWIivO5I1NaJE+t6WlURB0nHYSXb85xSbGQh4YFgVL8aWN491DeW2RERJJTez+ X-Received: by 2002:aa7:d283:: with SMTP id w3mr968691edq.262.1592426368505; Wed, 17 Jun 2020 13:39:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592426368; cv=none; d=google.com; s=arc-20160816; b=YHNeBjrHyydGVZ/2wShGDtTZZgkJeGtD7fONBvzRpKySBzbZusk83Ltx0xa3FaDp5l 16URLT9wn/HkwT550ezE8PFcBMIEadLmt7KGzD18W2fTNxu52+I7ZZyzp9HUQK7Cxbc7 rxXA+x4S5UKnFNzzFIUxwe3yYkXvVIz9ppzeX4OjE1dz9ALkbeueo8JhfgAU+RrLuejR 1wemn/NPpvLSfuXiF/Eqi+xv5io0uSnEQrmxQlTHW9VEKH0Vx51tMluJGNLFHJ7WF4fj 9QrTFZgX3Zb2bIgS0QfoQvOq6YbjffQlUUBO7NXbNPys2M6+w64Ff3s8kf2nCFmPm9mO 4N0w== 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:dkim-signature; bh=KnLCZJwys+q4B3B05ok3TtEm9HWxcpRhuVgOFrlznhw=; b=N2McACzFxcn5QKaTSsNRmA66/43S8xWMYfW++HL9vFFH4CCUmlddfzi6/5veUApTA2 z1UpwDI9E1ZlTNdcZq1TlnQSEJjfV0HPyKqGkDmiMa0oy2CvtuTbFGAri5se141sjU11 zqma5CGiJFsteFPpWzo48UQ5Rg5NQNwtu7X9/vUwvCmjZDmxYgxKmK4yRx5U9LWUh20K coC8OtlRrCT/NZFXgYQVko6t8jLs0TjMDVrFJFBtPmDjpaV1PSmWQHe6VW12Iz73DUzk REtZms4GIecrokckgdg8cAX5FEVGnTac1NL4gvG7sBIacvtn1yyxtxN97hrewrhZstan f2ZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@anholt-net.20150623.gappssmtp.com header.s=20150623 header.b=NFZcC0Hx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h10si521379eja.608.2020.06.17.13.39.05; Wed, 17 Jun 2020 13:39:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@anholt-net.20150623.gappssmtp.com header.s=20150623 header.b=NFZcC0Hx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726848AbgFQUhT (ORCPT + 99 others); Wed, 17 Jun 2020 16:37:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726763AbgFQUhT (ORCPT ); Wed, 17 Jun 2020 16:37:19 -0400 Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1829AC061755 for ; Wed, 17 Jun 2020 13:37:19 -0700 (PDT) Received: by mail-lf1-x142.google.com with SMTP id u25so2158291lfm.1 for ; Wed, 17 Jun 2020 13:37:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anholt-net.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KnLCZJwys+q4B3B05ok3TtEm9HWxcpRhuVgOFrlznhw=; b=NFZcC0HxLVeJtloucD6xkDEeP+TvW++GtU2PKmlM7Pm5PGuHk8vGkD4nuqJXeVe1kD QgPZd8MfuT69OaWTBim3SZi4PnPodruvNDFvFGkGgjPa3MHia3roD+LRImbpilOjbPGE ZzVtW9xZm5CbX8kX5zVUyYCKaCk9XCeyqW6hE//g8E6qJ09W4PLzfAY8BZNDX8d6qwIW 1Qc4DTFOYCVWNqpinrn4k92Ax7orPareKeURiV+EcmQMCws9mV6qBAx/bdFaMw3AAaGn UqR2RZde2nOCN7LOw2hqRRTbNcQ4tJZcO8bFVaZ6LfEdkb1oam83UKvwzc2anAMDXPba ji+w== 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=KnLCZJwys+q4B3B05ok3TtEm9HWxcpRhuVgOFrlznhw=; b=AeALFQE/YyGxB+vUBnJ5DWca4cI6jfDsLjJYRnuy4wJbjxPyUZhq1M7qkid9A2Ughy Cm4v4oCFmx55+SkKhimyBl/lEplfqJ2JackqGYiLgKAuGqbAq+Zq3tRFXkXlk2ms/Asj +XXErxci5IFsbDppmmWat8WMDT9Cp8LzJ8a7m0q0xQXkQLIfnSVsjcTY5W0gGwjjGv38 OpTxRtO9VWbYf5a/qnkRe3ycOZ7WD+83g8xcfGQpf4Flf0jYokjSf4wLZ1B2cam9z8Qz d2dPUBDDppQH4PxqsnWE6DnhEmLHkRH+fKpsVS0vNmDKR/YghWz0JcRg0CYpwKysbNh/ p9dg== X-Gm-Message-State: AOAM531UgRKfiQ40R75vBh04/P4KnASwlJrufgLxKa81/YYGOmfxlVwO miHQSNmTu2kUJQ4qlI/8RlOpZ4tXvxtG7EfICCnElQ== X-Received: by 2002:a19:4bd1:: with SMTP id y200mr402640lfa.60.1592426237348; Wed, 17 Jun 2020 13:37:17 -0700 (PDT) MIME-Version: 1.0 References: <20200409233350.6343-1-jcrouse@codeaurora.org> <20200409233350.6343-5-jcrouse@codeaurora.org> In-Reply-To: From: Eric Anholt Date: Wed, 17 Jun 2020 13:37:06 -0700 Message-ID: Subject: Re: [PATCH v6 4/5] drm/msm: Refactor address space initialization To: Jordan Crouse Cc: iommu@lists.linux-foundation.org, Sam Ravnborg , Jeffrey Hugo , David Airlie , Akhil P Oommen , DRI Development , Bjorn Andersson , AngeloGioacchino Del Regno , will@kernel.org, Ben Dooks , Linux ARM , Brian Masney , freedreno@lists.freedesktop.org, Thomas Zimmermann , linux-arm-msm@vger.kernel.org, Sharat Masetty , Alexios Zavras , Thomas Gleixner , Sean Paul , Allison Randal , Greg Kroah-Hartman , LKML , zhengbin , tongtiangen , Drew Davenport , Wambui Karuga , Robin Murphy , Georgi Djakov 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, Jun 17, 2020 at 1:16 PM Eric Anholt wrote: > > On Thu, Apr 9, 2020 at 4:34 PM Jordan Crouse wrote: > > > > Refactor how address space initialization works. Instead of having the > > address space function create the MMU object (and thus require separate but > > equal functions for gpummu and iommu) use a single function and pass the > > MMU struct in. Make the generic code cleaner by using target specific > > functions to create the address space so a2xx can do its own thing in its > > own space. For all the other targets use a generic helper to initialize > > IOMMU but leave the door open for newer targets to use customization > > if they need it. > > I'm seeing regressions in dEQP-VK.memory.allocation.random.* on cheza > after this commit. The symptom is that large allocations fail with > -ENOSPC from MSM_GEM_INFO(IOVA). > > Possibly relevant change from having stuffed some debug info in: > > before: > [ 3.791436] [drm:msm_gem_address_space_create] *ERROR* msmgem > address space create: 0x1000000 + 0xfeffffff > [ 3.801672] platform 506a000.gmu: Adding to iommu group 6 > [ 3.807359] [drm:msm_gem_address_space_create] *ERROR* msmgem > address space create: 0x0 + 0x7fffffff > [ 3.817140] msm ae00000.mdss: bound 5000000.gpu (ops a3xx_ops) > [ 3.823212] msm_dpu ae01000.mdp: [drm:msm_ioremap] *ERROR* failed > to get memory resource: vbif_nrt > [ 3.832429] msm_dpu ae01000.mdp: [drm:msm_ioremap] *ERROR* failed > to get memory resource: regdma > [ 3.841478] [drm:dpu_kms_hw_init:878] dpu hardware revision:0x40000000 > [ 3.848193] [drm:msm_gem_address_space_create] *ERROR* msmgem > address space create: 0x1000 + 0xffffefff > > after: > > [ 3.798707] [drm:msm_gem_address_space_create] *ERROR* msmgem > address space create: 0x1000000 + 0xfffffff > [ 3.808731] platform 506a000.gmu: Adding to iommu group 6 > [ 3.814440] [drm:msm_gem_address_space_create] *ERROR* msmgem > address space create: 0x0 + 0x7fffffff > [ 3.820494] hub 2-1:1.0: USB hub found > [ 3.824108] msm ae00000.mdss: bound 5000000.gpu (ops a3xx_ops) > [ 3.828554] hub 2-1:1.0: 4 ports detected > [ 3.833756] msm_dpu ae01000.mdp: [drm:msm_ioremap] *ERROR* failed > to get memory resource: vbif_nrt > [ 3.847038] msm_dpu ae01000.mdp: [drm:msm_ioremap] *ERROR* failed > to get memory resource: regdma > [ 3.856095] [drm:dpu_kms_hw_init:878] dpu hardware revision:0x40000000 > [ 3.862840] [drm:msm_gem_address_space_create] *ERROR* msmgem > address space create: 0x1000 + 0xfffffff > > 256MB for GMU address space? Found the bug, fixes at the last 2 commits of https://github.com/anholt/linux/tree/drm-msm-address-space I'm going to try having another go at convincing gmail to let git send-email through, but all the howtos in the world didn't work last time (gsuite has different behavior from normal gmail).