2020-07-01 13:00:23

by Benjamin GAIGNARD

[permalink] [raw]
Subject: [PATCH v6 0/3] DCMI set minimum cpufreq requirement

This series allow to STM32 camera interface (DCMI) to require a minimum
frequency to the CPUs before start streaming frames from the sensor.
The minimum frequency requirement is provided in the devide-tree node.

Setting a minimum frequency for the CPUs is needed to ensure a quick handling
of the interrupts between two sensor frames and avoid dropping half of them.

version 6:
- come back to version 4 and follow Valentin's suggestions about notifier

version 5:
- add a mutex to protect dcmi_irq_notifier_notify()
- register notifier a probe time

version 4:
- simplify irq affinity handling by using only dcmi_irq_notifier_notify()

version 3:
- add a cpumask field to track boosted CPUs
- add irq_affinity_notify callback
- protect cpumask field with a mutex

Benjamin Gaignard (3):
dt-bindings: media: stm32-dcmi: Add DCMI min frequency property
media: stm32-dcmi: Set minimum cpufreq requirement
ARM: dts: stm32: Set DCMI frequency requirement for stm32mp15x

.../devicetree/bindings/media/st,stm32-dcmi.yaml | 8 ++
arch/arm/boot/dts/stm32mp151.dtsi | 1 +
drivers/media/platform/stm32/stm32-dcmi.c | 138 +++++++++++++++++++--
3 files changed, 139 insertions(+), 8 deletions(-)

--
2.15.0


2020-07-01 13:00:36

by Benjamin GAIGNARD

[permalink] [raw]
Subject: [PATCH v6 3/3] ARM: dts: stm32: Set DCMI frequency requirement for stm32mp15x

Make sure that CPUs will at least run at 650Mhz when streaming
sensor frames.

Signed-off-by: Benjamin Gaignard <[email protected]>
---
arch/arm/boot/dts/stm32mp151.dtsi | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/stm32mp151.dtsi b/arch/arm/boot/dts/stm32mp151.dtsi
index 3ea05ba48215..f6d7bf4f8231 100644
--- a/arch/arm/boot/dts/stm32mp151.dtsi
+++ b/arch/arm/boot/dts/stm32mp151.dtsi
@@ -1091,6 +1091,7 @@
clock-names = "mclk";
dmas = <&dmamux1 75 0x400 0x0d>;
dma-names = "tx";
+ st,stm32-dcmi-min-frequency = <650000>;
status = "disabled";
};

--
2.15.0

2020-07-01 13:05:14

by Benjamin GAIGNARD

[permalink] [raw]
Subject: Re: [PATCH v6 0/3] DCMI set minimum cpufreq requirement



On 7/1/20 2:59 PM, Benjamin Gaignard wrote:
> This series allow to STM32 camera interface (DCMI) to require a minimum
> frequency to the CPUs before start streaming frames from the sensor.
> The minimum frequency requirement is provided in the devide-tree node.
>
> Setting a minimum frequency for the CPUs is needed to ensure a quick handling
> of the interrupts between two sensor frames and avoid dropping half of them.
Please forget this version, the incoming version 7 should have fix your
remarks.

Sorry,
Benjamin
> version 6:
> - come back to version 4 and follow Valentin's suggestions about notifier
>
> version 5:
> - add a mutex to protect dcmi_irq_notifier_notify()
> - register notifier a probe time
>
> version 4:
> - simplify irq affinity handling by using only dcmi_irq_notifier_notify()
>
> version 3:
> - add a cpumask field to track boosted CPUs
> - add irq_affinity_notify callback
> - protect cpumask field with a mutex
>
> Benjamin Gaignard (3):
> dt-bindings: media: stm32-dcmi: Add DCMI min frequency property
> media: stm32-dcmi: Set minimum cpufreq requirement
> ARM: dts: stm32: Set DCMI frequency requirement for stm32mp15x
>
> .../devicetree/bindings/media/st,stm32-dcmi.yaml | 8 ++
> arch/arm/boot/dts/stm32mp151.dtsi | 1 +
> drivers/media/platform/stm32/stm32-dcmi.c | 138 +++++++++++++++++++--
> 3 files changed, 139 insertions(+), 8 deletions(-)
>