]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
rockchip: rk3288: set isp/vop qos priority level
authorNickey Yang Nickey Yang <nickey.yang@rock-chips.com>
Thu, 29 Dec 2016 02:47:30 +0000 (10:47 +0800)
committerSimon Glass <sjg@chromium.org>
Thu, 12 Jan 2017 03:23:50 +0000 (20:23 -0700)
Isp-camera preview image will be broken when dual screen display mode.
This patch set isp/vop qos level higher to solve this problem.
We have verified this patch on rk3288-miniarm board.

Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
arch/arm/include/asm/arch-rockchip/qos_rk3288.h [new file with mode: 0644]
arch/arm/mach-rockchip/rk3288-board.c

diff --git a/arch/arm/include/asm/arch-rockchip/qos_rk3288.h b/arch/arm/include/asm/arch-rockchip/qos_rk3288.h
new file mode 100644 (file)
index 0000000..b3094fc
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2016 Rockchip Inc.
+ *
+ * SPDX-License-Identifier:     GPL-2.0+
+ */
+#ifndef _ASM_ARCH_QOS_RK3288_H
+#define _ASM_ARCH_QOS_RK3288_H
+
+#define PRIORITY_HIGH_SHIFT    2
+#define PRIORITY_LOW_SHIFT     0
+
+#define CPU_AXI_QOS_PRIORITY    0x08
+
+#define VIO0_VOP_QOS            0xffad0400
+#define VIO1_VOP_QOS            0xffad0000
+#define VIO1_ISP_R_QOS          0xffad0900
+#define VIO1_ISP_W0_QOS         0xffad0100
+#define VIO1_ISP_W1_QOS         0xffad0180
+
+#endif
index bca6075c2c3380c9cd9f118b0b68436c0d18c846..8bf45f7fc794a88898d5ff6cf451bbff5eeb458f 100644 (file)
@@ -13,6 +13,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/periph.h>
 #include <asm/arch/pmu_rk3288.h>
+#include <asm/arch/qos_rk3288.h>
 #include <asm/arch/boot_mode.h>
 #include <asm/gpio.h>
 #include <dm/pinctrl.h>
@@ -51,9 +52,28 @@ __weak int rk_board_late_init(void)
        return 0;
 }
 
+int rk3288_qos_init(void)
+{
+       int val = 2 << PRIORITY_HIGH_SHIFT | 2 << PRIORITY_LOW_SHIFT;
+       /* set vop qos to higher priority */
+       writel(val, CPU_AXI_QOS_PRIORITY + VIO0_VOP_QOS);
+       writel(val, CPU_AXI_QOS_PRIORITY + VIO1_VOP_QOS);
+
+       if (!fdt_node_check_compatible(gd->fdt_blob, 0,
+                                      "rockchip,rk3288-miniarm"))
+       {
+               /* set isp qos to higher priority */
+               writel(val, CPU_AXI_QOS_PRIORITY + VIO1_ISP_R_QOS);
+               writel(val, CPU_AXI_QOS_PRIORITY + VIO1_ISP_W0_QOS);
+               writel(val, CPU_AXI_QOS_PRIORITY + VIO1_ISP_W1_QOS);
+       }
+       return 0;
+}
+
 int board_late_init(void)
 {
        setup_boot_mode();
+       rk3288_qos_init();
 
        return rk_board_late_init();
 }