<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/panfrost, branch v5.15.7</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.15.7</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.15.7'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2021-08-25T14:40:19+00:00</updated>
<entry>
<title>drm/panfrost: Clamp lock region to Bifrost minimum</title>
<updated>2021-08-25T14:40:19+00:00</updated>
<author>
<name>Alyssa Rosenzweig</name>
<email>alyssa.rosenzweig@collabora.com</email>
</author>
<published>2021-08-24T17:30:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bd7ffbc3ca12629aeb66fb9e28cf42b7f37e3e3b'/>
<id>urn:sha1:bd7ffbc3ca12629aeb66fb9e28cf42b7f37e3e3b</id>
<content type='text'>
When locking a region, we currently clamp to a PAGE_SIZE as the minimum
lock region. While this is valid for Midgard, it is invalid for Bifrost,
where the minimum locking size is 8x larger than the 4k page size. Add a
hardware definition for the minimum lock region size (corresponding to
KBASE_LOCK_REGION_MIN_SIZE_LOG2 in kbase) and respect it.

Signed-off-by: Alyssa Rosenzweig &lt;alyssa.rosenzweig@collabora.com&gt;
Tested-by: Chris Morgan &lt;macromorgan@hotmail.com&gt;
Reviewed-by: Steven Price &lt;steven.price@arm.com&gt;
Reviewed-by: Rob Herring &lt;robh@kernel.org&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Steven Price &lt;steven.price@arm.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210824173028.7528-4-alyssa.rosenzweig@collabora.com
</content>
</entry>
<entry>
<title>drm/panfrost: Use u64 for size in lock_region</title>
<updated>2021-08-25T14:40:08+00:00</updated>
<author>
<name>Alyssa Rosenzweig</name>
<email>alyssa.rosenzweig@collabora.com</email>
</author>
<published>2021-08-24T17:30:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a77b58825d7221d4a45c47881c35a47ba003aa73'/>
<id>urn:sha1:a77b58825d7221d4a45c47881c35a47ba003aa73</id>
<content type='text'>
Mali virtual addresses are 48-bit. Use a u64 instead of size_t to ensure
we can express the "lock everything" condition as ~0ULL without
overflow. This code was silently broken on any platform where a size_t
is less than 48-bits; in particular, it was broken on 32-bit armv7
platforms which remain in use with panfrost. (Mainly RK3288)

Signed-off-by: Alyssa Rosenzweig &lt;alyssa.rosenzweig@collabora.com&gt;
Suggested-by: Rob Herring &lt;robh@kernel.org&gt;
Tested-by: Chris Morgan &lt;macromorgan@hotmail.com&gt;
Reviewed-by: Steven Price &lt;steven.price@arm.com&gt;
Reviewed-by: Rob Herring &lt;robh@kernel.org&gt;
Fixes: f3ba91228e8e ("drm/panfrost: Add initial panfrost driver")
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Steven Price &lt;steven.price@arm.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210824173028.7528-3-alyssa.rosenzweig@collabora.com
</content>
</entry>
<entry>
<title>drm/panfrost: Simplify lock_region calculation</title>
<updated>2021-08-25T14:39:52+00:00</updated>
<author>
<name>Alyssa Rosenzweig</name>
<email>alyssa.rosenzweig@collabora.com</email>
</author>
<published>2021-08-24T17:30:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b5fab345654c603c07525100d744498f28786929'/>
<id>urn:sha1:b5fab345654c603c07525100d744498f28786929</id>
<content type='text'>
In lock_region, simplify the calculation of the region_width parameter.
This field is the size, but encoded as ceil(log2(size)) - 1.
ceil(log2(size)) may be computed directly as fls(size - 1). However, we
want to use the 64-bit versions as the amount to lock can exceed
32-bits.

This avoids undefined (and completely wrong) behaviour when locking all
memory (size ~0). In this case, the old code would "round up" ~0 to the
nearest page, overflowing to 0. Since fls(0) == 0, this would calculate
a region width of 10 + 0 = 10. But then the code would shift by
(region_width - 11) = -1. As shifting by a negative number is undefined,
UBSAN flags the bug. Of course, even if it were defined the behaviour is
wrong, instead of locking all memory almost none would get locked.

The new form of the calculation corrects this special case and avoids
the undefined behaviour.

Signed-off-by: Alyssa Rosenzweig &lt;alyssa.rosenzweig@collabora.com&gt;
Reported-and-tested-by: Chris Morgan &lt;macromorgan@hotmail.com&gt;
Fixes: f3ba91228e8e ("drm/panfrost: Add initial panfrost driver")
Cc: &lt;stable@vger.kernel.org&gt;
Reviewed-by: Steven Price &lt;steven.price@arm.com&gt;
Reviewed-by: Rob Herring &lt;robh@kernel.org&gt;
Signed-off-by: Steven Price &lt;steven.price@arm.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210824173028.7528-2-alyssa.rosenzweig@collabora.com
</content>
</entry>
<entry>
<title>drm/panfrost: devfreq: Don't display error for EPROBE_DEFER</title>
<updated>2021-07-23T11:06:29+00:00</updated>
<author>
<name>Chris Morgan</name>
<email>macromorgan@hotmail.com</email>
</author>
<published>2021-07-21T21:48:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8626e63eeea8fac24849c652c35c61e56f01b09b'/>
<id>urn:sha1:8626e63eeea8fac24849c652c35c61e56f01b09b</id>
<content type='text'>
Set a condition for the message of "Couldn't set OPP regulators" to not
display if the error code is EPROBE_DEFER. Note that I used an if
statement to capture the condition instead of the dev_err_probe
function because I didn't want to change the DRM_DEV_ERROR usage.

Signed-off-by: Chris Morgan &lt;macromorgan@hotmail.com&gt;
Reviewed-by: Steven Price &lt;steven.price@arm.com&gt;
Signed-off-by: Steven Price &lt;steven.price@arm.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210721214830.25690-1-macroalpha82@gmail.com
</content>
</entry>
<entry>
<title>drm/panfrost:fix the exception name always "UNKNOWN"</title>
<updated>2021-07-12T10:13:44+00:00</updated>
<author>
<name>ChunyouTang</name>
<email>tangchunyou@icubecorp.cn</email>
</author>
<published>2021-07-08T07:34:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7dc924d7c595b21c084644be6d18014aae505b0f'/>
<id>urn:sha1:7dc924d7c595b21c084644be6d18014aae505b0f</id>
<content type='text'>
The exception_code in register is only 8 bits,So if
fault_status in panfrost_gpu_irq_handler() don't
(&amp; 0xFF),it can't get correct exception reason.

and it's better to show all of the register value
to custom,so it's better fault_status don't (&amp; 0xFF).

Signed-off-by: ChunyouTang &lt;tangchunyou@icubecorp.cn&gt;
Reviewed-by: Steven Price &lt;steven.price@arm.com&gt;
Signed-off-by: Steven Price &lt;steven.price@arm.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210708073407.2015-1-tangchunyou@163.com
</content>
</entry>
<entry>
<title>drm/panfrost: Increase the AS_ACTIVE polling timeout</title>
<updated>2021-07-01T06:53:38+00:00</updated>
<author>
<name>Boris Brezillon</name>
<email>boris.brezillon@collabora.com</email>
</author>
<published>2021-06-30T06:27:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0ec187f69bcb2f2695b50050cc63ff512f00051d'/>
<id>urn:sha1:0ec187f69bcb2f2695b50050cc63ff512f00051d</id>
<content type='text'>
Experience has shown that 1ms is sometimes not enough, even when the GPU
is running at its maximum frequency, not to mention that an MMU operation
might take longer if the GPU is running at a lower frequency, which is
likely to be the case if devfreq is active.

Let's pick a significantly bigger timeout value (1ms -&gt; 100ms) to be on
the safe side.

v5:
* New patch

Signed-off-by: Boris Brezillon &lt;boris.brezillon@collabora.com&gt;
Reviewed-by: Steven Price &lt;steven.price@arm.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210630062751.2832545-17-boris.brezillon@collabora.com
</content>
</entry>
<entry>
<title>drm/panfrost: Queue jobs on the hardware</title>
<updated>2021-07-01T06:53:37+00:00</updated>
<author>
<name>Steven Price</name>
<email>steven.price@arm.com</email>
</author>
<published>2021-06-30T06:27:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=030761e097b421d74f7aa3b71ca11ba55686ae67'/>
<id>urn:sha1:030761e097b421d74f7aa3b71ca11ba55686ae67</id>
<content type='text'>
The hardware has a set of '_NEXT' registers that can hold a second job
while the first is executing. Make use of these registers to enqueue a
second job per slot.

v5:
* Fix a comment in panfrost_job_init()

v3:
* Fix the done/err job dequeuing logic to get a valid active state
* Only enable the second slot on GPUs supporting jobchain disambiguation
* Split interrupt handling in sub-functions

Signed-off-by: Steven Price &lt;steven.price@arm.com&gt;
Signed-off-by: Boris Brezillon &lt;boris.brezillon@collabora.com&gt;
Reviewed-by: Steven Price &lt;steven.price@arm.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210630062751.2832545-16-boris.brezillon@collabora.com
</content>
</entry>
<entry>
<title>drm/panfrost: Kill in-flight jobs on FD close</title>
<updated>2021-07-01T06:53:36+00:00</updated>
<author>
<name>Boris Brezillon</name>
<email>boris.brezillon@collabora.com</email>
</author>
<published>2021-06-30T06:27:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=30b5d4ed5b2eeea51e634b41663f854dd2fc12c2'/>
<id>urn:sha1:30b5d4ed5b2eeea51e634b41663f854dd2fc12c2</id>
<content type='text'>
If the process who submitted these jobs decided to close the FD before
the jobs are done it probably means it doesn't care about the result.

v5:
* Add a panfrost_exception_is_fault() helper and the
  DRM_PANFROST_EXCEPTION_MAX_NON_FAULT value

v4:
* Don't disable/restore irqs when taking the job_lock (not needed since
  this lock is never taken from an interrupt context)

v3:
* Set fence error to ECANCELED when a TERMINATED exception is received

Signed-off-by: Boris Brezillon &lt;boris.brezillon@collabora.com&gt;
Reviewed-by: Steven Price &lt;steven.price@arm.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210630062751.2832545-15-boris.brezillon@collabora.com
</content>
</entry>
<entry>
<title>drm/panfrost: Don't reset the GPU on job faults unless we really have to</title>
<updated>2021-07-01T06:53:35+00:00</updated>
<author>
<name>Boris Brezillon</name>
<email>boris.brezillon@collabora.com</email>
</author>
<published>2021-06-30T06:27:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2905db2764cd6c66a73d70b0b3edea012dee5b71'/>
<id>urn:sha1:2905db2764cd6c66a73d70b0b3edea012dee5b71</id>
<content type='text'>
If we can recover from a fault without a reset there's no reason to
issue one.

v3:
* Drop the mention of Valhall requiring a reset on JOB_BUS_FAULT
* Set the fence error to -EINVAL instead of having per-exception
  error codes

Signed-off-by: Boris Brezillon &lt;boris.brezillon@collabora.com&gt;
Reviewed-by: Steven Price &lt;steven.price@arm.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210630062751.2832545-14-boris.brezillon@collabora.com
</content>
</entry>
<entry>
<title>drm/panfrost: Reset the GPU when the AS_ACTIVE bit is stuck</title>
<updated>2021-07-01T06:53:34+00:00</updated>
<author>
<name>Boris Brezillon</name>
<email>boris.brezillon@collabora.com</email>
</author>
<published>2021-06-30T06:27:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f9ab9c66f08082a143ac529f1e479b987c2a1fa1'/>
<id>urn:sha1:f9ab9c66f08082a143ac529f1e479b987c2a1fa1</id>
<content type='text'>
Things are unlikely to resolve until we reset the GPU. Let's not wait
for other faults/timeout to happen to trigger this reset.

Signed-off-by: Boris Brezillon &lt;boris.brezillon@collabora.com&gt;
Reviewed-by: Steven Price &lt;steven.price@arm.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210630062751.2832545-13-boris.brezillon@collabora.com
</content>
</entry>
</feed>
