[U-Boot] [PATCH v2] miniarm-rk3288: set isp/vop qos priority level

Simon Glass sjg at chromium.org
Sun Dec 11 21:27:30 CET 2016


Hi Nickey,

On 8 December 2016 at 21:39, Nickey Yang <nickey.yang at rock-chips.com> wrote:
> isp-camera image will be broken when enter dual screen display mode.
> We set isp qos high to solve this problem.
>
> Signed-off-by: Nickey Yang <nickey.yang at rock-chips.com>
> ---
>  arch/arm/include/asm/arch-rockchip/qos_rk3288.h | 21 +++++++++++++++++++++
>  board/rockchip/miniarm_rk3288/miniarm-rk3288.c  | 21 +++++++++++++++++++++
>  2 files changed, 42 insertions(+)
>  create mode 100644 arch/arm/include/asm/arch-rockchip/qos_rk3288.h
>
> 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
> index 0000000..d3d6c3e
> --- /dev/null
> +++ b/arch/arm/include/asm/arch-rockchip/qos_rk3288.h
> @@ -0,0 +1,21 @@
> +/*
> + * Copyright 2016 Rockchip Inc.
> + *
> + * SPDX-License-Identifier:     GPL-2.0+
> + */
> +#ifndef _ASM_ARCH_QOS_RK3288_H
> +#define _ASM_ARCH_QOS_RK3288_H
> +
> +/* cpu axi qos priority */
> +#define CPU_AXI_QOS_PRIORITY_LEVEL(h, l) \
> +       ((((h) & 3) << 2) | ((l) & 3))

Can you instead define

XXX_SHIFT   2
XXX_MASK  (3 << XXX_SHIFT)

and then use these in the .c code?

> +
> +#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
> diff --git a/board/rockchip/miniarm_rk3288/miniarm-rk3288.c b/board/rockchip/miniarm_rk3288/miniarm-rk3288.c
> index 79541a3..ba0f3a3 100644
> --- a/board/rockchip/miniarm_rk3288/miniarm-rk3288.c
> +++ b/board/rockchip/miniarm_rk3288/miniarm-rk3288.c
> @@ -5,3 +5,24 @@
>   */
>
>  #include <common.h>
> +#include <asm/io.h>
> +#include <asm/arch/qos_rk3288.h>
> +
> +int rk_board_late_init(void)
> +{
> +       /* set isp qos to higher priority */
> +       writel(CPU_AXI_QOS_PRIORITY_LEVEL(2, 2),
> +              VIO1_ISP_R_QOS + CPU_AXI_QOS_PRIORITY);
> +       writel(CPU_AXI_QOS_PRIORITY_LEVEL(2, 2),
> +              VIO1_ISP_W0_QOS + CPU_AXI_QOS_PRIORITY);
> +       writel(CPU_AXI_QOS_PRIORITY_LEVEL(2, 2),
> +              VIO1_ISP_W1_QOS + CPU_AXI_QOS_PRIORITY);
> +
> +       /* set vop qos to higher priority */
> +       writel(CPU_AXI_QOS_PRIORITY_LEVEL(2, 2),
> +              VIO0_VOP_QOS + CPU_AXI_QOS_PRIORITY);
> +       writel(CPU_AXI_QOS_PRIORITY_LEVEL(2, 2),
> +              VIO1_VOP_QOS + CPU_AXI_QOS_PRIORITY);

Can you add a register struct for this in arch/arm/include/asm/arch-rockchip/ ?

Also I think it would be best to put this code somewhere in
arch/arm/mach-rockchip and call it from your late init routine.

> +
> +       return 0;
> +}
> --
> 1.9.1
>
>

Regards,
Simon


More information about the U-Boot mailing list