diff options
author | blogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-10-05 10:12:53 +0000 |
---|---|---|
committer | blogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-10-05 10:12:53 +0000 |
commit | 5c105d9f3fd086aff195d3849dcf847d6b0bd927 (patch) | |
tree | 1229a11f725bfa58aa7c57a76898553bb5f6654a /target/linux/coldfire/patches/101-kernel-2.6.38-Fix-LCD-framebuffer-driver-data-swap-bug-for-MCF5441.patch | |
download | openwrt-5c105d9f3fd086aff195d3849dcf847d6b0bd927.tar.gz openwrt-5c105d9f3fd086aff195d3849dcf847d6b0bd927.zip |
branch Attitude Adjustment
git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@33625 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/coldfire/patches/101-kernel-2.6.38-Fix-LCD-framebuffer-driver-data-swap-bug-for-MCF5441.patch')
-rw-r--r-- | target/linux/coldfire/patches/101-kernel-2.6.38-Fix-LCD-framebuffer-driver-data-swap-bug-for-MCF5441.patch | 49 |
1 files changed, 49 insertions, 0 deletions
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 <wanghuan@zch06.freescale.net> +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 <b18965@freescale.com> +--- + 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) |