linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/15][RFC] Add regulator devfreq support to Panfrost
@ 2020-05-10 16:55 Clément Péron
  2020-05-10 16:55 ` [PATCH 01/15] drm/panfrost: avoid static declaration Clément Péron
                   ` (15 more replies)
  0 siblings, 16 replies; 36+ messages in thread
From: Clément Péron @ 2020-05-10 16:55 UTC (permalink / raw)
  To: Rob Herring, Tomeu Vizoso, Steven Price, Alyssa Rosenzweig,
	Viresh Kumar, Nishanth Menon, Stephen Boyd, Maxime Ripard,
	Chen-Yu Tsai
  Cc: dri-devel, linux-kernel, Clément Péron

Hi,

This serie cleans and adds regulator support to Panfrost devfreq.
This is mostly based on comment for the freshly introduced lima
devfreq.

We need to add regulator support because on Allwinner the GPU OPP
table defines both frequencies and voltages.

First patches [01-08] should not change the actual behavior
and introduce a proper panfrost_devfreq struct.

Fatches after are WIP and add regulator support.

However I got several issues first we need to avoid getting regulator
if devfreq get by itself the regulator, but as of today the OPP
framework only get and don't enable the regulator...
An HACK for now is to add regulator-always-on in the device-tree.

Then when I enable devfreq I got several faults like.
I'm totally noob on GPU sched/fault and couldn't be helpfull with this.

I got this running glmark2 on T720 (Allwinner H6) with Mesa 20.0.5.
# glmark2-es2-drm
=======================================================
    glmark2 2017.07
=======================================================
    OpenGL Information
    GL_VENDOR:     Panfrost
    GL_RENDERER:   Mali T720 (Panfrost)
    GL_VERSION:    OpenGL ES 2.0 Mesa 20.0.5
=======================================================

[   93.550063] panfrost 1800000.gpu: GPU Fault 0x00000088 (UNKNOWN) at 0x0000000080117100
[   94.045401] panfrost 1800000.gpu: gpu sched timeout, js=0, config=0x3700, status=0x8, head=0x21d6c00, tail=0x21d6c00, sched_job=00000000e3c2132f

[  328.871070] panfrost 1800000.gpu: Unhandled Page fault in AS0 at VA 0x0000000000000000
[  328.871070] Reason: TODO
[  328.871070] raw fault status: 0xAA0003C2
[  328.871070] decoded fault status: SLAVE FAULT
[  328.871070] exception type 0xC2: TRANSLATION_FAULT_LEVEL2
[  328.871070] access type 0x3: WRITE
[  328.871070] source id 0xAA00
[  329.373327] panfrost 1800000.gpu: gpu sched timeout, js=1, config=0x3700, status=0x8, head=0xa1a4900, tail=0xa1a4900, sched_job=000000007ac31097
[  329.386527] panfrost 1800000.gpu: js fault, js=0, status=DATA_INVALID_FAULT, head=0xa1a4c00, tail=0xa1a4c00
[  329.396293] panfrost 1800000.gpu: gpu sched timeout, js=0, config=0x3700, status=0x58, head=0xa1a4c00, tail=0xa1a4c00, sched_job=0000000004c90381
[  329.411521] panfrost 1800000.gpu: Unhandled Page fault in AS0 at VA 0x0000000000000000
[  329.411521] Reason: TODO
[  329.411521] raw fault status: 0xAA0003C2
[  329.411521] decoded fault status: SLAVE FAULT
[  329.411521] exception type 0xC2: TRANSLATION_FAULT_LEVEL2
[  329.411521] access type 0x3: WRITE
[  329.411521] source id 0xAA00

Thanks for your reviews, help on this serie,
Clement

Clément Péron (15):
  drm/panfrost: avoid static declaration
  drm/panfrost: clean headers in devfreq
  drm/panfrost: don't use pfdevfreq.busy_count to know if hw is idle
  drm/panfrost: introduce panfrost_devfreq struct
  drm/panfrost: use spinlock instead of atomic
  drm/panfrost: properly handle error in probe
  drm/panfrost: use device_property_present to check for OPP
  drm/panfrost: move devfreq_init()/fini() in device
  drm/panfrost: dynamically alloc regulators
  drm/panfrost: add regulators to devfreq
  drm/panfrost: set devfreq clock name
  arm64: defconfig: Enable devfreq cooling device
  arm64: dts: allwinner: h6: Add cooling map for GPU
  [DO NOT MERGE] arm64: dts: allwinner: h6: Add GPU OPP table
  [DO NOT MERGE] arm64: dts: allwinner: force GPU regulator to be always

 .../dts/allwinner/sun50i-h6-beelink-gs1.dts   |   1 +
 arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi  | 102 ++++++++++
 arch/arm64/configs/defconfig                  |   1 +
 drivers/gpu/drm/panfrost/panfrost_devfreq.c   | 190 ++++++++++++------
 drivers/gpu/drm/panfrost/panfrost_devfreq.h   |  32 ++-
 drivers/gpu/drm/panfrost/panfrost_device.c    |  56 ++++--
 drivers/gpu/drm/panfrost/panfrost_device.h    |  14 +-
 drivers/gpu/drm/panfrost/panfrost_drv.c       |  15 +-
 drivers/gpu/drm/panfrost/panfrost_job.c       |  10 +-
 9 files changed, 310 insertions(+), 111 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2020-06-08 11:55 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-10 16:55 [PATCH 00/15][RFC] Add regulator devfreq support to Panfrost Clément Péron
2020-05-10 16:55 ` [PATCH 01/15] drm/panfrost: avoid static declaration Clément Péron
2020-05-28 13:22   ` Steven Price
2020-05-10 16:55 ` [PATCH 02/15] drm/panfrost: clean headers in devfreq Clément Péron
2020-05-28 13:22   ` Steven Price
2020-05-10 16:55 ` [PATCH 03/15] drm/panfrost: don't use pfdevfreq.busy_count to know if hw is idle Clément Péron
2020-05-28 13:22   ` Steven Price
2020-05-10 16:55 ` [PATCH 04/15] drm/panfrost: introduce panfrost_devfreq struct Clément Péron
2020-05-28 13:22   ` Steven Price
2020-05-10 16:55 ` [PATCH 05/15] drm/panfrost: use spinlock instead of atomic Clément Péron
2020-05-28 13:22   ` Steven Price
2020-05-29 12:20   ` Robin Murphy
2020-05-29 12:35     ` Clément Péron
2020-05-29 12:47       ` Steven Price
2020-05-10 16:55 ` [PATCH 06/15] drm/panfrost: properly handle error in probe Clément Péron
2020-05-28 13:22   ` Steven Price
2020-05-10 16:55 ` [PATCH 07/15] drm/panfrost: use device_property_present to check for OPP Clément Péron
2020-05-28 13:22   ` Steven Price
2020-05-29 12:45     ` Clément Péron
2020-05-10 16:55 ` [PATCH 08/15] drm/panfrost: move devfreq_init()/fini() in device Clément Péron
2020-05-28 13:22   ` Steven Price
2020-05-29 12:38     ` Clément Péron
2020-06-08 11:55       ` Tomeu Vizoso
2020-05-10 16:55 ` [PATCH 09/15] drm/panfrost: dynamically alloc regulators Clément Péron
2020-05-28 13:22   ` Steven Price
2020-05-10 16:55 ` [PATCH 10/15] drm/panfrost: add regulators to devfreq Clément Péron
2020-05-28 13:23   ` Steven Price
2020-05-29 12:37     ` Clément Péron
2020-05-10 16:55 ` [PATCH 11/15] drm/panfrost: set devfreq clock name Clément Péron
2020-05-28 13:23   ` Steven Price
2020-05-29 12:35     ` Clément Péron
2020-05-10 16:55 ` [PATCH 12/15] arm64: defconfig: Enable devfreq cooling device Clément Péron
2020-05-10 16:55 ` [PATCH 13/15] arm64: dts: allwinner: h6: Add cooling map for GPU Clément Péron
2020-05-10 16:55 ` [PATCH 14/15] [DO NOT MERGE] arm64: dts: allwinner: h6: Add GPU OPP table Clément Péron
2020-05-10 16:55 ` [PATCH 15/15] [DO NOT MERGE] arm64: dts: allwinner: force GPU regulator to be always Clément Péron
2020-05-11  5:43 ` [PATCH 00/15][RFC] Add regulator devfreq support to Panfrost Tomeu Vizoso

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