Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#11604 - IPod Nano2G lcd_sleep implementation

Attached to Project: Rockbox
Opened by Franz-Josef Haider (liar) - Sunday, 05 September 2010, 16:09 GMT+2
Last edited by Michael Sparmann (TheSeven) - Sunday, 14 November 2010, 16:36 GMT+2
Task Type Patches
Category LCD
Status Closed
Assigned To No-one
Player Type iPod Nano 2G
Severity Low
Priority Normal
Reported Version Release 3.6
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Private No

Details

this patch implements lcd_sleep for both, type 2 (0) and 7 (1) lcds.

i have no chance to test it on a type 7 lcd but i know it already worked several month ago (please try).
to see what lcd type you have go to:
System->Debug->View HW info

what you should see when you apply this patch is:
when the backlight turns off, the lcd should shut down within 3 seconds.

if you see any glitches when the lcd gets powered on/off please report it.

if the lcd does not power on again, dont worry,
just shut the ipod down(press play for ~5 seconds),
turn it on again(the lcd will work again),
switch to diskmode
and copy a rockbox version without the patch to the ipod.
   lcd_sleep_nano2g.patch (12.7 KiB)
 firmware/export/config/ipodnano2g.h                       |    6 
 firmware/target/arm/s5l8700/ipodnano2g/lcd-nano2g.c       |  417 +++++++++++++-
 firmware/target/arm/s5l8700/ipodnano2g/backlight-nano2g.c |    6 
 3 files changed, 423 insertions(+), 6 deletions(-)

This task depends upon

Closed by  Michael Sparmann (TheSeven)
Sunday, 14 November 2010, 16:36 GMT+2
Reason for closing:  Fixed
Additional comments about closing:  Committed in r28591
Comment by Mulenmar Anonymous (mulenmar) - Tuesday, 07 September 2010, 05:56 GMT+2
For those who wonder, this also works for type 1 (7) LDS176 LCDs.
Comment by Hayden Pearce (St.) - Saturday, 11 September 2010, 13:52 GMT+2
I can confirm that this works on my Type 2 and Type 7 LCD Nano2Gs

However, there seems to be a visible issue when the display changes from the bootloader splash to the main menu/start screen in the form of a white, fullscreen "flash" now that is only present with this patch in my build.

<wild guess> Presumably when your code takes over the handling of the LCD <wild guess>

It's hardly a deal-breaker...but sometimes the "flash" is a lot more noticeable than others,

Also, I'm wondering if it would be too hard (or at all possible) to add a menu option for this.
It is definitely something I am interested in, but, not something something my GF would be interested in and probably not something I would want to use all the time.
A menu/config option would be a lot more practical in this case IMO.


[St.]
Comment by Andree Buschmann (Buschel) - Sunday, 26 September 2010, 02:49 GMT+2
This patch works for me as well (LDS176 type). A suggestion: define HAVE_LCD_SLEEP_SETTING in ipodnano2g.h and there is a setting for the LCD sleep. This has been implemented a while ago.

Before this patch can go into svn I would like to the flash-issue resolved which is very visible during startup and when waking up the LCD. Can you please fix this?

Btw, savings on my nano2g were ~1 mA. A saving of 1 mA equals about 1 hour of runtime for my usecase.

Edit: Minor update to patch (use #define HAVE_LCD_SLEEP_SETTINGS, cluster LCD-defined in config.h).
   lcd_sleep_nano2g_v02.patch (13 KiB)
 firmware/export/config/ipodnano2g.h                       |   11 
 firmware/target/arm/s5l8700/ipodnano2g/lcd-nano2g.c       |  418 +++++++++++++-
 firmware/target/arm/s5l8700/ipodnano2g/backlight-nano2g.c |    6 
 3 files changed, 426 insertions(+), 9 deletions(-)

Comment by Franz-Josef Haider (liar) - Friday, 22 October 2010, 18:29 GMT+2
update:
avoid white flash during boot by not reseting the lcd chip during boot.
avoid white flash on lcd wakeup by initializing the lcd before enabling the backlight.
avoid white flash on lcd shutdown when Settings->General Settings->Display->LCD Settings->Sleep->Always is enabled by disabling the backlight before shutting the lcd down.
simplify the lcd wakeup routine.

i think that one is ready to commit now
   lcd_sleep_nano2g_v03.patch (12.6 KiB)
 firmware/export/config/ipodnano2g.h                       |   11 
 firmware/target/arm/s5l8700/ipodnano2g/lcd-nano2g.c       |  484 +++++++++++++-
 firmware/target/arm/s5l8700/ipodnano2g/backlight-nano2g.c |   11 
 3 files changed, 472 insertions(+), 34 deletions(-)

Comment by Michael Sparmann (TheSeven) - Saturday, 23 October 2010, 16:50 GMT+2
This is still lacking the init values for the third LCD type. They are rare, but they exist. Because the non-init code can handle them the same way, they are also detected as type 1. See norloader or emBIOS loader for details on how to detect and initialize them.
Comment by Franz-Josef Haider (liar) - Tuesday, 26 October 2010, 18:25 GMT+2
i've added the init values for the third lcd type and ifdefed out my changes in the bootloader build to avoid an increased bootloader binsize.
   lcd_sleep_nano2g_v04.patch (16.6 KiB)
 firmware/export/config/ipodnano2g.h                       |   11 
 firmware/target/arm/s5l8700/boot.lds                      |   23 
 firmware/target/arm/s5l8700/crt0.S                        |    8 
 firmware/target/arm/s5l8700/ipodnano2g/lcd-nano2g.c       |  476 +++++++++++++-
 firmware/target/arm/s5l8700/ipodnano2g/backlight-nano2g.c |   11 
 5 files changed, 484 insertions(+), 45 deletions(-)

Comment by Franz-Josef Haider (liar) - Tuesday, 26 October 2010, 23:28 GMT+2
whoops, the previous one contained another (LCD_SLEEP unrelated) patch
   lcd_sleep_nano2g_v04.patch (14.2 KiB)
 firmware/target/arm/s5l8700/ipodnano2g/lcd-nano2g.c       |  482 +++++++++++++-
 firmware/target/arm/s5l8700/ipodnano2g/backlight-nano2g.c |   11 
 firmware/export/config/ipodnano2g.h                       |   11 
 3 files changed, 470 insertions(+), 34 deletions(-)

Comment by Franz-Josef Haider (liar) - Saturday, 13 November 2010, 00:46 GMT+2
there was a problem with the bootloader...
   lcd_sleep_nano2g_v04c.patch (14.1 KiB)
 firmware/export/config/ipodnano2g.h                       |   13 
 firmware/target/arm/s5l8700/ipodnano2g/lcd-nano2g.c       |  478 +++++++++++++-
 firmware/target/arm/s5l8700/ipodnano2g/backlight-nano2g.c |   11 
 3 files changed, 468 insertions(+), 34 deletions(-)

Loading...