lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20230331093725.2505035-1-peng.fan@oss.nxp.com>
Date:   Fri, 31 Mar 2023 17:37:25 +0800
From:   "Peng Fan (OSS)" <peng.fan@....nxp.com>
To:     shawnguo@...nel.org, s.hauer@...gutronix.de
Cc:     kernel@...gutronix.de, festevam@...il.com, linux-imx@....com,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        Peng Fan <peng.fan@....com>
Subject: [PATCH] soc: imx: imx8m-blk-ctrl: set LCDIF panic read hurry level

From: Peng Fan <peng.fan@....com>

The ISI block could signal a panic condition to use hurry level
priority. When the bandwidth is low for ISI, the hurry level priority
could be used to avoid FIFO overflow. The NXP downstream ATF/Linux
Kernel sets the hurry level as 7.

Signed-off-by: Peng Fan <peng.fan@....com>
---

V1:
 If anyone has setup to help test, that would be appreciated.

 drivers/soc/imx/imx8m-blk-ctrl.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/soc/imx/imx8m-blk-ctrl.c b/drivers/soc/imx/imx8m-blk-ctrl.c
index 7c4045068804..eb13829e5dc1 100644
--- a/drivers/soc/imx/imx8m-blk-ctrl.c
+++ b/drivers/soc/imx/imx8m-blk-ctrl.c
@@ -690,6 +690,10 @@ static const struct imx8m_blk_ctrl_data imx8mn_disp_blk_ctl_dev_data = {
 #define LCDIF_ARCACHE_CTRL	0x4c
 #define  LCDIF_1_RD_HURRY	GENMASK(15, 13)
 #define  LCDIF_0_RD_HURRY	GENMASK(12, 10)
+#define ISI_CACHE_CTRL		0x50
+#define ISI_V_WR_HURRY		GENMASK(28, 26)
+#define ISI_U_WR_HURRY		GENMASK(25, 23)
+#define ISI_Y_WR_HURRY		GENMASK(22, 20)
 
 static int imx8mp_media_power_notifier(struct notifier_block *nb,
 				unsigned long action, void *data)
@@ -720,6 +724,15 @@ static int imx8mp_media_power_notifier(struct notifier_block *nb,
 		regmap_set_bits(bc->regmap, LCDIF_ARCACHE_CTRL,
 				FIELD_PREP(LCDIF_1_RD_HURRY, 7) |
 				FIELD_PREP(LCDIF_0_RD_HURRY, 7));
+
+		/*
+		 * Set panic write hurry level for ISI interfaces to
+		 * maximum priority to avoid bandwidth issue.
+		 */
+		regmap_set_bits(bc->regmap, ISI_CACHE_CTRL,
+				FIELD_PREP(ISI_V_WR_HURRY, 7) |
+				FIELD_PREP(ISI_U_WR_HURRY, 7) |
+				FIELD_PREP(ISI_Y_WR_HURRY, 7));
 	}
 
 	return NOTIFY_OK;
-- 
2.37.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ