From patchwork Mon Jul 9 18:19:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 941548 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="ss1uEvWL"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="HQLII4AW"; 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 41PYWR5BKDz9rxs for ; Tue, 10 Jul 2018 04:19:15 +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=9/kh1zUF+jNS27VSTpJueuz6UzxZgbgwr2GwIQGxTe0=; b=ss1uEvWLgmoPZ6QDdHtbGm9HOn TqDa/Iz/9N5lNHMQDB7A5/C4y5AKulrJRVkRmK4QjzIy1WH6uqnUnTPREpI5QpM7he39+/4M66JfB 7ZMZW7DkpPby7IxuvCV4ybvVkgkzgasrGwI+/OEnlGMzLaO424oZkpzAvbuXpvqV0bevujZy1Sz2o tlG2y7+RwTr6tCHmFFqflL620+9M53tMSC3E+zSoNQ8uBw2RA9Vzj90qUvKkfwdPyQV0s6Jzc1MeI UZxXMFD+mVGKfxXrdzaXoxRIyZjwBsjfX+3QUzzE69pi1/LfgGpJ3d4uHtDZ3MhB6FRRHggR3Df+l o8D8E21Q==; 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 1fcaki-0003Ct-9x; Mon, 09 Jul 2018 18:19:12 +0000 Received: from mail-ua0-x244.google.com ([2607:f8b0:400c:c08::244]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fcakK-0002ct-Mv for linux-arm-kernel@lists.infradead.org; Mon, 09 Jul 2018 18:18:50 +0000 Received: by mail-ua0-x244.google.com with SMTP id r18-v6so12293578ual.13 for ; Mon, 09 Jul 2018 11:18:40 -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=dk5JutrEqGiy+I5HuHNOVXS5mL3qBMFmMD42NloAh5Y=; b=HQLII4AWomgMAPUTO+TZgg2QWOWUhGLA/BIk1cqwQN/n+CPXWVSIvS/Bda/lTwCvAA yQ4PKWIQPRkL5mCk9I3Xe9zVv2G1YYRDFZkpE+Yd6K7oblxPhGv/B7BKtGcmdy568jy7 1jL8ZLnp56Phd8VjW9QITDSBg/+AOkQuhmU0TiOxiwLEwCHmyGUFFFM0JxmKHb5onahw bgrVORsKIZa5ZAH7CL0274b3vYAkMsCadu2osQdZWLm+O3S6hisMqjD7J431dOQonbic CupLGTX+XcHFubB3OitnmlkpNZpxBohPLS5o16EzpKLyhzio03gqxhmY3zJgVmOHQjja IMhA== 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=dk5JutrEqGiy+I5HuHNOVXS5mL3qBMFmMD42NloAh5Y=; b=BbHyyTsllOwO/kUxWL2Eki6TtFC3UrwvBDCQT4KSNND6DSzlsPbhmx+hy7JADRSxMo FpkNAGUWMszQF7oPfJGB+Enrc0C0lfAPvprn9u66L3IoV/sSyTllYaBXtDRCR242vLz1 c4ld30MaZPFCrmx7q187tt4IK8jOqAm5McJcx4qFDMhwFeUaOM7ealC0eiEbTjSvb+0n WcqzS/3duO2lX3cI1VQosVkVdL6wOpp5xPXXHAtqsGF2eqoqa1d97eaPL57Hfw/wBXK8 zNfG+/3kuG/7fzVIx4eW33QGKL4RvMqlICKmIcKdvO9YH0HEoV0QXEuxeJH7QvKi1RMS f0DA== X-Gm-Message-State: APt69E3DcN2CDrviUm+WH271EoDb8B9C7qJBYsPKvVedGJkmzc+BKreZ sxgbMJqu5rdyR2rj3V1gGvv26A== X-Google-Smtp-Source: AAOMgpfIERDfIajGm72kUKXED96i1RKGY1DlIoUdAUUMBz3WMJ0V5MmQzMmzWaSzpKN+QRTsWf8HYw== X-Received: by 2002:ab0:5507:: with SMTP id t7-v6mr10718527uaa.100.1531160320038; Mon, 09 Jul 2018 11:18:40 -0700 (PDT) Received: from localhost.localdomain ([2804:14c:482:8e7:eca1:34df:d25e:1d13]) by smtp.gmail.com with ESMTPSA id u8-v6sm3182795vku.1.2018.07.09.11.18.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 09 Jul 2018 11:18:39 -0700 (PDT) From: Fabio Estevam To: shawnguo@kernel.org Subject: [PATCH v2 2/2] ARM: imx51: Configure M4IF to avoid visual artifacts Date: Mon, 9 Jul 2018 15:19:15 -0300 Message-Id: <1531160355-12384-3-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1531160355-12384-1-git-send-email-festevam@gmail.com> References: <1531160355-12384-1-git-send-email-festevam@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180709_111848_749621_C3963420 X-CRM114-Status: GOOD ( 15.21 ) 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:244 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (festevam[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -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 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 , devicetree@vger.kernel.org, robh+dt@kernel.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de 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 --- Changes since v1: - None 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"); }