FS#7438 - Cover colored line on new Sansa E200s

Attached to Project: Rockbox
Opened by Paul Martyn (Ghost) - Sunday, 15 July 2007, 07:48 GMT
Last edited by Michael Sevakis (MikeS) - Wednesday, 05 September 2007, 08:30 GMT
Task Type Patches
Category LCD
Status Closed
Assigned To No-one
Operating System Sansa e200
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No


New Sansa E200s have an LCD bug that leaves two lines of colored pixels at the top of the screen.

This pair of patches will cover it up in Rockbox (and bootloader if you recompile it). Still need to fix it for booting to the original firmware though and note this is a dirty hack and not a genuine solution.

/* Do not use if you have an old model E200 that does not have this problem */
This task depends upon

Closed by  Michael Sevakis (MikeS)
Wednesday, 05 September 2007, 08:30 GMT
Reason for closing:  Fixed
Additional comments about closing:  Genuine fix in SVN.
Comment by Daniel Ankers (dan_a) - Tuesday, 17 July 2007, 22:04 GMT
This doesn't seem to cause any problem on old model E200s - can anyone else confirm?
Comment by Michael Sevakis (MikeS) - Tuesday, 17 July 2007, 23:47 GMT
The fact that you found this solution should lead to a genuine one. Try changing the __attribute__((aligned(16))) to __attribute__((aligned(176*2))) for lcd_driver_framebuffer. Study what that does and find the smallest alignment that works. I really have suspected alignment but cannot test so let us just take the next logical step.

Comment by Michael Sevakis (MikeS) - Thursday, 26 July 2007, 09:05 GMT
Any chance anyone will ever check it for framebuffer alignment issues? c'mon. so easy to do. :)
Comment by Jack Suter (chrisjs169) - Saturday, 28 July 2007, 17:29 GMT
I can confirm that this does not cause problems for my old Sansa, and several builds on Anything But iPod have this patch added, with no reports of problems.
Comment by Barry Wardell (barrywardell) - Thursday, 02 August 2007, 15:01 GMT
I have something like this bug. I get the two lines in rockbox, but only until it shows the logo, then the display returns to normal. I have tried playing around with various alignments all the way up to 0x10000 to no avail. I also experienced this problem with the bootloader in the past but have not been able to reproduce it recently.
Comment by Arno Wald (arwa) - Sunday, 12 August 2007, 12:52 GMT
I do own a newer Sansa e280 (no FM) that does show the screen glitch. Running the patched Rockbox version from cpchan the scrambled line has disappeared. So I would appreciate to see this patch in the original Rockbox trunk.
Comment by Michael Sevakis (MikeS) - Saturday, 18 August 2007, 09:12 GMT
JdGordon tried some alignment stuff for me. I come to find out alignments must be an integer power of two. Didn't seem to have any effect. :( I can do it by holding any button other than "|<<" with the bootloader I installed right when I got the player. You never poked at the register settings? Perhaps messing around with the lcd driver would work. Maybe sync pulse polarity. Some things could be set differently depending on model if that can be detected.

It's not really a genuine fix so I personally don't feel this patch is appropriate for the trunk esp. since it puts a burdon on e200s that don't have the problem. I just find it weird that the first two screen line are taken to be at the highest address by the controller and then it wraps.
Comment by Jack Suter (chrisjs169) - Saturday, 18 August 2007, 14:33 GMT
"since it puts a burdon on e200s that don't have the problem."

The three builds on have the patch added (mine, cpchan's, and digerati1338's) and I haven't noticed any problems with having it on my Sansa. I'm not sure why Ghost had warned not to put it on the e200s without the problem, but I haven't heard of any complaints about it on anythingbutipod. However, since it isn't a genuine fix, I don't think the patch should be added to SVN.
Comment by Jonathan Backer (jrbil) - Friday, 24 August 2007, 03:28 GMT
Here's a cleaner patch. Unfortunately, I haven't been able to build sansapatcher on my machine to install the new bootloader that results. YMMV. If I can get the new bootloader, the patch should be smaller.
   patch (2.6 KiB)
Comment by Jonathan Backer (jrbil) - Saturday, 25 August 2007, 05:53 GMT
Here's the final patch. In order to work, you must build a bootloader as well (install with sansapatcher -a new_bootloader). It has the added advantage of getting rid of the garbage when you load the original firmware. It should work with original e200s. It would be great to have some testing. From my end, it looks ready for SVN. Let me know.
   patch (1.6 KiB)
Comment by Jonathan Backer (jrbil) - Saturday, 25 August 2007, 06:22 GMT
Added new task to include the patch " FS#7654  - LCD garbled top two lines".

Discussion of it can go there.