]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
imx8m-blk-ctrl: set ISI panic write hurry level
authorKrzysztof Hałasa <khalasa@piap.pl>
Fri, 9 May 2025 09:26:55 +0000 (11:26 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 18 Jun 2025 12:39:38 +0000 (14:39 +0200)
Apparently, ISI needs cache settings similar to LCDIF.
Otherwise we get artefacts in the image.
Tested on i.MX8MP.

Signed-off-by: Krzysztof Hałasa <khalasa@piap.pl>
Link: https://lore.kernel.org/r/m3ldr69lsw.fsf@t19.piap.pl
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/pmdomain/imx/imx8m-blk-ctrl.c

index 912802b5215bd2e14cf064f973fbeb99614f4082..5c83e5599f1ea648389f581e60a8a05b05d6c05f 100644 (file)
@@ -665,6 +665,11 @@ static const struct imx8m_blk_ctrl_data imx8mn_disp_blk_ctl_dev_data = {
 #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)
 {
@@ -694,6 +699,11 @@ 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));
+               /* Same here for ISI */
+               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;