MLK-16954: drm: imx: dcss: adjust context loader trigger values
authorLaurentiu Palcu <laurentiu.palcu@nxp.com>
Fri, 24 Nov 2017 13:03:28 +0000 (15:03 +0200)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
Apparently, when DCSS has to fight for data on the bus with other
processes, exists the risk for the scaler to freeze. Previous setting
used the documentation recommendation for setting the DB context loader
trigger time. Unfortunately, with that value, under high stress, the RGB
planes will go black and scaler will freeze.

This patch sets the SB/DB context loader triggers to a values
obtained through repeated tests that proved to provide the best user
experience (i.e. planes will not go black).

However, the underlining issue remains and HW needes to prioritize the
DCSS read operations.

With this workaround, under high stress, the RGB planes may experience
some flickering but they will not freeze.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
drivers/gpu/imx/dcss/dcss-dtg.c

index 570cc0a..5e3d51d 100644 (file)
@@ -248,9 +248,13 @@ void dcss_dtg_sync_set(struct dcss_soc *dcss, struct videomode *vm)
        dtg->dis_ulc_x = dis_ulc_x;
        dtg->dis_ulc_y = dis_ulc_y;
 
-       dcss_dtg_write(dtg,
-                      ((dis_ulc_y << TC_CTXLD_DB_Y_POS) & TC_CTXLD_DB_Y_MASK),
-                      DCSS_DTG_TC_CTXLD);
+       /*
+        * FIXME: the context loader trigger values should not be hard-coded,
+        * but these values proved to provide the best user experience. Planes
+        * that use RGB pixel formats (more bandwidth) will not disappear
+        * anymore.
+        */
+       dcss_dtg_write(dtg, 0x0008000a, DCSS_DTG_TC_CTXLD);
 }
 EXPORT_SYMBOL(dcss_dtg_sync_set);