From 5c105d9f3fd086aff195d3849dcf847d6b0bd927 Mon Sep 17 00:00:00 2001 From: blogic Date: Fri, 5 Oct 2012 10:12:53 +0000 Subject: branch Attitude Adjustment git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@33625 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- ...mebuffer-driver-data-swap-bug-for-MCF5441.patch | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 target/linux/coldfire/patches/101-kernel-2.6.38-Fix-LCD-framebuffer-driver-data-swap-bug-for-MCF5441.patch (limited to 'target/linux/coldfire/patches/101-kernel-2.6.38-Fix-LCD-framebuffer-driver-data-swap-bug-for-MCF5441.patch') diff --git a/target/linux/coldfire/patches/101-kernel-2.6.38-Fix-LCD-framebuffer-driver-data-swap-bug-for-MCF5441.patch b/target/linux/coldfire/patches/101-kernel-2.6.38-Fix-LCD-framebuffer-driver-data-swap-bug-for-MCF5441.patch new file mode 100644 index 000000000..b948d1f83 --- /dev/null +++ b/target/linux/coldfire/patches/101-kernel-2.6.38-Fix-LCD-framebuffer-driver-data-swap-bug-for-MCF5441.patch @@ -0,0 +1,49 @@ +From 633531cdbaa3ed70a364db78fd7f8ae11da3e394 Mon Sep 17 00:00:00 2001 +From: Wang Huan +Date: Wed, 14 Sep 2011 17:40:41 +0800 +Subject: [PATCH] Fix LCD framebuffer driver data swap bug for MCF54418 + +This patch fixed LCD framebuffer driver data swap bug +for MCF54418. + +Signed-off-by: Alison Wang +--- + drivers/video/fsl-ssd1289-fb.c | 13 ++++++++++--- + 1 files changed, 10 insertions(+), 3 deletions(-) + +--- a/drivers/video/fsl-ssd1289-fb.c ++++ b/drivers/video/fsl-ssd1289-fb.c +@@ -54,8 +54,10 @@ static int ssd1289_spi_writeblock(struct + for (i = 0; i < SPI_LCD_BLOCK_SIZE; i++) { + if (i % 2 == 0) + spi_block_buffer[i] = 0x01; +- else if (flag == 1) +- spi_block_buffer[i] = *(daddr + (i >> 1)); ++ else if ((flag == 1) && (i % 4 == 1)) ++ spi_block_buffer[i] = *(daddr + (i >> 1) + 1); ++ else if ((flag == 1) && (i % 4 == 3)) ++ spi_block_buffer[i] = *(daddr + (i >> 1) - 1); + else if (flag == 0) + spi_block_buffer[i] = 0; + } +@@ -331,6 +333,9 @@ static int ssd1289fbd(void *arg) + int i; + unsigned short *buf_p; + struct fsl_ssd1289_fb_info *fbinfo = info->par; ++#if defined(CONFIG_SSD1289_FLEXBUS_MODE) ++ unsigned short tmp; ++#endif + #if defined(CONFIG_SSD1289_SPI_MODE) + unsigned char *bufspi_p; + int count; +@@ -344,7 +349,9 @@ static int ssd1289fbd(void *arg) + + #if defined(CONFIG_SSD1289_FLEXBUS_MODE) + for (i = 0; i < info->screen_size; i += 2) { +- ssd1289_write(info, *buf_p, 1); ++ tmp = ((((*buf_p) & 0x00ff) << 8) | ++ (((*buf_p) & 0xff00) >> 8)); ++ ssd1289_write(info, tmp, 1); + buf_p++; + } + #elif defined(CONFIG_SSD1289_SPI_MODE) -- cgit v1.2.3