From: Mayuresh Janorkar <[email protected]>

Context Save and Restore of DISPC registers for Secondary LCD

Signed-off-by: Sumit Semwal <[email protected]>
Signed-off-by: Senthilvadivu Guruswamy <[email protected]>
Signed-off-by: Mukund Mittal <[email protected]>
Signed-off-by: Archit Taneja <[email protected]>
Signed-off-by: Samreen <[email protected]>
---
 drivers/video/omap2/dss/dispc.c |   39 ++++++++++++++++++++++++++++++++++++++-
 1 files changed, 38 insertions(+), 1 deletions(-)

diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index c7811b4..9f83f7e 
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -230,6 +230,17 @@ void dispc_save_context(void)
        SR(SIZE_DIG);
        SR(SIZE_LCD(0));
 
+       if (cpu_is_omap44xx()) {
+               SR(CONTROL(2));
+               SR(DEFAULT_COLOR(2));
+               SR(TRANS_COLOR(2));
+               SR(SIZE_LCD(2));
+               SR(TIMING_H(2));
+               SR(TIMING_V(2));
+               SR(POL_FREQ(2));
+               SR(DIVISOR(2));
+               SR(CONFIG(2));
+       }
        SR(GFX_BA0);
        SR(GFX_BA1);
        SR(GFX_POSITION);
@@ -249,6 +260,15 @@ void dispc_save_context(void)
        SR(CPR_COEF_G(0));
        SR(CPR_COEF_B(0));
 
+       if (cpu_is_omap44xx()) {
+               SR(CPR_COEF_B(2));
+               SR(CPR_COEF_G(2));
+               SR(CPR_COEF_R(2));
+
+               SR(DATA_CYCLE1(2));
+               SR(DATA_CYCLE2(2));
+               SR(DATA_CYCLE3(2));
+       }
        SR(GFX_PRELOAD);
 
        /* VID1 */
@@ -369,6 +389,22 @@ void dispc_restore_context(void)
        RR(SIZE_DIG);
        RR(SIZE_LCD(0));
 
+       if (cpu_is_omap44xx()) {
+               RR(DEFAULT_COLOR(2));
+               RR(TRANS_COLOR(2));
+               RR(CPR_COEF_B(2));
+               RR(CPR_COEF_G(2));
+               RR(CPR_COEF_R(2));
+               RR(DATA_CYCLE1(2));
+               RR(DATA_CYCLE2(2));
+               RR(DATA_CYCLE3(2));
+               RR(SIZE_LCD(2));
+               RR(TIMING_H(2));
+               RR(TIMING_V(2));
+               RR(POL_FREQ(2));
+               RR(DIVISOR(2));
+               RR(CONFIG(2));
+       }
        RR(GFX_BA0);
        RR(GFX_BA1);
        RR(GFX_POSITION);
@@ -490,7 +526,8 @@ void dispc_restore_context(void)
 
        /* enable last, because LCD & DIGIT enable are here */
        RR(CONTROL(0));
-
+       if (cpu_is_omap44xx())
+               RR(CONTROL(2));
        /* clear spurious SYNC_LOST_DIGIT interrupts */
        dispc_write_reg(DISPC_IRQSTATUS, DISPC_IRQ_SYNC_LOST_DIGIT);
 
-- 
1.6.3.3

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to