From e035104f55e0d7520f9b57ae1791d370ccecdcb2 Mon Sep 17 00:00:00 2001 From: Laurentiu Palcu Date: Thu, 14 Dec 2017 15:35:02 +0200 Subject: [PATCH] MLK-17232-1: drm: imx: dcss: Fix context loader settings for LCD panel If the vfront/vback porches are small are vsync length is small, the dis_ulc_y is also small. Hence, the DB trigger setting will be inappropriate and the DB context will not be able to load in time. Signed-off-by: Laurentiu Palcu --- drivers/gpu/imx/dcss/dcss-dtg.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/imx/dcss/dcss-dtg.c b/drivers/gpu/imx/dcss/dcss-dtg.c index 9fa5614e705e..b3b9fc88f696 100644 --- a/drivers/gpu/imx/dcss/dcss-dtg.c +++ b/drivers/gpu/imx/dcss/dcss-dtg.c @@ -249,7 +249,12 @@ 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, DCSS_DTG_TC_CTXLD); + /* + * If the dis_ulc_y is too small, then the context loader will not have + * time to load the DB context. This happens with LCD panels which have + * small vfront_porch, vback_porch and/or vsync_len. + */ + dcss_dtg_write(dtg, dis_ulc_y < 50 ? 50 : dis_ulc_y, DCSS_DTG_TC_CTXLD); } EXPORT_SYMBOL(dcss_dtg_sync_set); -- 2.17.1