arm: mach-k3: am62a7: Enable QoS for DSS
Subsystems (2)
PATCH 1/1 arm: mach-k3: am62a7: Enable QoS for DSS
Enable Quality of Service (QoS) blocks for Display SubSystem (DSS), by servicing the DSS - DDR traffic from the Real-Time (RT) queue. This is done by setting the DSS DMA orderID to 8.
The C7x and VPAC have been overwhelming the DSS's access to the DDR (when it was accessing via the Non Real-Time (NRT) Queue), primarily because their functional frequencies, and hence DDR accesses, were significantly higher than that of DSS. This led the display to flicker when certain edgeAI models were being run.
With the DSS traffic serviced from the RT queue, the flickering issue has been found to be mitigated.
The am62a qos files are auto generated from the k3 resource partitioning tool.
Section-3.1.12, "QoS Programming Guide", in the AM62A TRM[1], provides more information about the QoS, and section-14.1, "System Interconnect Registers", provides the register descriptions.
[1] AM62A Tech Ref Manual: https://www.ti.com/lit/pdf/spruj16
--- arch/arm/mach-k3/am62a7_init.c | 16 +++ arch/arm/mach-k3/am62ax/Makefile | 1 + arch/arm/mach-k3/am62ax/am62a_qos_data.c | 47 +++++++++ arch/arm/mach-k3/include/mach/am62a_qos.h | 114 ++++++++++++++++++++++ arch/arm/mach-k3/include/mach/hardware.h | 9 ++ 5 files changed, 187 insertions(+) create mode 100644 arch/arm/mach-k3/am62ax/am62a_qos_data.c create mode 100644 arch/arm/mach-k3/include/mach/am62a_qos.h
arch/arm/mach-k3/am62a7_init.c +16 -0
@@ -65,6 +65,20 @@ static void ctrl_mmr_unlock(void)mmr_unlock (PADCFG_MMR1_BASE ,1 ); } +#if (IS_ENABLED (CONFIG_CPU_V7R )) +static void setup_qos (void ) +{ +u32 i; + +for (i =0 ; i < am62a_qos_count; i++) +writel (am62a_qos_data[i].val, (uintptr_t )am62a_qos_data[i].reg); +} +#else +static void setup_qos (void ) +{ +} +#endif +void board_init_f (ulong dummy) {struct udevice *dev;
@@ -158,6 +172,8 @@ void board_init_f(ulong dummy)panic ("DRAM init failed: %d\n" , ret);#endif +setup_qos (); +printf ("am62a_init: %s done\n" , __func__); }
arch/arm/mach-k3/am62ax/Makefile +1 -0
@@ -4,3 +4,4 @@ obj-y += clk-data.o obj-y += dev-data.o +obj-y += am62a_qos_data.o
arch/arm/mach-k3/am62ax/am62a_qos_data.c new file +47 -0
47 lines not on this page · raw message
arch/arm/mach-k3/include/mach/am62a_qos.h new file +114 -0
114 lines not on this page · raw message
arch/arm/mach-k3/include/mach/hardware.h +9 -0
@@ -28,6 +28,7 @@#ifdef CONFIG_SOC_K3_AM62A7 #include "am62a_hardware.h" +#include "am62a_qos.h" #endif /* Assuming these addresses and definitions stay common across K3 devices */
@@ -71,4 +72,12 @@ struct rom_extended_boot_data { u32 num_components; }; +struct k3_qos_data { +u32 reg; +u32 val; +}; + +extern struct k3_qos_data am62a_qos_data[]; +extern u32 am62a_qos_count; +#endif /* _ASM_ARCH_HARDWARE_H_ */
Signature · 1 line
2.39.1
Quoted 16 lines · Aradhya Bhatia
Enable Quality of Service (QoS) blocks for Display SubSystem (DSS), by servicing the DSS - DDR traffic from the Real-Time (RT) queue. This is done by setting the DSS DMA orderID to 8.
The C7x and VPAC have been overwhelming the DSS's access to the DDR (when it was accessing via the Non Real-Time (NRT) Queue), primarily because their functional frequencies, and hence DDR accesses, were significantly higher than that of DSS. This led the display to flicker when certain edgeAI models were being run.
With the DSS traffic serviced from the RT queue, the flickering issue has been found to be mitigated.
The am62a qos files are auto generated from the k3 resource partitioning tool.
Quoted 7 lines
Section-3.1.12, "QoS Programming Guide", in the AM62A TRM[1], provides more information about the QoS, and section-14.1, "System Interconnect Registers", provides the register descriptions.
[1] AM62A Tech Ref Manual: https://www.ti.com/lit/pdf/spruj16
Signed-off-by Aradhya Bhatia <[email protected]>
Applied to u-boot/master, thanks!
Signature · 1 line
Tom