From 38878020d2d9c6756286b5fbcbe49c091df68c96 Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Wed, 26 Dec 2012 02:39:39 +0100 Subject: [PATCH] fuze+: make sure lcd is ready before chaning a register The lcd driver does not wait for the refresh to be done to return from lcd_update(). This means that changing a register is unsafe if done in the middle of the redraw. This could happen when disabling the lcd for example. Make sure it doesn't happen by waiting for the lcdif to be ready. Change-Id: I43ec62a637dd61c3b2a3a6e131c1a9e8035524b1 --- firmware/target/arm/imx233/sansa-fuzeplus/lcd-fuzeplus.c | 1 + 1 file changed, 1 insertion(+) diff --git a/firmware/target/arm/imx233/sansa-fuzeplus/lcd-fuzeplus.c b/firmware/target/arm/imx233/sansa-fuzeplus/lcd-fuzeplus.c index 85ab6cd365..9997deb270 100644 --- a/firmware/target/arm/imx233/sansa-fuzeplus/lcd-fuzeplus.c +++ b/firmware/target/arm/imx233/sansa-fuzeplus/lcd-fuzeplus.c @@ -208,6 +208,7 @@ static uint32_t i80_read_register(uint32_t data_out) static void lcd_write_reg(uint32_t reg, uint32_t data) { uint32_t old_reg = reg; + imx233_lcdif_wait_ready(); /* get back to 18-bit word length */ imx233_lcdif_set_word_length(HW_LCDIF_CTRL__WORD_LENGTH_18_BIT); reg = encode_16_to_18(reg);