Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3222472ybi; Mon, 10 Jun 2019 06:40:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqxWoZjUHAFt0V9NRgOwfpdn3bPlS9j/SOFMVAOQI0hlLBWF9R6iDA5GqBVYpWXyRMUIg+z0 X-Received: by 2002:a63:4045:: with SMTP id n66mr15704654pga.386.1560174038530; Mon, 10 Jun 2019 06:40:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560174038; cv=none; d=google.com; s=arc-20160816; b=KT5MJEofDsEb0xsRIJYZHkmC1kEug6FA7Fvp9OFWWBqy/idbrtkyXLiLlM9dATZd89 9SGWwEqJGqkhLkScYyION34T1zTdCuj2RfAhbIi/hm9Cbv6Xxu00yXfWcPkZHJrb3paE iJFd7TTkhWwYTyX/0UI+lalqdQQbsXUQ3J9YWsdDcLIetXVc9OZmJLIOQ0NLwqGJFLCl 3p7X5S2zSgb167VTFqOWWhKUxSFFoicAwNw8s23QippS7vtjuTIEq+uh0TyaiqfJdony 2Q+2UXGcYw1Rhciu5jS10b986AuI7vlqnLQe/KtfQv+SU/VPQGM8kgIzVlOhTQlxKm0q t4ZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=FXxF10QwbR42YaT69yRZLffS+YTWWOgQXc9GOU0rKmw=; b=dTBrwIW5PefKa9ay/efV6avXG/Gen9DlylZsH8Mw71CUYnN1A4EJGnAVPuf9LMXchR CYWrg55dMKGoLWCNzZTgafSoQn9ALxLYWT7skleu2PnXCn8+rPXuT99u8KJMTmLVI7db 2dQYdg60QZmG5IELYFQmO7tH+41NYBnZvcnUzWDgHrV5sXvFnII5clDDEPdr0SCBPK3p vz1C+X5n+DNrHCDCTF3hjazdMMuovE4Ypmo+aAtraPlsQFR+UEGvLvrS3Tefz6IqwOTZ Zg5RqTdGn9ubYdkZFf9QElX6wchDTUnihPngqPUB1/4/l5ToVmZJieNCM5d/h1XBm+Kf wOHQ== 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=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s12si9643386pji.93.2019.06.10.06.40.21; Mon, 10 Jun 2019 06:40:38 -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=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390354AbfFJNaR convert rfc822-to-8bit (ORCPT + 99 others); Mon, 10 Jun 2019 09:30:17 -0400 Received: from mail-it1-f193.google.com ([209.85.166.193]:40074 "EHLO mail-it1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388833AbfFJNaQ (ORCPT ); Mon, 10 Jun 2019 09:30:16 -0400 Received: by mail-it1-f193.google.com with SMTP id q14so12035796itc.5; Mon, 10 Jun 2019 06:30:16 -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:content-transfer-encoding; bh=FSaiN1DGIOpo9wbwPTRGmWSmcDUKGj8HneroXcSzc/M=; b=GaIs0XWieSJ66GxWn7dGOQPLXZ7tYw3oqRexiLg9vFRKObgJDNyfFKayKImpVRdr6y EmuTthizNWCAYXGEBmmdhfy5I8GHU9/V6DX4Wa7wUwrkkcYAXtOoI5rdnjCTHgJTva6g dUvHT9fTU3knSwYtFYgIOhdYlhvQBB+Y19lhFF9ClpKBaIoWxH301Du+Jjw/W1tj90x8 MuFol9T+CxFPLOMzDlF7ZzAnu0YFsG9XXDQjc46l0UJgsBmmbk2izA2qFElddqsI7mF2 n0KovJoPPYjfZqAVsRsT0kXtAePOGc9H6t5fRZAqJ9OxJ9nHwI/1x7fl6+dKqqPHpqzm nz7A== X-Gm-Message-State: APjAAAWQZk6NAVSZwAxL6eWs6xcTwDT53MVS/m+WxZiZjzl/rieVt1mm H6qaePoVKGaVG/s4VIXvHeFZ1uMQnItOHsbrfwQ= X-Received: by 2002:a02:7b2d:: with SMTP id q45mr42271200jac.127.1560173415987; Mon, 10 Jun 2019 06:30:15 -0700 (PDT) MIME-Version: 1.0 References: <20190521161102.29620-1-peron.clem@gmail.com> <4ff02295-6c34-791b-49f4-6558a92ad7a3@arm.com> In-Reply-To: <4ff02295-6c34-791b-49f4-6558a92ad7a3@arm.com> From: Tomeu Vizoso Date: Mon, 10 Jun 2019 15:30:03 +0200 Message-ID: Subject: Re: [PATCH v6 0/6] Allwinner H6 Mali GPU support To: Robin Murphy Cc: =?UTF-8?B?Q2zDqW1lbnQgUMOpcm9u?= , Mark Rutland , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Neil Armstrong , David Airlie , Will Deacon , open list , dri-devel , Steven Price , Maxime Ripard , Chen-Yu Tsai , Rob Herring , Linux IOMMU , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 29 May 2019 at 19:38, Robin Murphy wrote: > > On 29/05/2019 16:09, Tomeu Vizoso wrote: > > On Tue, 21 May 2019 at 18:11, Clément Péron wrote: > >> > > [snip] > >> [ 345.204813] panfrost 1800000.gpu: mmu irq status=1 > >> [ 345.209617] panfrost 1800000.gpu: Unhandled Page fault in AS0 at VA > >> 0x0000000002400400 > > > > From what I can see here, 0x0000000002400400 points to the first byte > > of the first submitted job descriptor. > > > > So mapping buffers for the GPU doesn't seem to be working at all on > > 64-bit T-760. > > > > Steven, Robin, do you have any idea of why this could be? > > I tried rolling back to the old panfrost/nondrm shim, and it works fine > with kbase, and I also found that T-820 falls over in the exact same > manner, so the fact that it seemed to be common to the smaller 33-bit > designs rather than anything to do with the other > job_descriptor_size/v4/v5 complication turned out to be telling. > > [ as an aside, are 64-bit jobs actually known not to work on v4 GPUs, or > is it just that nobody's yet observed a 64-bit blob driving one? ] Do you know if 64-bit descriptors work on v4 GPUs with our kernel driver but with the DDK? Wonder if there something else to be fixed in the kernel for that scenario. Thanks, Tomeu > Long story short, it appears that 'Mali LPAE' is also lacking the start > level notion of VMSA, and expects a full 4-level table even for <40 bits > when level 0 effectively redundant. Thus walking the 3-level table that > io-pgtable comes back with ends up going wildly wrong. The hack below > seems to do the job for me; if Clément can confirm (on T-720 you'll > still need the userspace hack to force 32-bit jobs as well) then I think > I'll cook up a proper refactoring of the allocator to put things right. > > Robin. > > > ----->8----- > diff --git a/drivers/iommu/io-pgtable-arm.c b/drivers/iommu/io-pgtable-arm.c > index 546968d8a349..f29da6e8dc08 100644 > --- a/drivers/iommu/io-pgtable-arm.c > +++ b/drivers/iommu/io-pgtable-arm.c > @@ -1023,12 +1023,14 @@ arm_mali_lpae_alloc_pgtable(struct > io_pgtable_cfg *cfg, void *cookie) > iop = arm_64_lpae_alloc_pgtable_s1(cfg, cookie); > if (iop) { > u64 mair, ttbr; > + struct arm_lpae_io_pgtable *data = io_pgtable_ops_to_data(&iop->ops); > > + data->levels = 4; > /* Copy values as union fields overlap */ > mair = cfg->arm_lpae_s1_cfg.mair[0]; > ttbr = cfg->arm_lpae_s1_cfg.ttbr[0]; > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel