From patchwork Wed Jul 4 16:14:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 939474 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ljnsSHSW"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="n2VsN1HU"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41LRBH32pfz9s3q for ; Thu, 5 Jul 2018 02:23:35 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=mRIQ5q3YIG0qldzrPtkXYpJDX8QfdxYTkb0I1I29h1c=; b=ljnsSHSW3jjU8SUO1SJXCSPVBr cpISJSgy5fiQOpybY5ofdCSgwOEPTTkKvvZiXRYGErhp9wdKD3F6EXbW12lZdECf+Mh/TvkDSg5F7 6pQxUj8ARBZNPAFS+ooR5GcgBCWEBTCEFfGJJ9vV0trhrwHVrvNJ9NyVqcaByyU3yeGbiG57RaV3F MZnnEE9CEbcIUnx4EMd8fwRdzJe5pMPtVbbMhScsUo6cZwTnhHLOsNc9hKbtsP2xUUVsI0fRwn43D bwFqW7IhXATazeRS8Hk1qpvjyYa4z7JHjAvgoN3ff3GvQQGzYP5QHzlhBEHCTyZqxSKPy6TIGp/Th B9Qc+34Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fakZ1-0006ck-1o; Wed, 04 Jul 2018 16:23:31 +0000 Received: from mail-ua0-x241.google.com ([2607:f8b0:400c:c08::241]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fakPU-0002Pb-Pq for linux-arm-kernel@lists.infradead.org; Wed, 04 Jul 2018 16:13:42 +0000 Received: by mail-ua0-x241.google.com with SMTP id n4-v6so3736723uad.6 for ; Wed, 04 Jul 2018 09:13:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=gthSsiFeJRjKIssJeyEu/btGBc+qmJozIt5s6YpcwbY=; b=n2VsN1HUBwQLHx1dCgwiqDteSOQuZbuPOzbNCDf7sCCVavOEgGEjtnKATRPh5YClmX 4DRK09yIqHCxRP1KtbTsxUfy95AmXHWzkBlfd9nPaCS5DYQJZMyZbSPcVH5CZq8HBS15 0dfvb/J3I5SZSfgEcCz0WWRu0HpwOgQgN9vqT3HMVgj5iMTiDSKQZJ3Ghcvu2MyZWunZ 7kEAjocEXdB1IUWACXsZcrw2giuIZDO+ukd7ssUL55MBaJU8mHrp2Q3pef8sWpzXmwnu YRGm42x1mDWky6s47rJlxvnaPctWMTD8eN7jd7/78mduWjRT63iFmXayIlhgF9fGPwJM o6zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=gthSsiFeJRjKIssJeyEu/btGBc+qmJozIt5s6YpcwbY=; b=BCYwADXTC4F/8bKntWSdQxA/qbLktKHM4MALQe4SzS1jiQkORuidvaqy4piCG7VIJe qIGLDy84bmCL43z//oyqCR5G26lFURsoD4CWL0SYR24V9Na4RzOaeauyEEdDjXkqqE0b tOYHYDcLTM0u8PvZpHAybzgUW7MoI9ulfDjOOcuGVTssIwSUi+8r5FNj+wXPISxgaOAM Q/NX8RUORuXn/sALN2KmPKn6cebgQZRsEqM4l1e+YeextoLv1YULwxezsyleoHjghN9b /OmfM8YuBiPQK+NKuNfCAfmm1N9HOzHjykKRgl52weKPZN1+QcRxCZr8QhiFYq34ZVxu O4Lw== X-Gm-Message-State: APt69E2QgaYG0fDN5E9MnYy7qGfU3xBgIdWdxbYUN2KMqpJuEAYigCIN /v9snldCinUvo5W48NjIIqw= X-Google-Smtp-Source: AAOMgpdZ4ZZx4qFxSH47dD6Xd7HKiDH6rUPXWLRsKc1A7fdpsQfV8TQNv8YPJ90c+/ediOgbd4gCPw== X-Received: by 2002:ab0:25d6:: with SMTP id y22-v6mr1669818uan.33.1530720809555; Wed, 04 Jul 2018 09:13:29 -0700 (PDT) Received: from localhost.localdomain ([2804:14c:482:8e7:21ea:4bef:6aab:71bd]) by smtp.gmail.com with ESMTPSA id w7-v6sm374375vke.54.2018.07.04.09.13.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 04 Jul 2018 09:13:29 -0700 (PDT) From: Fabio Estevam To: shawnguo@kernel.org Subject: [PATCH 2/2] ARM: imx51: Configure M4IF to avoid visual artifacts Date: Wed, 4 Jul 2018 13:14:02 -0300 Message-Id: <1530720842-28281-2-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1530720842-28281-1-git-send-email-festevam@gmail.com> References: <1530720842-28281-1-git-send-email-festevam@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180704_091340_837137_A83F0857 X-CRM114-Status: GOOD ( 15.00 ) X-Spam-Score: -0.1 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2607:f8b0:400c:c08:0:0:0:241 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (festevam[at]gmail.com) -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fabio Estevam , linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de, sergey.lapin@cogentembedded.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org From: Fabio Estevam Configure the M4IF registers as per the vendor bootloader to avoid visual artifacts during video playback. This way we don't need to rely on the bootloader configuration for optimal IPU/VPU bus priorities. Signed-off-by: Fabio Estevam Tested-by: Sergey Lapin Reviewed-by: Lucas Stach --- arch/arm/mach-imx/mach-imx51.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/mach-imx51.c b/arch/arm/mach-imx/mach-imx51.c index 3835b6a..37ffdfa 100644 --- a/arch/arm/mach-imx/mach-imx51.c +++ b/arch/arm/mach-imx/mach-imx51.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -48,11 +49,37 @@ static void __init imx51_ipu_mipi_setup(void) iounmap(hsc_addr); } +static void __init imx51_m4if_setup(void) +{ + void __iomem *m4if_base; + struct device_node *np; + + np = of_find_compatible_node(NULL, NULL, "fsl,imx51-m4if"); + if (!np) + return; + + m4if_base = of_iomap(np, 0); + if (!m4if_base) { + pr_err("Unable to map M4IF registers\n"); + return; + } + + /* + * Configure VPU and IPU with higher priorities + * in order to avoid artifacts during video playback + */ + writel_relaxed(0x00000203, m4if_base + 0x40); + writel_relaxed(0x00000000, m4if_base + 0x44); + writel_relaxed(0x00120125, m4if_base + 0x9c); + writel_relaxed(0x001901A3, m4if_base + 0x48); + iounmap(m4if_base); +} + static void __init imx51_dt_init(void) { imx51_ipu_mipi_setup(); imx_src_init(); - + imx51_m4if_setup(); imx_aips_allow_unprivileged_access("fsl,imx51-aipstz"); }