From: Grazvydas Ignotas Date: Sat, 23 Jul 2016 22:49:33 +0000 (+0300) Subject: OMAPDSS: reload gamma table during context restore X-Git-Tag: sz_176~12 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed4d4c32669769990ea8fcb47fa911eed58481df;p=pandora-kernel.git OMAPDSS: reload gamma table during context restore also flush posted write after irq enable --- diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c index c86bd0653902..f1a09edd1fac 100644 --- a/drivers/video/omap2/dss/dispc.c +++ b/drivers/video/omap2/dss/dispc.c @@ -288,6 +288,7 @@ static void dispc_save_context(void) static void dispc_restore_context(void) { int i, j, ctx; + u32 val; DSSDBG("dispc_restore_context\n"); @@ -392,6 +393,12 @@ static void dispc_restore_context(void) if (dss_has_feature(FEAT_CORE_CLK_DIV)) RR(DIVISOR); + /* if gamma table is on, be sure to reload it */ + val = dispc_read_reg(DISPC_CONFIG); + if (FLD_GET(val, 3, 3) && + FLD_GET(val, 2, 1) == OMAP_DSS_LOAD_FRAME_ONLY) + dispc_set_loadmode(OMAP_DSS_LOAD_CLUT_ONCE_FRAME); + /* enable last, because LCD & DIGIT enable are here */ RR(CONTROL); if (dss_has_feature(FEAT_MGR_LCD2)) @@ -405,6 +412,9 @@ static void dispc_restore_context(void) */ RR(IRQENABLE); + /* flush posted write */ + dispc_read_reg(DISPC_IRQENABLE); + DSSDBG("context restored\n"); }