LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Tomeu Vizoso <tomeu.vizoso@collabora.com>
To: Robin Murphy <robin.murphy@arm.com>
Cc: "Clément Péron" <peron.clem@gmail.com>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
	<devicetree@vger.kernel.org>,
	"Neil Armstrong" <narmstrong@baylibre.com>,
	"David Airlie" <airlied@linux.ie>,
	"Will Deacon" <will.deacon@arm.com>,
	"open list" <linux-kernel@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	"Steven Price" <steven.price@arm.com>,
	"Maxime Ripard" <maxime.ripard@bootlin.com>,
	"Chen-Yu Tsai" <wens@csie.org>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Linux IOMMU" <iommu@lists.linux-foundation.org>,
	"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v6 0/6] Allwinner H6 Mali GPU support
Date: Fri, 31 May 2019 14:04:50 +0200	[thread overview]
Message-ID: <CAAObsKBt1tPw9RKGi_Xey=1zy9Tu3N+A=1te2R8=NuJ5tDBqVg@mail.gmail.com> (raw)
In-Reply-To: <4ff02295-6c34-791b-49f4-6558a92ad7a3@arm.com>

On Wed, 29 May 2019 at 19:38, Robin Murphy <robin.murphy@arm.com> wrote:
>
> On 29/05/2019 16:09, Tomeu Vizoso wrote:
> > On Tue, 21 May 2019 at 18:11, Clément Péron <peron.clem@gmail.com> 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.

Is this complication something you can explain? I don't know what v4
and v5 are meant here.

> [ 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? ]

I'm looking right now at getting Panfrost working on T720 with 64-bit
descriptors, with the ultimate goal of making Panfrost
64-bit-descriptor only so we can have a single build of Mesa in
distros.

> 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.

Mmaps seem to work with this patch, thanks.

The main complication I'm facing right now seems to be that the SFBD
descriptor on T720 seems to be different from the one we already had
(tested on T6xx?).

Cheers,

Tomeu

> 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

  reply	other threads:[~2019-05-31 12:05 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-21 16:10 Clément Péron
2019-05-21 16:10 ` [PATCH v6 1/6] drm: panfrost: add optional bus_clock Clément Péron
2019-05-21 16:10 ` [PATCH v6 2/6] iommu: io-pgtable: fix sanity check for non 48-bit mali iommu Clément Péron
2019-05-21 16:10 ` [PATCH v6 3/6] dt-bindings: gpu: add bus clock for Mali Midgard GPUs Clément Péron
2019-05-21 16:11 ` [PATCH v6 4/6] dt-bindings: gpu: mali-midgard: Add H6 mali gpu compatible Clément Péron
2019-05-21 16:11 ` [PATCH v6 5/6] arm64: dts: allwinner: Add ARM Mali GPU node for H6 Clément Péron
2019-05-21 16:11 ` [PATCH v6 6/6] arm64: dts: allwinner: Add mali GPU supply for H6 boards Clément Péron
2019-05-22 19:27 ` [PATCH v6 0/6] Allwinner H6 Mali GPU support Rob Herring
2019-05-22 19:41   ` Clément Péron
2019-05-22 20:51     ` Rob Herring
2019-06-03 17:27   ` Clément Péron
2019-05-24 17:25 ` Robin Murphy
2019-05-29 15:09 ` Tomeu Vizoso
2019-05-29 17:38   ` Robin Murphy
2019-05-31 12:04     ` Tomeu Vizoso [this message]
2019-05-31 13:47       ` Robin Murphy
2019-08-28 11:28         ` Neil Armstrong
2019-08-28 11:49           ` Robin Murphy
2019-08-28 11:51             ` Neil Armstrong
2019-06-10 13:30     ` Tomeu Vizoso
2019-05-29 15:32 ` [PATCH] arm64: dts: allwinner: Add GPU operating points for H6 Tomeu Vizoso
2019-05-29 15:37   ` Clément Péron
2019-05-29 15:42     ` Tomeu Vizoso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAAObsKBt1tPw9RKGi_Xey=1zy9Tu3N+A=1te2R8=NuJ5tDBqVg@mail.gmail.com' \
    --to=tomeu.vizoso@collabora.com \
    --cc=airlied@linux.ie \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=maxime.ripard@bootlin.com \
    --cc=narmstrong@baylibre.com \
    --cc=peron.clem@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=steven.price@arm.com \
    --cc=wens@csie.org \
    --cc=will.deacon@arm.com \
    --subject='Re: [PATCH v6 0/6] Allwinner H6 Mali GPU support' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).