FS#7692 - LCD garbled top two lines

Attached to Project: Rockbox
Opened by Jesse Lockwood (JL) - Saturday, 01 September 2007, 23:02 GMT
Last edited by Michael Sevakis (MikeS) - Wednesday, 05 September 2007, 08:34 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 2
Private No


This fixes the problem of two top lines garbled in Rockbox and original firmware when loaded from RB bootloader.
You will need to rebuild Bootloader and main Rockbox. remove other workaround patches.
For those that care what it does.It Changes LCD driver from having one front porch raster-row to having two. The docs for the chip reads
FP3-0/BP3-0: Make settings for blank periods (the front and back porches), which are placed at the
beginning and end of the display. FP3-0 and BP3-0 bits specify the number of raster-rows for the front and back porch respectively. When making this setting, make sure:
BP + FP = <16 raster-rows
FP >= 2 raster-rows
BP >= 2 raster-rows
This task depends upon

Closed by  Michael Sevakis (MikeS)
Wednesday, 05 September 2007, 08:34 GMT
Reason for closing:  Accepted
Additional comments about closing:  Does the job.
Comment by JGF (jgf_one) - Tuesday, 04 September 2007, 09:08 GMT
This does not seem to be a patch file? how is one to install this?
Comment by Jesse Lockwood (JL) - Tuesday, 04 September 2007, 12:03 GMT
I made the patch following the directions at
If some one could tell me what I may have done wrong I will fix it.
in the mean time you can change the line in /rockbox/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c
that reads
lcd_write_reg(R_DISP_CONTROL2, 0x0102);
lcd_write_reg(R_DISP_CONTROL2, 0x0202);
That will change the front porch from one to two lines.
Having only one or zero lines for the front porch is described as Setting disabled.
in the lit for the chip.

FP3 FP2 FP1 FP0 Number of lines for the Front Porch
BP3 BP2 BP1 BP0 Number of lines for the Back Porch
0 0 0 0 Setting disabled
0 0 0 1 Setting disabled
0 0 1 0 2
Comment by Jonathan Backer (jrbil) - Wednesday, 05 September 2007, 01:10 GMT
Works for me. There was still a little garbage when the screen was cleared after the bootloader started rockbox (minor and cosmetic). Changing one line to copy 220 lines instead of 222 fixed that. I've attached the new patch file here. Looks like a real fix. Just need someone with an early model to test it.
   patch (1.1 KiB)
Comment by Jesse Lockwood (JL) - Wednesday, 05 September 2007, 04:12 GMT
I like your patch. Looks nicer when it comes up.
I have good news I tried both patches on my new 1.1Ver board and on my brothers old 1.0Ver board and both work perfect.
Both the new and old Sansa's were the 8 Gig models.
Hope they will add this to the normal build. I don't see any down side.