From: Austin Hu <[email protected]>

Dmesg shows time out when checking MIPI adapter command registers after loading 
graphics module on nCDK.
The issue is related to that when writing KBBC profile, the DSI control 
register is set to receive 17 bytes MCS
command, but the DSI data register just gets 16 bytes.

So fix it by setting the DSI control register when writing hysteresis, display 
profile kbbc profile and gamma
setting values with the actual command length.

Signed-off-by: Austin Hu <[email protected]>
Signed-off-by: Hitesh K. Patel <[email protected]>
---
 drivers/staging/mrst/drv/mdfld_dsi_output.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/mrst/drv/mdfld_dsi_output.c 
b/drivers/staging/mrst/drv/mdfld_dsi_output.c
index ecc8046..67f5bb2 100644
--- a/drivers/staging/mrst/drv/mdfld_dsi_output.c
+++ b/drivers/staging/mrst/drv/mdfld_dsi_output.c
@@ -153,7 +153,7 @@ static void mdfld_dsi_write_hysteresis (struct 
mdfld_dsi_config * dsi_config, in
                p_gen_data_val++;
        }
 
-       gen_ctrl_val = 65 << WORD_COUNTS_POS;
+       gen_ctrl_val = ARRAY_SIZE(mdfld_dbi_mcs_hysteresis) << WORD_COUNTS_POS;
        gen_ctrl_val |= dcsChannelNumber << DCS_CHANNEL_NUMBER_POS;
        gen_ctrl_val |= MCS_LONG_WRITE;
        REG_WRITE(hs_gen_ctrl_reg, gen_ctrl_val);
@@ -187,7 +187,7 @@ static void mdfld_dsi_write_display_profile (struct 
mdfld_dsi_config * dsi_confi
                p_gen_data_val++;
        }
 
-       gen_ctrl_val = 17 << WORD_COUNTS_POS;
+       gen_ctrl_val = ARRAY_SIZE(mdfld_dbi_mcs_display_profile) << 
WORD_COUNTS_POS;
        gen_ctrl_val |= dcsChannelNumber << DCS_CHANNEL_NUMBER_POS;
        gen_ctrl_val |= MCS_LONG_WRITE;
        REG_WRITE(hs_gen_ctrl_reg, gen_ctrl_val);
@@ -221,7 +221,7 @@ static void mdfld_dsi_write_kbbc_profile (struct 
mdfld_dsi_config * dsi_config,
                p_gen_data_val++;
        }
 
-       gen_ctrl_val = 17 << WORD_COUNTS_POS;
+       gen_ctrl_val = ARRAY_SIZE(mdfld_dbi_mcs_kbbc_profile) << 
WORD_COUNTS_POS;
        gen_ctrl_val |= dcsChannelNumber << DCS_CHANNEL_NUMBER_POS;
        gen_ctrl_val |= MCS_LONG_WRITE;
        REG_WRITE(hs_gen_ctrl_reg, gen_ctrl_val);
@@ -255,7 +255,7 @@ static void mdfld_dsi_write_gamma_setting (struct 
mdfld_dsi_config * dsi_config,
                p_gen_data_val++;
        }
 
-       gen_ctrl_val = 9 << WORD_COUNTS_POS;
+       gen_ctrl_val = ARRAY_SIZE(mdfld_dbi_mcs_gamma_profile) << 
WORD_COUNTS_POS;
        gen_ctrl_val |= dcsChannelNumber << DCS_CHANNEL_NUMBER_POS;
        gen_ctrl_val |= MCS_LONG_WRITE;
        REG_WRITE(hs_gen_ctrl_reg, gen_ctrl_val);
-- 
1.7.1

_______________________________________________
MeeGo-kernel mailing list
[email protected]
http://lists.meego.com/listinfo/meego-kernel

Reply via email to