<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.c, branch linus/master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.c?h=linus%2Fmaster</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.c?h=linus%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2019-08-15T10:07:47Z</updated>
<entry>
<title>drm/etnaviv: implement softpin</title>
<updated>2019-08-15T10:07:47Z</updated>
<author>
<name>Lucas Stach</name>
<email>l.stach@pengutronix.de</email>
</author>
<published>2019-08-02T12:27:33Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=088880ddc0b20086b71bb87b805fb63ff07c35f2'/>
<id>urn:sha1:088880ddc0b20086b71bb87b805fb63ff07c35f2</id>
<content type='text'>
With softpin we allow the userspace to take control over the GPU virtual
address space. The new capability is relected by a bump of the minor DRM
version. There are a few restrictions for userspace to take into
account:

1. The kernel reserves a bit of the address space to implement zero page
faulting and mapping of the kernel internal ring buffer. Userspace can
query the kernel for the first usable GPU VM address via
ETNAVIV_PARAM_SOFTPIN_START_ADDR.

2. We only allow softpin on GPUs, which implement proper process
separation via PPAS. If softpin is not available the softpin start
address will be set to ~0.

3. Softpin is all or nothing. A submit using softpin must not use any
address fixups via relocs.

Signed-off-by: Lucas Stach &lt;l.stach@pengutronix.de&gt;
Reviewed-by: Philipp Zabel &lt;p.zabel@pengutronix.de&gt;
Reviewed-by: Guido Günther &lt;agx@sigxcpu.org&gt;
</content>
</entry>
<entry>
<title>drm/etnaviv: rework MMU handling</title>
<updated>2019-08-15T08:56:45Z</updated>
<author>
<name>Lucas Stach</name>
<email>l.stach@pengutronix.de</email>
</author>
<published>2019-07-05T17:17:24Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=27b67278e007b5475bc14918794bf73cf297a026'/>
<id>urn:sha1:27b67278e007b5475bc14918794bf73cf297a026</id>
<content type='text'>
This reworks the MMU handling to make it possible to have multiple MMU contexts.
A context is basically one instance of GPU page tables. Currently we have one
set of page tables per GPU, which isn't all that clever, as it has the
following two consequences:

1. All GPU clients (aka processes) are sharing the same pagetables, which means
there is no isolation between clients, but only between GPU assigned memory
spaces and the rest of the system. Better than nothing, but also not great.

2. Clients operating on the same set of buffers with different etnaviv GPU
cores, e.g. a workload using both the 2D and 3D GPU, need to map the used
buffers into the pagetable sets of each used GPU.

This patch reworks all the MMU handling to introduce the abstraction of the
MMU context. A context can be shared across different GPU cores, as long as
they have compatible MMU implementations, which is the case for all systems
with Vivante GPUs seen in the wild.

As MMUv1 is not able to change pagetables on the fly, without a
"stop the world" operation, which stops GPU, changes pagetables via CPU
interaction, restarts GPU, the implementation introduces a shared context on
MMUv1, which is returned whenever there is a request for a new context.

This patch assigns a MMU context to each GPU, so on MMUv2 systems there is
still one set of pagetables per GPU, but due to the shared context MMUv1
systems see a change in behavior as now a single pagetable set is used
across all GPU cores.

Signed-off-by: Lucas Stach &lt;l.stach@pengutronix.de&gt;
Reviewed-by: Philipp Zabel &lt;p.zabel@pengutronix.de&gt;
Reviewed-by: Guido Günther &lt;agx@sigxcpu.org&gt;
</content>
</entry>
<entry>
<title>drm/etnaviv: share a single cmdbuf suballoc region across all GPUs</title>
<updated>2019-08-15T08:55:30Z</updated>
<author>
<name>Lucas Stach</name>
<email>l.stach@pengutronix.de</email>
</author>
<published>2019-07-05T17:17:22Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=bffe5db81ae63ec75f5e09d1c97de42c37cb181e'/>
<id>urn:sha1:bffe5db81ae63ec75f5e09d1c97de42c37cb181e</id>
<content type='text'>
There is no need for each GPU to have it's own cmdbuf suballocation
region. Only allocate a single one for the the etnaviv virtual device
and share it across all GPUs.

As the suballoc space is now potentially shared by more hardware jobs
running in parallel, double its size to 512KB to avoid contention.

Signed-off-by: Lucas Stach &lt;l.stach@pengutronix.de&gt;
Reviewed-by: Philipp Zabel &lt;p.zabel@pengutronix.de&gt;
Reviewed-by: Guido Günther &lt;agx@sigxcpu.org&gt;
</content>
</entry>
<entry>
<title>drm/etnaviv: split out cmdbuf mapping into address space</title>
<updated>2019-08-15T08:55:03Z</updated>
<author>
<name>Lucas Stach</name>
<email>l.stach@pengutronix.de</email>
</author>
<published>2019-07-05T17:17:21Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=db82a0435b8be32d544bbed91c43c2f21b5f4ea7'/>
<id>urn:sha1:db82a0435b8be32d544bbed91c43c2f21b5f4ea7</id>
<content type='text'>
This allows to decouple the cmdbuf suballocator create and mapping
the region into the GPU address space. Allowing multiple AS to share
a single cmdbuf suballoc.

Signed-off-by: Lucas Stach &lt;l.stach@pengutronix.de&gt;
Reviewed-by: Philipp Zabel &lt;p.zabel@pengutronix.de&gt;
Reviewed-by: Guido Günther &lt;agx@sigxcpu.org&gt;
</content>
</entry>
<entry>
<title>drm/etnaviv: fix etnaviv_cmdbuf_suballoc_new return value</title>
<updated>2019-08-09T09:06:38Z</updated>
<author>
<name>Lucas Stach</name>
<email>l.stach@pengutronix.de</email>
</author>
<published>2019-07-05T17:15:35Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=c53ab61312ceb2c2c8fdf50137361a77ef0fc155'/>
<id>urn:sha1:c53ab61312ceb2c2c8fdf50137361a77ef0fc155</id>
<content type='text'>
The call site expects to get either a valid suballoc or an error
pointer, so a NULL return will not be treated as an error. Make
sure to always return a proper error pointer in case something goes
wrong.

Signed-off-by: Lucas Stach &lt;l.stach@pengutronix.de&gt;
Reviewed-by: Philipp Zabel &lt;p.zabel@pengutronix.de&gt;
Reviewed-by: Guido Günther &lt;agx@sigxcpu.org&gt;
</content>
</entry>
<entry>
<title>drm/etnaviv: drop use of drmP.h</title>
<updated>2019-08-02T17:14:51Z</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@ravnborg.org</email>
</author>
<published>2019-06-30T05:21:03Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=6eae41fea75039136707c02cf99431462d590c5f'/>
<id>urn:sha1:6eae41fea75039136707c02cf99431462d590c5f</id>
<content type='text'>
Drop use of the deprecated drmP.h header file.
Fix fallout in all .c files.

The etnaviv_drv.h header file was made self-contained,
and missing includes was then added to the .c files that needed them.
In a few cases the list of include files was sorted.

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Cc: Lucas Stach &lt;l.stach@pengutronix.de&gt;
Cc: Russell King &lt;linux+etnaviv@armlinux.org.uk&gt;
Cc: Christian Gmeiner &lt;christian.gmeiner@gmail.com&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Cc: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Cc: etnaviv@lists.freedesktop.org
Signed-off-by: Lucas Stach &lt;l.stach@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>drm/etnaviv: replace license text with SPDX tags</title>
<updated>2018-05-18T13:27:56Z</updated>
<author>
<name>Lucas Stach</name>
<email>l.stach@pengutronix.de</email>
</author>
<published>2018-05-08T14:20:54Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=f6ffbd4fc1a1caafe2ab840993b917fba5324598'/>
<id>urn:sha1:f6ffbd4fc1a1caafe2ab840993b917fba5324598</id>
<content type='text'>
This replaces the repetitive GPL-2.0 license text in code and header files
with the SPDX tags. Generated hardware headers aren't changed, as any changes
there need to be done in the upstream rnndb repository.

Signed-off-by: Lucas Stach &lt;l.stach@pengutronix.de&gt;
Reviewed-by: Christian Gmeiner &lt;christian.gmeiner@gmail.com&gt;
</content>
</entry>
<entry>
<title>drm/etnaviv: move cmdbuf into submit object</title>
<updated>2018-01-02T16:33:36Z</updated>
<author>
<name>Lucas Stach</name>
<email>l.stach@pengutronix.de</email>
</author>
<published>2017-11-24T15:56:37Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=2f9225dbc09abe7cacb9820ebdeef5b6c0eb9c72'/>
<id>urn:sha1:2f9225dbc09abe7cacb9820ebdeef5b6c0eb9c72</id>
<content type='text'>
Less dynamic allocations and slims down the cmdbuf object to only the
required information, as everything else is already available in the
submit object.

This also simplifies buffer and mappings lifetime management, as they
are now exlusively attached to the submit object and not additionally
to the cmdbuf.

Signed-off-by: Lucas Stach &lt;l.stach@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>drm/etnaviv: move PMRs to submit object</title>
<updated>2018-01-02T16:31:59Z</updated>
<author>
<name>Lucas Stach</name>
<email>l.stach@pengutronix.de</email>
</author>
<published>2017-11-24T11:02:38Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=ef146c00e2c29c5f926c6a7e9dc354c0cbeb2818'/>
<id>urn:sha1:ef146c00e2c29c5f926c6a7e9dc354c0cbeb2818</id>
<content type='text'>
To make them available to the event worker even after the actual
command stream execution has finished.

Signed-off-by: Lucas Stach &lt;l.stach@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>drm/etnaviv: extend etnaviv_gpu_cmdbuf_new(..) with nr_pmrs</title>
<updated>2017-10-10T09:45:43Z</updated>
<author>
<name>Christian Gmeiner</name>
<email>christian.gmeiner@gmail.com</email>
</author>
<published>2017-09-24T13:15:24Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=4fc3e66adb291cc3ec4a360c75221e9fbf416938'/>
<id>urn:sha1:4fc3e66adb291cc3ec4a360c75221e9fbf416938</id>
<content type='text'>
This commits extends etnaviv_gpu_cmdbuf_new(..) to define the number
of struct etnaviv_perfmon elements gets used.

Changes from v1 -&gt; v2:
- make use of goto as requested by Lucas

Signed-off-by: Christian Gmeiner &lt;christian.gmeiner@gmail.com&gt;
Signed-off-by: Lucas Stach &lt;l.stach@pengutronix.de&gt;
</content>
</entry>
</feed>
