Offseted display (shifted to the right) under WinCE.

Post Reply
armboarder
Posts: 15
Joined: Thu Aug 27, 2009 12:45 pm

Offseted display (shifted to the right) under WinCE.

Post by armboarder » Fri Oct 09, 2009 2:18 am

Hello,
I've bought MiniArm2440 kit from esky.
There was Qtopia and Linux installed on.
I've flashed WinCE image ( * N35.bin ) on this board. WinCE starts fine, but the only problem is that I've got the display shifted to the right for about half a centimeter.
How could I fix that ? Is the display tip incorrect, should I flash it with WinCE T35 image? How can you know if your display is NEC or else?
Maybe there is a registry key for adjusting the start delay of horizontal display signal. (I've did like that for another module)

nicolas
Posts: 162
Joined: Sun Jun 07, 2009 4:32 pm

Re: Offseted display (shifted to the right) under WinCE.

Post by nicolas » Fri Oct 09, 2009 8:11 am

Id disconnect the LCD and reconnect it (the ribbon wire). In case something is off.
If that still fails, try the T35 image.

mgalemin
Posts: 13
Joined: Tue Oct 06, 2009 11:49 pm

Re: Offseted display (shifted to the right) under WinCE.

Post by mgalemin » Fri Oct 09, 2009 11:57 pm

I have discovered this issue too. On linux kernel 2.6.31 from czech repository display image has blank area in the left side of the display. Moreover, I compiled tslib and after a scope of tests I discovered, that after touchscreen calibration and testing using ts_test utility I received next results:

# ts_test

For upper left corner of the screen:
191.215095: -12 0 1
191.235065: -12 0 1
191.245091: -12 0 1
191.255091: -12 0 1

For bottom left corner of the screen:
213.025056: -13 320 1
213.055057: -13 320 1
213.075057: -13 320 1
213.105065: -13 320 1

For upper right corner of the screen:
48.995089: 228 0 1
49.005106: 228 0 1
49.025067: 228 0 1
49.085230: 228 0 1

For bottom right corner of the screen:
55.140097: 227 320 1
55.170088: 227 320 1
55.180091: 227 320 1
55.190094: 227 320 1

So picture and touchscreen offset is some about 13 pixels. And after some digging in the kernel I realized that issue is in the /arch/arm/mach-s3c2440/mach-mini2440.c file (for kernel 2.6.31 from czech repository with added support of mini2440). In my case I had to change in _LCD_DECLARE macro parameter margin_right in mini2440_lcd_cfg[0] structure from 38 to 25 (13 pixels). Here is an example of patch (in your case offset can be different and for 7" LCD you should change mini2440_lcd_cfg[1]):

=========================================================

Code: Select all

--- a/arch/arm/mach-s3c2440/mach-mini2440.c	2009-10-09 14:04:28.000000000 +0300
+++ a/arch/arm/mach-s3c2440/mach-mini2440.c	2009-10-09 14:04:45.000000000 +0300
@@ -228,7 +228,7 @@
 	[0] = {	/* mini2440 + 3.5" TFT + touchscreen */
 		_LCD_DECLARE(
 			7,			/* The 3.5 is quite fast */
-			240, 21, 38, 6, 	/* x timing */
+			240, 21, 25, 6, 	/* x timing */
 			320, 4, 4, 2,		/* y timing */
 			60),			/* refresh rate */
 		.lcdcon5	= (S3C2410_LCDCON5_FRM565 |
=========================================================

I also attached patch as file.

P.S. I can't say anything about resolving this issue in Win CE, but I hope that manufacturer of new Mini2440-128M boards will solve this issue as soon as possible.

P.P.S. It is interesting is this issue is common for all Mini2440-128M boards or only for ones with some particular HW/calibration parameters?

P.P.P.S. Sorry, but I can't attach a file on this forum.

buserror
Posts: 92
Joined: Thu Jan 22, 2009 12:28 am

Re: Offseted display (shifted to the right) under WinCE.

Post by buserror » Sat Oct 10, 2009 8:42 am

I wrote the original timings in the kernel; however friendly-arm has a new 3.5" screen shipping (the one you have) and the timing are different. I haven't seen that screen yet so I can't add it as an option for the moment.

nicolas
Posts: 162
Joined: Sun Jun 07, 2009 4:32 pm

Re: Offseted display (shifted to the right) under WinCE.

Post by nicolas » Sat Oct 10, 2009 12:17 pm

Would that be the T35 your refering too ?

armboarder
Posts: 15
Joined: Thu Aug 27, 2009 12:45 pm

Re: Offseted display (shifted to the right) under WinCE.

Post by armboarder » Mon Oct 12, 2009 10:19 am

I've just reflashed my Mini2440 with T35 bootloader and WinCE image: It works OK, no more black pixels at the right and no need to recalibrate the touch screen.
However I'm still wondering if there are registry keys to modify the display timing. I'm too lazy to make a diff between T35 BSP and N35 BSP.
Nice to meet (or interact with) you, buserror, I've read and learned a lot from your articles.

nicolas
Posts: 162
Joined: Sun Jun 07, 2009 4:32 pm

Re: Offseted display (shifted to the right) under WinCE.

Post by nicolas » Mon Oct 12, 2009 12:57 pm

armboarder you will find changes in the option.h for Nboot.
One of the main differences you will see is the same change that mgalemin discovered:

Code: Select all

#if defined(LCD_N35)
#define LCD_RIGHT_MARGIN 36

Code: Select all

#elif defined(LCD_T35)
#define LCD_RIGHT_MARGIN 25
Some of the other defines have slightly changed too.

These same define changes have been applied to the ce kernel image.
Those changes you will find in the s3c2440a_lcd.h incude

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests