From: Alyssa Rosenzweig <alyssa@rosenzweig.io>
To: Steven Price <steven.price@arm.com>
Cc: Rob Herring <robh@kernel.org>,
Tomeu Vizoso <tomeu.vizoso@collabora.com>,
Neil Armstrong <narmstrong@baylibre.com>,
Maxime Ripard <maxime.ripard@bootlin.com>,
Robin Murphy <robin.murphy@arm.com>,
Will Deacon <will.deacon@arm.com>,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
David Airlie <airlied@linux.ie>,
iommu@lists.linux-foundation.org,
"Marty E . Plummer" <hanetzer@startmail.com>,
Sean Paul <sean@poorly.run>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 3/3] drm/panfrost: Add initial panfrost driver
Date: Fri, 5 Apr 2019 09:16:32 -0700 [thread overview]
Message-ID: <20190405161632.GA9160@rosenzweig.io> (raw)
In-Reply-To: <5efdc3cb-7367-65e1-d1bf-14051db5da10@arm.com>
> I'm also somewhat surprised that you don't need loads of other
> properties from the GPU - in particular knowing the number of shader
> cores is useful for allocating the right amount of memory for TLS (and
> can't be obtained purely from the GPU_ID).
Since I have no idea what TLS is (and in my notes, I've come across the
acronym once ever and have it as a "??"), I'm not sure how to respond to
that... We don't know how to allocate memory for the GPU-internal data
structures (the tiler heap, for instance, but also a few others I've
just named "misc_0" and "scratchpad" -- guessing one of those is for
"TLS"). With kbase, I took the worst-case strategy of allocating
gigantic chunks on startup with tiny commit counts and GROW_ON_GPF set.
With the new driver, well, our memory consumption is scary since
implementing GROW_ON_GPF in an upstream-friendly way is a bit more work
and isn't expected to hit the 5.2 window.
Given this is kernel facing, I'm hoping 're able to share some answers
here?
> I think this comment might have survived since the very earliest version
> of the Midgard driver! :)
^_^
> But I'm not sure anything will attempt to lock a region spanning two
> pages like that.
At least at the moment, I align everything kernel-facing to page
granularity in userspace, so it's not a cornercase I'm going to hit
anytime soon. Still probably better to have it technically correct.
> To be fair only for BASE_HW_ISSUE_6367/T60X - but yes it's not a
> pleasant workaround. There's no way on that hardware to reliably drain
> the write buffer other than waiting.
*wishing T60X disappeared intensifies* ;)
Granted there are enough other errata specific to it that aren't worked
around here that, well, it makes you wonder ;)
> Do we have a good way of user space determining which requirements are
> supported by the driver? At the moment it's just the one. kbase outgeew
> the original u16 and has an ugly "compat_core_req", so I suspect you're
> going to need to add several more along the way.
Oh, so that's why compat_/core_req is split off! I thought somebody just
thought it would be "fun" to break the UABI ;)
I've definitely issues using the wrong core_req field for the kbase I
had setup, that set me back a little bit on RK3399/T860 bringup *purses
lips*
To be fair, bunches of the kbase reqs are for soft jobs, which I don't
feel are a good fit for how the Panfrost kernel works. If we need to
implement functionality corresponding to softjobs, that would likely be
done with dedicated ioctl(s), instead of affecting the core_req field.
On that note
> You might also want to consider being able to submit more than one job
> chain at a time - but that could easily be implemented using a new ioctl
> in the future.
The issue with that at the bottom is having to introduce something akin
to kbase's annoyingly intra-job-chain dependency management (read: I
still don't understand how FBOs are supposed to work with kbase ;) ),
which AFAIK we push off to userspace right now via standard fencing. If
we want to submit batches at a time, we would potentially need to
express those somewhat complex dependency trees, which is a lot of work
for diminishing returns at this stage. Future ioctl indeed...
> There's no SUBMIT_CL in this posting? I think you just need s/_CL//.
+1
> You are probably going to want flags for at least:
>
> * No execute/No read/No write (good for security, especially with
> buffer sharing between processes)
>
> * Alignment (shader programs have quite strict alignment requirements,
> I believe kbase just ensures that the shader memory block doesn't cross
> a 16MB boundary which covers most cases).
>
> * Page fault behaviour (kbase has GROW_ON_GPF)
>
> * Coherency management
+1 for all of these. This is piped through in userspace (for kbase), but
the corresponding functionality isn't there yet in the Panfrost kernel.
You're right there should at least be a flags field for future use.
> One issue that I haven't got to the bottom of is that I can trigger a
> lockdep splat:
Oh, "fun"...
> This is with the below simple reproducer:
@Rob, ideas?
> Other than that in my testing (on a Firefly RK3288) I didn't experience
> any problems pushing jobs from the ARM userspace blob through it.
Nice!
Besides what was mentioned above, any other functionality you'll need
for that? (e.g. the infamous replay workaround...)
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-04-05 16:16 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-01 7:47 [PATCH v2 0/3] Initial Panfrost driver Rob Herring
2019-04-01 7:47 ` [PATCH v3 1/3] iommu: io-pgtable: Add ARM Mali midgard MMU page table format Rob Herring
2019-04-01 19:11 ` Robin Murphy
2019-04-05 10:02 ` Robin Murphy
2019-04-11 13:15 ` Joerg Roedel
2019-04-05 9:42 ` Steven Price
2019-04-05 9:51 ` Robin Murphy
2019-04-05 10:36 ` Steven Price
2019-04-08 8:56 ` Steven Price
2019-04-01 7:47 ` [PATCH v2 2/3] drm: Add a drm_gem_objects_lookup helper Rob Herring
2019-04-01 13:06 ` Daniel Vetter
2019-04-01 13:48 ` Chris Wilson
2019-04-01 15:43 ` Eric Anholt
2019-04-08 20:09 ` Rob Herring
2019-04-09 16:55 ` Eric Anholt
2019-04-01 16:59 ` Rob Herring
2019-04-01 18:22 ` Eric Anholt
2019-04-01 15:05 ` [PATCH v2 0/3] Initial Panfrost driver Alyssa Rosenzweig
[not found] ` <20190401074730.12241-4-robh@kernel.org>
2019-04-01 8:24 ` [PATCH v2 3/3] drm/panfrost: Add initial panfrost driver Neil Armstrong
2019-04-01 19:17 ` Robin Murphy
2019-04-01 16:02 ` Eric Anholt
2019-04-01 19:12 ` Robin Murphy
2019-04-02 0:33 ` Alyssa Rosenzweig
2019-04-02 11:23 ` Robin Murphy
2019-04-03 4:57 ` Rob Herring
2019-04-05 12:57 ` Robin Murphy
[not found] ` <5efdc3cb-7367-65e1-d1bf-14051db5da10@arm.com>
2019-04-05 16:16 ` Alyssa Rosenzweig [this message]
2019-04-05 16:42 ` Steven Price
2019-04-05 16:53 ` Alyssa Rosenzweig
2019-04-15 9:18 ` Daniel Vetter
2019-04-15 9:30 ` Steven Price
2019-04-16 7:51 ` Daniel Vetter
2019-04-08 21:04 ` Rob Herring
2019-04-09 15:56 ` Tomeu Vizoso
2019-04-09 16:15 ` Rob Herring
2019-04-10 10:28 ` Steven Price
2019-04-10 10:19 ` Steven Price
2019-04-10 11:50 ` 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=20190405161632.GA9160@rosenzweig.io \
--to=alyssa@rosenzweig.io \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=hanetzer@startmail.com \
--cc=iommu@lists.linux-foundation.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maxime.ripard@bootlin.com \
--cc=narmstrong@baylibre.com \
--cc=robh@kernel.org \
--cc=robin.murphy@arm.com \
--cc=sean@poorly.run \
--cc=steven.price@arm.com \
--cc=tomeu.vizoso@collabora.com \
--cc=will.deacon@arm.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).