Skip to contentSkip to conversation

fixed distortedness situation for Samsung SoC Framebuffer Driver

PATCH New InKi Dae 1 participant 1 message Aug 5, 2009

Subsystems (3)
lore
Share & tools
lore

InKi Dae

author
#0 lore raw

PATCH 1/1 fixed distortedness situation for Samsung SoC Framebuffer Driver

This patch solves the problem that image is distorted in the mode more then 24bpp.

In 16bit mode, WINCON0[16] should be Swap Enable(HAWSWP_F) and in the mode more then 24bpp,
WINCON0[15] should be Swap Enable(WSWP_F).

For this, I added a MACRO in regs-fb.h file for 24bpp+ and modified s3c-fb.c file also.
It was tested on s5pc100 and s5pc110 and worked fine.

Thank you.

arch/arm/plat-s3c/include/plat/regs-fb.h +1 -0
index e9ee599..ae5eb5d 100644
@@ -173,6 +173,7 @@
 #define WINCONx_BITSWP				(1 << 18)
 #define WINCONx_BYTSWP				(1 << 17)
 #define WINCONx_HAWSWP				(1 << 16)
+#define WINCONx_WSWP				(1 << 15)
 #define WINCONx_BURSTLEN_MASK			(0x3 << 9)
 #define WINCONx_BURSTLEN_SHIFT			(9)
 #define WINCONx_BURSTLEN_16WORD			(0x0 << 9)
drivers/video/s3c-fb.c +1 -0
index 5a72083..24d56ed 100644
@@ -422,6 +422,7 @@ static int s3c_fb_set_par(struct fb_info *info)
 		else
 			data |= WINCON0_BPPMODE_24BPP_888;
 
+		data |= WINCONx_WSWP;
 		data |= WINCONx_BURSTLEN_16WORD;
 		break;
 	}