DCSS needs some time to stabilize after switching to a new pixel clock.
All interrupts will delayed till the clock stabilizes and we'll end up
getting warnings about VBLANK interrupt taking more than 50ms to arrive.
This patch adds a 500ms delay after switching to a new clock. This will
allow DCSS to stabilize before enabling CRTC and DTG channels.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
#include <linux/io.h>
#include <linux/clk.h>
#include <linux/seq_file.h>
+#include <linux/delay.h>
#include <drm/drm_fourcc.h>
#include <video/imx-dcss.h>
clk_prepare_enable(dcss->pdiv_clk);
clk_prepare_enable(dcss->pout_clk);
+ msleep(500);
+
dcss_dtg_write(dtg, ((dtg_lrc_y << TC_Y_POS) | dtg_lrc_x),
DCSS_DTG_TC_DTG);
dcss_dtg_write(dtg, ((dis_ulc_y << TC_Y_POS) | dis_ulc_x),