From patchwork Tue Dec 13 07:24:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nickey Yang X-Patchwork-Id: 705319 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3tdB6w4Jznz9t1C for ; Tue, 13 Dec 2016 18:24:56 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E767DA75AC; Tue, 13 Dec 2016 08:24:53 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id brWRFjwBZaT0; Tue, 13 Dec 2016 08:24:53 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 57A634BA35; Tue, 13 Dec 2016 08:24:53 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C2EC64BA35 for ; Tue, 13 Dec 2016 08:24:50 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id comeYBDeQTpC for ; Tue, 13 Dec 2016 08:24:50 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from regular1.263xmail.com (regular1.263xmail.com [211.150.99.138]) by theia.denx.de (Postfix) with ESMTPS id 2D6434B99D for ; Tue, 13 Dec 2016 08:24:45 +0100 (CET) Received: from nickey.yang?rock-chips.com (unknown [192.168.167.78]) by regular1.263xmail.com (Postfix) with ESMTP id 3CCDA7A37; Tue, 13 Dec 2016 15:24:39 +0800 (CST) X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.263.net (Postfix) with ESMTP id 846E3406; Tue, 13 Dec 2016 15:24:38 +0800 (CST) X-RL-SENDER: nickey.yang@rock-chips.com X-FST-TO: sjg@chromium.org X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: nickey.yang@rock-chips.com X-UNIQUE-TAG: X-ATTACHMENT-NUM: 0 X-SENDER: nickey.yang@rock-chips.com X-DNS-TYPE: 0 Received: from localhost.localdomain (unknown [58.22.7.114]) by smtp.263.net (Postfix) whith ESMTP id 1085THAO9E; Tue, 13 Dec 2016 15:24:39 +0800 (CST) From: Nickey Yang To: sjg@chromium.org Date: Tue, 13 Dec 2016 15:24:28 +0800 Message-Id: <1481613868-4380-1-git-send-email-nickey.yang@rock-chips.com> X-Mailer: git-send-email 1.9.1 Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH v3] rockchip: rk3288: set isp/vop qos priority level X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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 --- arch/arm/include/asm/arch-rockchip/qos_rk3288.h | 26 +++++++++++++++++++++++++ arch/arm/mach-rockchip/rk3288-board.c | 15 ++++++++++++++ 2 files changed, 41 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..f0420ba --- /dev/null +++ b/arch/arm/include/asm/arch-rockchip/qos_rk3288.h @@ -0,0 +1,26 @@ +/* + * 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 PRIORITY_MASK 3 + +#define PRIORITY_HIGH_VAL(h) \ + (((h) & PRIORITY_MASK) << PRIORITY_HIGH_SHIFT) +#define PRIORITY_LOW_VAL(l) \ + (((l) & PRIORITY_MASK) << PRIORITY_LOW_SHIFT) + +#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/arch/arm/mach-rockchip/rk3288-board.c b/arch/arm/mach-rockchip/rk3288-board.c index 411bb29..b54c40a 100644 --- a/arch/arm/mach-rockchip/rk3288-board.c +++ b/arch/arm/mach-rockchip/rk3288-board.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -54,6 +55,20 @@ int board_late_init(void) { setup_boot_mode(); + /* set vop qos to higher priority */ + writel(PRIORITY_HIGH_VAL(2) | PRIORITY_LOW_VAL(2), + VIO0_VOP_QOS + CPU_AXI_QOS_PRIORITY); + writel(PRIORITY_HIGH_VAL(2) | PRIORITY_LOW_VAL(2), + VIO1_VOP_QOS + CPU_AXI_QOS_PRIORITY); + + /* set isp qos to higher priority */ + writel(PRIORITY_HIGH_VAL(2) | PRIORITY_LOW_VAL(2), + VIO1_ISP_R_QOS + CPU_AXI_QOS_PRIORITY); + writel(PRIORITY_HIGH_VAL(2) | PRIORITY_LOW_VAL(2), + VIO1_ISP_W0_QOS + CPU_AXI_QOS_PRIORITY); + writel(PRIORITY_HIGH_VAL(2) | PRIORITY_LOW_VAL(2), + VIO1_ISP_W1_QOS + CPU_AXI_QOS_PRIORITY); + return rk_board_late_init(); }