Re: [PATCH v6 1/5] drm/v3d: Associate a V3D tech revision to all supported devices

2025-04-05 Thread Stefan Wahren
ing V3D generations (such as V3D 4.0) were removed by this commit and replaced with supported generations without functional changes. Reviewed-by: Iago Toral Quiroga Signed-off-by: Maíra Canal Reviewed-by: Stefan Wahren

Re: [PATCH v6 5/5] drm/v3d: Use V3D_SMS registers for power on/off and reset on V3D 7.x

2025-03-27 Thread Stefan Wahren
Am 27.03.25 um 14:52 schrieb Maíra Canal: Hi Stefan, On 27/03/25 07:57, Stefan Wahren wrote: Hi Maíra, Am 18.03.25 um 02:01 schrieb Maíra Canal: In addition to the standard reset controller, V3D 7.x requires configuring the V3D_SMS registers for proper power on/off and reset. Add the new

Re: [PATCH v6 5/5] drm/v3d: Use V3D_SMS registers for power on/off and reset on V3D 7.x

2025-03-27 Thread Stefan Wahren
Hi Maíra, Am 18.03.25 um 02:01 schrieb Maíra Canal: In addition to the standard reset controller, V3D 7.x requires configuring the V3D_SMS registers for proper power on/off and reset. Add the new registers to `v3d_regs.h` and ensure they are properly configured during device probing, removal, an

Re: [PATCH v6 3/5] dt-bindings: gpu: v3d: Add SMS register to BCM2712 compatible

2025-03-19 Thread Stefan Wahren
Hi Maíra, Am 18.03.25 um 02:01 schrieb Maíra Canal: V3D 7.1 exposes a new register block, called V3D_SMS. As BCM2712 has a V3D 7.1 core, add a new register item to its compatible. Similar to the GCA, which is specific for V3D 3.3, SMS should only be added for V3D 7.1 variants (such as brcm,2712-

Re: [PATCH v5 3/6] dt-bindings: gpu: v3d: Add SMS register to BCM2712 compatible

2025-03-16 Thread Stefan Wahren
Hi Maíra, Am 16.03.25 um 15:15 schrieb Maíra Canal: V3D 7.1 exposes a new register block, called V3D_SMS. As BCM2712 has a V3D 7.1 core, add a new register item to its compatible. Similar to the GCA, which is specific for V3D 3.3, SMS should only be added for V3D 7.1 variants (such as brcm,2712-

Re: [PATCH v5 1/6] drm/v3d: Associate a V3D tech revision to all supported devices

2025-03-16 Thread Stefan Wahren
Hi Maíra, Am 16.03.25 um 15:15 schrieb Maíra Canal: The V3D driver currently determines the GPU tech version (33, 41...) by reading a register. This approach has worked so far since this information wasn’t needed before powering on the GPU. V3D 7.1 introduces new registers that must be written

Re: [PATCH v4 4/7] dt-bindings: gpu: v3d: Add per-compatible register restrictions

2025-03-15 Thread Stefan Wahren
Hello, Am 13.03.25 um 20:04 schrieb Maíra Canal: +Cc Stefan Hi Krzysztof, On 13/03/25 12:03, Krzysztof Kozlowski wrote: On 13/03/2025 15:43, Maíra Canal wrote: In order to enforce per-SoC register rules, add per-compatible restrictions. V3D 3.3 (represented by brcm,7268-v3d) has a cache cont

[PATCH V2 1/2] drm/vc4: hdmi: Call HDMI hotplug helper on disconnect

2025-03-04 Thread Stefan Wahren
drm_atomic_helper_connector_hdmi_hotplug() must be called regardless of the connection status, otherwise the HDMI audio disconnect event won't be notified. Fixes: 2ea9ec5d2c20 ("drm/vc4: hdmi: use drm_atomic_helper_connector_hdmi_hotplug()") Suggested-by: Dmitry Baryshkov Signed

[PATCH V2 0/2] drm/vc4: hdmi: Add jack detection to HDMI audio driver

2025-03-04 Thread Stefan Wahren
This series ensure the proper jack detection of HDMI audio. Changes in V2: - split initial patch into fix and jack detection feature as suggested by Dmitry David Turner (1): drm/vc4: hdmi: Add jack detection to HDMI audio driver Stefan Wahren (1): drm/vc4: hdmi: Call HDMI hotplug helper

[PATCH V2 2/2] drm/vc4: hdmi: Add jack detection to HDMI audio driver

2025-03-04 Thread Stefan Wahren
From: David Turner Add ALSA jack detection to the vc4-hdmi audio driver so userspace knows when to add/remove HDMI audio devices. Signed-off-by: David Turner Signed-off-by: Stefan Wahren --- drivers/gpu/drm/vc4/vc4_hdmi.c | 18 ++ drivers/gpu/drm/vc4/vc4_hdmi.h | 7

Re: [PATCH RFC] drm/vc4: hdmi: Add jack detection to HDMI audio driver

2025-02-26 Thread Stefan Wahren
Hi Dmitry, Am 24.02.25 um 04:15 schrieb Dmitry Baryshkov: On Sat, Feb 22, 2025 at 11:29:21AM +0100, Stefan Wahren wrote: From: David Turner Add ALSA jack detection to the vc4-hdmi audio driver so userspace knows when to add/remove HDMI audio devices. Signed-off-by: David Turner Signed-off

[PATCH RFC] drm/vc4: hdmi: Add jack detection to HDMI audio driver

2025-02-22 Thread Stefan Wahren
From: David Turner Add ALSA jack detection to the vc4-hdmi audio driver so userspace knows when to add/remove HDMI audio devices. Signed-off-by: David Turner Signed-off-by: Stefan Wahren --- drivers/gpu/drm/vc4/vc4_hdmi.c | 26 -- drivers/gpu/drm/vc4/vc4_hdmi.h | 7

Re: [PATCH] drm/v3d: Add clock handling

2025-02-10 Thread Stefan Wahren
Hi Maíra, Am 10.02.25 um 13:23 schrieb Maíra Canal: Hi Stefan, Thanks for your patch! On 01/02/25 09:50, Stefan Wahren wrote: Since the initial commit 57692c94dcbe ("drm/v3d: Introduce a new DRM driver for Broadcom V3D V3.x+") the struct v3d_dev reserved a pointer for an optional

[PATCH] drm/v3d: Add clock handling

2025-02-01 Thread Stefan Wahren
Signed-off-by: Stefan Wahren --- drivers/gpu/drm/v3d/v3d_drv.c | 25 - 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/v3d/v3d_drv.c b/drivers/gpu/drm/v3d/v3d_drv.c index 930737a9347b..852015214e97 100644 --- a/drivers/gpu/drm/v3d/v3d_drv.c ++

Re: [PATCH] drm/vc4: plane: Remove WARN on state being set in plane_reset

2024-12-11 Thread Stefan Wahren
Hi Maíra, Am 11.12.24 um 14:19 schrieb Maíra Canal: Hi Stefan, On 02/12/24 09:03, Stefan Wahren wrote: From: Dave Stevenson It is permitted on situations such as system resume for plane->state to be non-NULL, and that should be handled by freeing it. Do so. Signed-off-by: Dave Steven

Re: [PATCH 3/7] dt-bindings: gpio: brcmstb: add gpio-line-name

2024-12-03 Thread Stefan Wahren
Hi Dave, Am 02.12.24 um 15:31 schrieb Dave Stevenson: Support comes from gpiolib, so permit it through the binding. Sorry for the nitpicking, but gpiolib is a software part of Linux and we should describe the hardware here. Best regards Signed-off-by: Dave Stevenson --- Documentation/devi

Re: [PATCH 6/7] arm: dts: broadcom: Add interrupt-controller flag for intc on BCM2711

2024-12-02 Thread Stefan Wahren
Hi Dave, Am 02.12.24 um 15:31 schrieb Dave Stevenson: BCM2711 DT was producing dtbinding validation errors of interrupt-controller@4000: 'interrupt-controller' is a required property interrupt-controller@4000: '#interrupt-cells' is a required property Fix them by adding the required fl

[PATCH] drm/vc4: plane: Remove WARN on state being set in plane_reset

2024-12-02 Thread Stefan Wahren
From: Dave Stevenson It is permitted on situations such as system resume for plane->state to be non-NULL, and that should be handled by freeing it. Do so. Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren --- drivers/gpu/drm/vc4/vc4_plane.c | 5 - 1 file changed, 4 inserti

Re: [drm:vc4_hvs_irq_handler [vc4]] *ERROR* HVS underrun

2024-11-08 Thread Stefan Wahren
Am 26.10.24 um 15:11 schrieb Stefan Wahren: Hi, during the investigations of the recent VC4 HDMI Sink issue [1], I was able to reproduce another issue with vc4 after s2idle resume. Sometimes ( probability ~ 1 : 30 cases ) I'm able to trigger a HVS underrun and it's impact is tha

[drm:vc4_hvs_irq_handler [vc4]] *ERROR* HVS underrun

2024-10-26 Thread Stefan Wahren
Hi, during the investigations of the recent VC4 HDMI Sink issue [1], I was able to reproduce another issue with vc4 after s2idle resume. Sometimes ( probability ~ 1 : 30 cases ) I'm able to trigger a HVS underrun and it's impact is that the HDMI display stays black and unusable: [ 1790.139465] PM

Re: vc4: HDMI Sink doesn't support RGB, something's wrong.

2024-10-25 Thread Stefan Wahren
Hi Dave, Am 25.10.24 um 18:56 schrieb Dave Stevenson: On Fri, 25 Oct 2024 at 17:31, Stefan Wahren wrote: Hi Dave, Am 25.10.24 um 16:38 schrieb Dave Stevenson: Hi Stefan On Fri, 25 Oct 2024 at 14:36, Stefan Wahren wrote: ... Based on that log I think your force_turbo=1 is a red-herring

Re: vc4: HDMI Sink doesn't support RGB, something's wrong.

2024-10-25 Thread Stefan Wahren
Hi Dave, Am 25.10.24 um 16:38 schrieb Dave Stevenson: Hi Stefan On Fri, 25 Oct 2024 at 14:36, Stefan Wahren wrote: ... Based on that log I think your force_turbo=1 is a red-herring, or at least needs further investigation. Is this on a 3B, or 3B+? Definitely a 3B+ from the year 2017

Re: vc4: HDMI Sink doesn't support RGB, something's wrong.

2024-10-25 Thread Stefan Wahren
Hi Dave, Am 23.10.24 um 17:22 schrieb Dave Stevenson: On Sat, 19 Oct 2024 at 10:34, Stefan Wahren wrote: Hi, Am 17.10.24 um 17:59 schrieb Maxime Ripard: On Thu, Oct 17, 2024 at 05:26:46PM GMT, Stefan Wahren wrote: Am 17.10.24 um 16:27 schrieb Maxime Ripard: On Wed, Oct 16, 2024 at 07:16

Re: vc4: HDMI Sink doesn't support RGB, something's wrong.

2024-10-19 Thread Stefan Wahren
Hi, Am 17.10.24 um 17:59 schrieb Maxime Ripard: On Thu, Oct 17, 2024 at 05:26:46PM GMT, Stefan Wahren wrote: Am 17.10.24 um 16:27 schrieb Maxime Ripard: On Wed, Oct 16, 2024 at 07:16:43PM GMT, Dave Stevenson wrote: Hi Stefan On Tue, 15 Oct 2024 at 22:13, Stefan Wahren wrote: Hi Dave

Re: vc4: HDMI Sink doesn't support RGB, something's wrong.

2024-10-17 Thread Stefan Wahren
Am 17.10.24 um 18:37 schrieb Dave Stevenson: On Thu, 17 Oct 2024 at 16:59, Maxime Ripard wrote: On Thu, Oct 17, 2024 at 05:26:46PM GMT, Stefan Wahren wrote: Am 17.10.24 um 16:27 schrieb Maxime Ripard: On Wed, Oct 16, 2024 at 07:16:43PM GMT, Dave Stevenson wrote: Hi Stefan On Tue, 15 Oct

Re: vc4: HDMI Sink doesn't support RGB, something's wrong.

2024-10-17 Thread Stefan Wahren
Am 17.10.24 um 16:27 schrieb Maxime Ripard: On Wed, Oct 16, 2024 at 07:16:43PM GMT, Dave Stevenson wrote: Hi Stefan On Tue, 15 Oct 2024 at 22:13, Stefan Wahren wrote: Hi Dave, ... i prepared a branch for you, which contains the latest suspend2idle patches: https://github.com/lategoodbye

Re: vc4: HDMI Sink doesn't support RGB, something's wrong.

2024-10-15 Thread Stefan Wahren
Hi Dave, Am 15.10.24 um 11:32 schrieb Dave Stevenson: On Mon, 14 Oct 2024 at 22:16, Stefan Wahren wrote: Am 14.10.24 um 12:54 schrieb Dave Stevenson: On Mon, 14 Oct 2024 at 10:04, Maxime Ripard wrote: Hi, On Sun, Oct 13, 2024 at 09:57:58PM GMT, Stefan Wahren wrote: Am 13.10.24 um 21:11

Re: vc4: HDMI Sink doesn't support RGB, something's wrong.

2024-10-14 Thread Stefan Wahren
Am 14.10.24 um 12:54 schrieb Dave Stevenson: On Mon, 14 Oct 2024 at 10:04, Maxime Ripard wrote: Hi, On Sun, Oct 13, 2024 at 09:57:58PM GMT, Stefan Wahren wrote: Am 13.10.24 um 21:11 schrieb Dave Stevenson: Hi Stefan. On Sun, 13 Oct 2024, 18:19 Stefan Wahren, wrote: Hi, i

Re: vc4: HDMI Sink doesn't support RGB, something's wrong.

2024-10-13 Thread Stefan Wahren
Am 13.10.24 um 21:11 schrieb Dave Stevenson: Hi Stefan. On Sun, 13 Oct 2024, 18:19 Stefan Wahren, wrote: Hi, i recently switch for my suspend2idle tests from Raspberry Pi Bullseye to Bookworm. After that testing suspend2idle shows a new warning which i never saw before

vc4: HDMI Sink doesn't support RGB, something's wrong.

2024-10-13 Thread Stefan Wahren
Hi, i recently switch for my suspend2idle tests from Raspberry Pi Bullseye to Bookworm. After that testing suspend2idle shows a new warning which i never saw before: HDMI Sink doesn't support RGB, something's wrong. Platform: Raspberry Pi 3 B+ Kernel: 6.12-rc1 Kernel config: arm/multi_v7_defcon

Re: [PATCH V4 2/2] drm/vc4: v3d: add PM suspend/resume support

2024-10-09 Thread Stefan Wahren
Hi Maíra, Am 09.10.24 um 14:16 schrieb Maíra Canal: Hi Stefan, On 10/8/24 13:05, Stefan Wahren wrote: Hi Maíra, Am 08.10.24 um 15:49 schrieb Maíra Canal: Hi Stefan, On 10/3/24 09:41, Stefan Wahren wrote: Add suspend/resume support for the VC4 V3D component in order to handle suspend to

Re: [PATCH V4 2/2] drm/vc4: v3d: add PM suspend/resume support

2024-10-08 Thread Stefan Wahren
Hi Maíra, Am 08.10.24 um 15:49 schrieb Maíra Canal: Hi Stefan, On 10/3/24 09:41, Stefan Wahren wrote: Add suspend/resume support for the VC4 V3D component in order to handle suspend to idle properly. Signed-off-by: Stefan Wahren ---   drivers/gpu/drm/vc4/vc4_v3d.c | 7 +++   1 file

[PATCH V4 2/2] drm/vc4: v3d: add PM suspend/resume support

2024-10-03 Thread Stefan Wahren
Add suspend/resume support for the VC4 V3D component in order to handle suspend to idle properly. Signed-off-by: Stefan Wahren --- drivers/gpu/drm/vc4/vc4_v3d.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_v3d.c b/drivers/gpu/drm/vc4

[PATCH V4 0/2] drm/vc4: add PM suspend/resume support

2024-10-03 Thread Stefan Wahren
in V4: - fix compile warnings for VC4 & V3D patches [1] - https://github.com/lategoodbye/rpi-zero/issues/9 [2] - https://lore.kernel.org/linux-arm-kernel/20240821214052.6800-1-wahre...@gmx.net/ [3] - https://lore.kernel.org/linux-usb/2c9b6e0c-cb7d-4ab2-9d7a-e2f90e642...@gmx.net/T/ Stefan Wa

[PATCH V4 1/2] drm/vc4: hdmi: add PM suspend/resume support

2024-10-03 Thread Stefan Wahren
/ Signed-off-by: Stefan Wahren Acked-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 32 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index 62b82b1eeb36..5e5d1c609858 100644 --- a

Re: [PATCH V3 1/9] mailbox: bcm2835: Fix timeout during suspend mode

2024-09-01 Thread Stefan Wahren
Hi Jassi, Am 01.09.24 um 22:26 schrieb Jassi Brar: On Sat, Aug 31, 2024 at 4:19 AM Stefan Wahren wrote: Hi Jassi, Am 21.08.24 um 23:40 schrieb Stefan Wahren: During noirq suspend phase the Raspberry Pi power driver suffer of firmware property timeouts. The reason is that the IRQ of the

Re: [PATCH V3 1/9] mailbox: bcm2835: Fix timeout during suspend mode

2024-08-31 Thread Stefan Wahren
Hi Jassi, Am 21.08.24 um 23:40 schrieb Stefan Wahren: During noirq suspend phase the Raspberry Pi power driver suffer of firmware property timeouts. The reason is that the IRQ of the underlying BCM2835 mailbox is disabled and rpi_firmware_property_list() will always run into a timeout [1

Re: [PATCH V3 7/9] usb: dwc2: Refactor backup/restore of registers

2024-08-22 Thread Stefan Wahren
Am 21.08.24 um 23:40 schrieb Stefan Wahren: The DWC2 runtime PM code reuses similar patterns to backup and restore the registers. So consolidate them in USB mode specific variants. This also has the advantage it is usable for further PM improvements. Signed-off-by: Stefan Wahren --- drivers

[PATCH V3 9/9] ARM: bcm2835_defconfig: Enable SUSPEND

2024-08-21 Thread Stefan Wahren
Since the Raspberry Pi supports Suspend-To-Idle now, this option should be enabled. This should make power management testing easier. Signed-off-by: Stefan Wahren Reviewed-by: Florian Fainelli --- arch/arm/configs/bcm2835_defconfig | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/arm

[PATCH V3 7/9] usb: dwc2: Refactor backup/restore of registers

2024-08-21 Thread Stefan Wahren
The DWC2 runtime PM code reuses similar patterns to backup and restore the registers. So consolidate them in USB mode specific variants. This also has the advantage it is usable for further PM improvements. Signed-off-by: Stefan Wahren --- drivers/usb/dwc2/core.h | 12 + drivers/usb/dwc2

[PATCH V3 RFC 8/9] usb: dwc2: Implement recovery after PM domain off

2024-08-21 Thread Stefan Wahren
been powered off during suspend. Since the GOTGCTL_CURMODE_HOST doesn't match on all platform with the current mode, additionally backup GINTSTS. This works reliable to decide which registers should be restored. Signed-off-by: Stefan Wahren --- drivers/usb/dwc2/core.c | 1 + drivers/usb

[PATCH V3 0/9] ARM: bcm2835: Implement initial S2Idle for Raspberry Pi

2024-08-21 Thread Stefan Wahren
own - take care of UART clock in patch 15 as commented by Florian - use SYSTEM_SLEEP_PM_OPS in patch 15 [1] - https://github.com/lategoodbye/rpi-zero/issues/9 [2] - https://bugzilla.redhat.com/show_bug.cgi?id=2283978 [3] - https://lore.kernel.org/linux-usb/CAD=FV=w7sdi1+shfhy6rrjk32r8iage4w+o_u5s

[PATCH V3 2/9] drm/vc4: hdmi: Handle error case of pm_runtime_resume_and_get

2024-08-21 Thread Stefan Wahren
eed anyway. This could happen during suspend to idle. So we must assume it is unsafe to access the HDMI register. So bail out properly. Fixes: 0f5251339eda ("drm/vc4: hdmi: Make sure the controller is powered in detect") Signed-off-by: Stefan Wahren Reviewed-by: Maíra Canal Ack

[PATCH V3 6/9] drm/vc4: v3d: add PM suspend/resume support

2024-08-21 Thread Stefan Wahren
Add suspend/resume support for the VC4 V3D component in order to handle suspend to idle properly. Signed-off-by: Stefan Wahren --- drivers/gpu/drm/vc4/vc4_v3d.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_v3d.c b/drivers/gpu/drm/vc4/vc4_v3d.c index bf5c4e36c94e

[PATCH V3 3/9] drm/vc4: Get the rid of DRM_ERROR()

2024-08-21 Thread Stefan Wahren
Signed-off-by: Stefan Wahren Reviewed-by: Maxime Ripard Reviewed-by: Maíra Canal --- drivers/gpu/drm/vc4/vc4_bo.c | 14 ++-- drivers/gpu/drm/vc4/vc4_dpi.c | 14 ++-- drivers/gpu/drm/vc4/vc4_dsi.c | 32 ++ drivers/gpu/drm/vc4/vc4_gem.c

[PATCH V3 5/9] drm/vc4: v3d: simplify clock retrieval

2024-08-21 Thread Stefan Wahren
Common pattern of handling deferred probe can be simplified with dev_err_probe() and devm_clk_get_optional(). This results in much less code. Signed-off-by: Stefan Wahren Reviewed-by: Maíra Canal --- drivers/gpu/drm/vc4/vc4_v3d.c | 18 +++--- 1 file changed, 3 insertions(+), 15

[PATCH V3 4/9] drm/vc4: hdmi: add PM suspend/resume support

2024-08-21 Thread Stefan Wahren
/ Signed-off-by: Stefan Wahren Acked-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index 6611ab7c26a6..f7a4ed16094e 100644 --- a/drivers/gpu/drm/vc4

[PATCH V3 1/9] mailbox: bcm2835: Fix timeout during suspend mode

2024-08-21 Thread Stefan Wahren
noirq suspend of devices complete after 3095.584 msecs Link: https://github.com/raspberrypi/firmware/issues/1894 Fixes: 0bae6af6d704 ("mailbox: Enable BCM2835 mailbox support") Signed-off-by: Stefan Wahren Reviewed-by: Florian Fainelli --- drivers/mailbox/bcm2835-mailbox.c | 3 ++- 1

Re: [PATCH V2 14/16] WIP: usb: dwc2: Implement recovery after PM domain off

2024-08-16 Thread Stefan Wahren
Hi Doug, Am 15.08.24 um 21:37 schrieb Doug Anderson: Hi, On Wed, Aug 14, 2024 at 2:48 PM Stefan Wahren wrote: You're saying that your registers get saved _unless_ the power domain gets turned off, right? On BCM2835 there is no need to store the registers because there is no power manag

Re: [PATCH V2 14/16] WIP: usb: dwc2: Implement recovery after PM domain off

2024-08-14 Thread Stefan Wahren
Am 14.08.24 um 14:01 schrieb Ulf Hansson: On Tue, 13 Aug 2024 at 21:57, Doug Anderson wrote: Hi, On Mon, Aug 12, 2024 at 4:48 PM Stefan Wahren wrote: Hi Doug, Am 28.07.24 um 15:00 schrieb Stefan Wahren: DO NOT MERGE According to the dt-bindings there are some platforms, which have a

Re: [PATCH V2 15/16] serial: 8250_bcm2835aux: add PM suspend/resume support

2024-08-14 Thread Stefan Wahren
Am 14.08.24 um 14:18 schrieb Ulf Hansson: On Sun, 28 Jul 2024 at 15:07, Stefan Wahren wrote: This adds suspend/resume support for the 8250_bcm2835aux driver to provide power management support on attached devices. Signed-off-by: Stefan Wahren --- drivers/tty/serial/8250/8250_bcm2835aux.c

Re: [PATCH V2 14/16] WIP: usb: dwc2: Implement recovery after PM domain off

2024-08-12 Thread Stefan Wahren
Hi Doug, Am 28.07.24 um 15:00 schrieb Stefan Wahren: DO NOT MERGE According to the dt-bindings there are some platforms, which have a dedicated USB power domain for DWC2 IP core supply. If the power domain is switched off during system suspend then all USB register will lose their settings

Re: [PATCH V2 05/16] pmdomain: raspberrypi-power: set flag GENPD_FLAG_ACTIVE_WAKEUP

2024-08-12 Thread Stefan Wahren
Hi, Am 28.07.24 um 13:41 schrieb Stefan Wahren: Set flag GENPD_FLAG_ACTIVE_WAKEUP to rpi_power genpd, then when a device is set as wakeup source using device_set_wakeup_enable, the power domain could be kept on to make sure the device could wakeup the system. Signed-off-by: Stefan Wahren I

Re: [PATCH V2 02/16] mailbox: bcm2835: Fix timeout during suspend mode

2024-08-12 Thread Stefan Wahren
Hi Jassi, Am 28.07.24 um 13:41 schrieb Stefan Wahren: During noirq suspend phase the Raspberry Pi power driver suffer of firmware property timeouts. The reason is that the IRQ of the underlying BCM2835 mailbox is disabled and rpi_firmware_property_list() will always run into a timeout [1

Re: [PATCH V2 01/16] firmware: raspberrypi: Improve timeout warning

2024-08-12 Thread Stefan Wahren
Hi Florian, Am 28.07.24 um 13:41 schrieb Stefan Wahren: Recent work on raspberry-power driver showed that even the stacktrace on firmware property timeout doesn't provide enough information. So add the first tag name to the warning to be in line with a status error. Signed-off-by: S

Re: [PATCH V2 09/16] drm/vc4: v3d: simplify clock retrieval

2024-08-07 Thread Stefan Wahren
Hi Maíra, Am 07.08.24 um 16:31 schrieb Maíra Canal: Hi Stefan, On 8/2/24 10:00, Stefan Wahren wrote: Hi Maíra, Am 02.08.24 um 14:56 schrieb Maíra Canal: Hi Stefan, On 7/31/24 13:41, Stefan Wahren wrote: Hi Maíra, Am 30.07.24 um 13:23 schrieb Maíra Canal: On 7/28/24 10:00, Stefan Wahren

Re: [PATCH V2 09/16] drm/vc4: v3d: simplify clock retrieval

2024-08-02 Thread Stefan Wahren
Hi Maíra, Am 02.08.24 um 14:56 schrieb Maíra Canal: Hi Stefan, On 7/31/24 13:41, Stefan Wahren wrote: Hi Maíra, Am 30.07.24 um 13:23 schrieb Maíra Canal: On 7/28/24 10:00, Stefan Wahren wrote: Common pattern of handling deferred probe can be simplified with dev_err_probe() and

Re: [PATCH V2 09/16] drm/vc4: v3d: simplify clock retrieval

2024-07-31 Thread Stefan Wahren
Hi Maíra, Am 30.07.24 um 13:23 schrieb Maíra Canal: On 7/28/24 10:00, Stefan Wahren wrote: Common pattern of handling deferred probe can be simplified with dev_err_probe() and devm_clk_get_optional(). This results in much less code. Signed-off-by: Stefan Wahren ---   drivers/gpu/drm/vc4

[PATCH V2 16/16] ARM: bcm2835_defconfig: Enable SUSPEND

2024-07-28 Thread Stefan Wahren
Since the Raspberry Pi supports Suspend-To-Idle now, this option should be enabled. This should make power management testing easier. Signed-off-by: Stefan Wahren Reviewed-by: Florian Fainelli --- arch/arm/configs/bcm2835_defconfig | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/arm

[PATCH V2 10/16] drm/vc4: v3d: add PM suspend/resume support

2024-07-28 Thread Stefan Wahren
Add suspend/resume support for the VC4 V3D component in order to handle suspend to idle properly. Signed-off-by: Stefan Wahren --- drivers/gpu/drm/vc4/vc4_v3d.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_v3d.c b/drivers/gpu/drm/vc4/vc4_v3d.c index 4bf3a8d24770

[PATCH V2 15/16] serial: 8250_bcm2835aux: add PM suspend/resume support

2024-07-28 Thread Stefan Wahren
This adds suspend/resume support for the 8250_bcm2835aux driver to provide power management support on attached devices. Signed-off-by: Stefan Wahren --- drivers/tty/serial/8250/8250_bcm2835aux.c | 37 +++ 1 file changed, 37 insertions(+) diff --git a/drivers/tty/serial

[PATCH V2 14/16] WIP: usb: dwc2: Implement recovery after PM domain off

2024-07-28 Thread Stefan Wahren
& restore the USB registers during system suspend. Signed-off-by: Stefan Wahren --- Any feedback is appreciated. drivers/usb/dwc2/core.c | 16 drivers/usb/dwc2/core.h | 17 + drivers/usb/dwc2/gadget.c | 49 + drivers/usb/dwc2/h

[PATCH V2 13/16] usb: dwc2: Skip clock gating on Broadcom SoCs

2024-07-28 Thread Stefan Wahren
rnel.org/all/5e8cbce0-3260-2971-484f-fc73a3b2b...@synopsys.com/ Signed-off-by: Stefan Wahren Acked-by: Minas Harutyunyan --- drivers/usb/dwc2/params.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c index 4d73fae80b12..68226defdc60 100

[PATCH V2 12/16] usb: dwc2: Add comment about BCM2848 ACPI ID

2024-07-28 Thread Stefan Wahren
During recent code review the different naming between ACPI and OF IDs led to confusion. So add a clarifying comment. Link: https://lore.kernel.org/linux-usb/38e46b44-6248-45e8-bdf9-66008a2fe...@arm.com/ Signed-off-by: Stefan Wahren --- drivers/usb/dwc2/params.c | 1 + 1 file changed, 1

[PATCH V2 11/16] usb: dwc2: debugfs: Print parameter no_clock_gating

2024-07-28 Thread Stefan Wahren
The commit c4a0f7a6ab54 ("usb: dwc2: Skip clock gating on Samsung SoCs") introduced a parameter to skip enabling clock gating mode even the hardware platform should supports it. In order to make this more visible also print this in show parameters of debugfs. Signed-off-by: Stefan Wah

[PATCH V2 09/16] drm/vc4: v3d: simplify clock retrieval

2024-07-28 Thread Stefan Wahren
Common pattern of handling deferred probe can be simplified with dev_err_probe() and devm_clk_get_optional(). This results in much less code. Signed-off-by: Stefan Wahren --- drivers/gpu/drm/vc4/vc4_v3d.c | 13 ++--- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers

[PATCH V2 08/16] drm/vc4: hdmi: add PM suspend/resume support

2024-07-28 Thread Stefan Wahren
/ Signed-off-by: Stefan Wahren --- drivers/gpu/drm/vc4/vc4_hdmi.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index 6611ab7c26a6..f7a4ed16094e 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu

[PATCH V2 07/16] drm/vc4: Get the rid of DRM_ERROR()

2024-07-28 Thread Stefan Wahren
Signed-off-by: Stefan Wahren --- drivers/gpu/drm/vc4/vc4_bo.c | 14 ++-- drivers/gpu/drm/vc4/vc4_dpi.c | 14 ++-- drivers/gpu/drm/vc4/vc4_dsi.c | 32 ++ drivers/gpu/drm/vc4/vc4_gem.c | 11 + drivers/gpu/drm/vc4/vc4_hdmi.c | 36

[PATCH V2 06/16] drm/vc4: hdmi: Handle error case of pm_runtime_resume_and_get

2024-07-28 Thread Stefan Wahren
eed anyway. This could happen during suspend to idle. So we must assume it is unsafe to access the HDMI register. So bail out properly. Fixes: 0f5251339eda ("drm/vc4: hdmi: Make sure the controller is powered in detect") Signed-off-by: Stefan Wahren --- drivers/gpu/drm/vc4/vc4_hdmi.c

[PATCH V2 05/16] pmdomain: raspberrypi-power: set flag GENPD_FLAG_ACTIVE_WAKEUP

2024-07-28 Thread Stefan Wahren
Set flag GENPD_FLAG_ACTIVE_WAKEUP to rpi_power genpd, then when a device is set as wakeup source using device_set_wakeup_enable, the power domain could be kept on to make sure the device could wakeup the system. Signed-off-by: Stefan Wahren --- drivers/pmdomain/bcm/raspberrypi-power.c | 1 + 1

[PATCH V2 04/16] pmdomain: raspberrypi-power: Add logging to rpi_firmware_set_power

2024-07-28 Thread Stefan Wahren
The Raspberry Pi power driver heavily relies on the logging of the underlying firmware driver. This results in disadvantages like unspecific error messages or limited debugging options. So implement the logging for the most important function rpi_firmware_set_power. Signed-off-by: Stefan Wahren

[PATCH V2 03/16] pmdomain: raspberrypi-power: Adjust packet definition

2024-07-28 Thread Stefan Wahren
: https://github.com/raspberrypi/firmware/wiki/Mailbox-property-interface Signed-off-by: Stefan Wahren Reviewed-by: Florian Fainelli --- drivers/pmdomain/bcm/raspberrypi-power.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/pmdomain/bcm/raspberrypi-power.c b

[PATCH V2 02/16] mailbox: bcm2835: Fix timeout during suspend mode

2024-07-28 Thread Stefan Wahren
noirq suspend of devices complete after 3095.584 msecs Link: https://github.com/raspberrypi/firmware/issues/1894 Fixes: 0bae6af6d704 ("mailbox: Enable BCM2835 mailbox support") Signed-off-by: Stefan Wahren Reviewed-by: Florian Fainelli --- drivers/mailbox/bcm2835-mailbox.c | 3 ++- 1

[PATCH V2 01/16] firmware: raspberrypi: Improve timeout warning

2024-07-28 Thread Stefan Wahren
Recent work on raspberry-power driver showed that even the stacktrace on firmware property timeout doesn't provide enough information. So add the first tag name to the warning to be in line with a status error. Signed-off-by: Stefan Wahren Reviewed-by: Florian Fainelli --- drivers/fir

[PATCH V2 00/16] ARM: bcm2835: Implement initial S2Idle for Raspberry Pi

2024-07-28 Thread Stefan Wahren
idle - add more links and fix typo in patch 13 - add new WIP patch 14 which recover DWC2 register after power down - take care of UART clock in patch 15 as commented by Florian - use SYSTEM_SLEEP_PM_OPS in patch 15 [1] - https://github.com/lategoodbye/rpi-zero/issues/9 [2] - https://bugzilla.red

Re: [PATCH 06/11] drm/vc4: hdmi: Handle error case of pm_runtime_resume_and_get

2024-07-23 Thread Stefan Wahren
Hello, Am 30.06.24 um 17:36 schrieb Stefan Wahren: The commit 0f5251339eda ("drm/vc4: hdmi: Make sure the controller is powered in detect") introduced the necessary power management handling to avoid register access while controller is powered down. Unfortunately it just print a

Re: [PATCH 09/11] usb: dwc2: Skip clock gating on Broadcom SoCs

2024-07-10 Thread Stefan Wahren
Am 05.07.24 um 23:14 schrieb Lukas Wunner: On Fri, Jul 05, 2024 at 12:16:14PM -0500, Jeremy Linton wrote: Am 05.07.24 um 17:03 schrieb Lukas Wunner: Careful there, the patch vaguely says... With that added and identified as "BCM2848", an id in use by other OSs for this device, the dw

Re: vc4: Increased CMA usage after replace drm_gem_dma_object for drm_gem_object in vc4_exec_info

2024-07-05 Thread Stefan Wahren
Hi, Am 05.07.24 um 17:19 schrieb Daniel Vetter: Adding dri-devel On Fri, 5 Jul 2024 at 17:14, Stefan Wahren wrote: Hi, last year my Raspberry Pi 3B Plus died, so i didn't noticed this sooner. If I ran Raspberry Pi OS Bullseye with X11 and a recent Mainline Kernel

Re: [PATCH 09/11] usb: dwc2: Skip clock gating on Broadcom SoCs

2024-07-05 Thread Stefan Wahren
Hi Jeremy, Am 05.07.24 um 17:03 schrieb Lukas Wunner: On Fri, Jul 05, 2024 at 12:22:33PM +0200, Stefan Wahren wrote: Am 05.07.24 um 10:48 schrieb Lukas Wunner: The real question is whether BCM2848 platforms likewise cannot disable the clock of the dwc2 controller or whether this is specific

Re: [PATCH 09/11] usb: dwc2: Skip clock gating on Broadcom SoCs

2024-07-05 Thread Stefan Wahren
Am 05.07.24 um 10:48 schrieb Lukas Wunner: On Thu, Jul 04, 2024 at 03:14:50PM +0100, Florian Fainelli wrote: On 6/30/2024 4:36 PM, Stefan Wahren wrote: On resume of the Raspberry Pi the dwc2 driver fails to enable HCD_FLAG_HW_ACCESSIBLE before re-enabling the interrupts. This causes a

Re: [PATCH 07/11] drm/vc4: hdmi: Disable connector status polling during suspend

2024-07-04 Thread Stefan Wahren
Hi Peter, Am 02.07.24 um 22:02 schrieb Peter Robinson: Hi Stefan, Suspend of VC4 HDMI will likely triggers a warning from vc4_hdmi_connector_detect_ctx() during poll of connector status. The power management will prevent the resume and keep the relevant power domain disabled. Since there is n

Re: [PATCH RFT 10/11] serial: 8250_bcm2835aux: add PM suspend/resume support

2024-07-04 Thread Stefan Wahren
Hi Florian, Am 04.07.24 um 16:12 schrieb Florian Fainelli: On 6/30/2024 5:53 PM, Stefan Wahren wrote: This adds suspend/resume support for the 8250_bcm2835aux driver to provide power management support on attached devices. Signed-off-by: Stefan Wahren --- Since i don't have a RS485

Re: [PATCH 09/11] usb: dwc2: Skip clock gating on Broadcom SoCs

2024-07-04 Thread Stefan Wahren
Hi Florian, Am 04.07.24 um 16:14 schrieb Florian Fainelli: On 6/30/2024 4:36 PM, Stefan Wahren wrote: On resume of the Raspberry Pi the dwc2 driver fails to enable HCD_FLAG_HW_ACCESSIBLE before re-enabling the interrupts. This causes a situation where both handler ignore a incoming port

Re: [PATCH 07/11] drm/vc4: hdmi: Disable connector status polling during suspend

2024-07-03 Thread Stefan Wahren
Am 03.07.24 um 12:28 schrieb Stefan Wahren: Hi Maxime, Am 02.07.24 um 15:48 schrieb Maxime Ripard: Hi, On Sun, Jun 30, 2024 at 05:36:48PM GMT, Stefan Wahren wrote: Suspend of VC4 HDMI will likely triggers a warning from vc4_hdmi_connector_detect_ctx() during poll of connector status. The

Re: [PATCH 07/11] drm/vc4: hdmi: Disable connector status polling during suspend

2024-07-03 Thread Stefan Wahren
Hi Maxime, Am 02.07.24 um 15:48 schrieb Maxime Ripard: Hi, On Sun, Jun 30, 2024 at 05:36:48PM GMT, Stefan Wahren wrote: Suspend of VC4 HDMI will likely triggers a warning from vc4_hdmi_connector_detect_ctx() during poll of connector status. The power management will prevent the resume and

[PATCH 11/11] ARM: bcm2835_defconfig: Enable SUSPEND

2024-06-30 Thread Stefan Wahren
Since the Raspberry Pi supports Suspend-To-Idle now, this option should be enabled. This should make power management testing easier. Signed-off-by: Stefan Wahren --- arch/arm/configs/bcm2835_defconfig | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/arm/configs/bcm2835_defconfig b

[PATCH RFT 10/11] serial: 8250_bcm2835aux: add PM suspend/resume support

2024-06-30 Thread Stefan Wahren
This adds suspend/resume support for the 8250_bcm2835aux driver to provide power management support on attached devices. Signed-off-by: Stefan Wahren --- Since i don't have a RS485 setup, any test feedback would be great. drivers/tty/serial/8250/8250_bcm2835aux.c

[PATCH 04/11] pmdomain: raspberrypi-power: Avoid powering down USB

2024-06-30 Thread Stefan Wahren
During supend to idle any request to power off the USB domain leads to a timeout. As a temporary workaround don't register the relevant power off handler. Link: https://github.com/raspberrypi/firmware/issues/1894 Signed-off-by: Stefan Wahren --- drivers/pmdomain/bcm/raspberrypi-power.

[PATCH 05/11] irqchip/bcm2835: Enable SKIP_SET_WAKE and MASK_ON_SUSPEND

2024-06-30 Thread Stefan Wahren
So enable the flags IRQCHIP_SKIP_SET_WAKE and IRQCHIP_MASK_ON_SUSPEND to let the irqchip core allows and handles the power management. Signed-off-by: Stefan Wahren --- drivers/irqchip/irq-bcm2835.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-bcm2835

[PATCH 06/11] drm/vc4: hdmi: Handle error case of pm_runtime_resume_and_get

2024-06-30 Thread Stefan Wahren
eed anyway. This could happen during suspend to idle. So we must assume it is unsafe to access the HDMI register. So bail out properly. Fixes: 0f5251339eda ("drm/vc4: hdmi: Make sure the controller is powered in detect") Signed-off-by: Stefan Wahren --- drivers/gpu/drm/vc4/vc4_hdmi.c

[PATCH 08/11] usb: dwc2: debugfs: Print parameter no_clock_gating

2024-06-30 Thread Stefan Wahren
The commit c4a0f7a6ab54 ("usb: dwc2: Skip clock gating on Samsung SoCs") introduced a parameter to skip enabling clock gating mode even the hardware platform should supports it. In order to make this more visible also print this in show parameters of debugfs. Signed-off-by: Ste

[PATCH 07/11] drm/vc4: hdmi: Disable connector status polling during suspend

2024-06-30 Thread Stefan Wahren
: Stefan Wahren --- drivers/gpu/drm/vc4/vc4_hdmi.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index b3a42b709718..e80495cea6ac 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -3106,6

[PATCH 09/11] usb: dwc2: Skip clock gating on Broadcom SoCs

2024-06-30 Thread Stefan Wahren
[<75cd278b>] usb_hcd_irq Disabling IRQ #66 Disabling clock gatling workaround this issue. Fixes: 0112b7ce68ea ("usb: dwc2: Update dwc2_handle_usb_suspend_intr function.") Link: https://lore.kernel.org/linux-usb/3fd0c2fb-4752-45b3-94eb-42352703e...@gmx.net/T/ Signed-off-by: Stefa

[PATCH 02/11] mailbox: bcm2835: Fix timeout during suspend mode

2024-06-30 Thread Stefan Wahren
noirq suspend of devices complete after 3095.584 msecs Link: https://github.com/raspberrypi/firmware/issues/1894 Fixes: 0bae6af6d704 ("mailbox: Enable BCM2835 mailbox support") Signed-off-by: Stefan Wahren --- drivers/mailbox/bcm2835-mailbox.c | 3 ++- 1 file changed, 2 insertions

[PATCH 03/11] pmdomain: raspberrypi-power: Adjust packet definition

2024-06-30 Thread Stefan Wahren
: https://github.com/raspberrypi/firmware/wiki/Mailbox-property-interface Signed-off-by: Stefan Wahren --- drivers/pmdomain/bcm/raspberrypi-power.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/pmdomain/bcm/raspberrypi-power.c b/drivers/pmdomain/bcm/raspberrypi

[PATCH 00/11] ARM: bcm2835: Implement initial S2Idle for Raspberry Pi

2024-06-30 Thread Stefan Wahren
1] - https://github.com/lategoodbye/rpi-zero/issues/9 [2] - https://bugzilla.redhat.com/show_bug.cgi?id=2283978 [3] - https://github.com/raspberrypi/firmware/issues/1894 [4] - https://lore.kernel.org/linux-usb/3fd0c2fb-4752-45b3-94eb-42352703e...@gmx.net/T/ Stefan Wahren (11): firmware: raspb

[PATCH 01/11] firmware: raspberrypi: Improve timeout warning

2024-06-30 Thread Stefan Wahren
Recent work on raspberry-power driver showed that even the stacktrace on firmware property timeout doesn't provide enough information. So add the first tag name to the warning to be in line with a status error. Signed-off-by: Stefan Wahren --- drivers/firmware/raspberrypi.c | 3 ++- 1

Re: vc4: WARNING during suspend to idle of Raspberry Pi 3 Plus

2024-06-27 Thread Stefan Wahren
Am 27.06.24 um 11:58 schrieb Maxime Ripard: On Tue, Jun 25, 2024 at 04:21:11PM GMT, Stefan Wahren wrote: Am 24.06.24 um 14:57 schrieb Maxime Ripard: On Sun, Jun 16, 2024 at 11:27:08AM GMT, Stefan Wahren wrote: Hi, i'm currently experiment with suspend to idle on the Raspberry Pi [1]. D

Re: vc4: WARNING during suspend to idle of Raspberry Pi 3 Plus

2024-06-25 Thread Stefan Wahren
Hi Maxime, Am 24.06.24 um 14:57 schrieb Maxime Ripard: On Sun, Jun 16, 2024 at 11:27:08AM GMT, Stefan Wahren wrote: Hi, i'm currently experiment with suspend to idle on the Raspberry Pi [1]. During my tests, i noticed a WARNING of the vc4 during suspend incl. Runtime PM usage count unde

vc4: WARNING during suspend to idle of Raspberry Pi 3 Plus

2024-06-16 Thread Stefan Wahren
Hi, i'm currently experiment with suspend to idle on the Raspberry Pi [1]. During my tests, i noticed a WARNING of the vc4 during suspend incl. Runtime PM usage count underflow. It would be nice if someone can look at it. In case you want to reproduce it, i can prepare a branch with some improvem

  1   2   3   >