Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Patches
  • Category Drivers
  • Assigned To
    Buschel
  • Operating System iPod Nano
  • Severity Low
  • Priority Very Low
  • Reported Version Release 3.7.1
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by Buschel - 2010-12-29
Last edited by Buschel - 2011-01-09

FS#11843 - LCD speed up for iPod nano 1G, iPod color

This task provides changes to the iPod color/nano1G LCD driver that affect both RGB and YUV screen updates. For the YUV optimization the asm from the HDD6330 is used, for RGB a special case handling for (width==LCD_WIDTH) is introduced.

v01 = only affects YUV
v02 = YUV and RGB changes

Closed by  Buschel
2011-01-09 19:03
Reason for closing:  Accepted
Additional comments about closing:  

All relevant changes were submitted. If new changes come up I will open a new task.

Soap commented on 2010-12-29 14:45

Using v02 of the patch:

@ 30Mhz:
LCD = 80.5 / 318.0 (Identical to stock SVN)
YUV = 30.1 / 120.5 (vs 23.0 / 92.0 with stock SVN)

@ 80 Mhz:
LCD = 214.5 / 850.0 (Identical to stock SVN)
YUV = 81.0 / 322.0 (vs 61.5 / 246.0 with stock SVN)

Soap commented on 2010-12-29 14:57

Using v02 of the patch AND:
<Buschel> soap: could you try the following and retest RGB full screen? → r+=4 in line 338 and copying line 342 to call this twice?
<soap> of lcd-color_nano.c?
<Buschel> yes

results in an apparent failure to boot, the boot logo is garbled and I can see no screen response to key presses.

This v03 patch does not use explicit waits before wrtitng to the LCD IF. Worth a test as the RGB-to-YUV conversion needs a reasonable amount of time for each pixel pair.
Only needs to bested with the critical 80 MHz clock.

Soap commented on 2010-12-29 16:52

building v03 on a reverted -R . tree:
/home/soap/rockbox/firmware/target/arm/ipod/lcd-as-color-nano.S:201: Error: symbol `lcd_yuv_write_inner_loop' is already defined
make: *** [/home/soap/rockbox/buildnano/firmware/target/arm/ipod/lcd-as-color-nano.o] Error 1

Soap commented on 2010-12-29 22:04

Yes, buschel, still the same error after veryifying SVN status, redownloading the patch, and ensuring proper insertion. This on Normal build, make && make zip

svn up, make bin =
/home/soap/rockbox/firmware/target/arm/ipod/lcd-as-color-nano.S: Assembler messages:
/home/soap/rockbox/firmware/target/arm/ipod/lcd-as-color-nano.S:201: Error: symbol `lcd_yuv_write_inner_loop' is already defined
/home/soap/rockbox/firmware/target/arm/ipod/lcd-as-color-nano.S:353: Error: symbol `lcd_yuv_write_inner_loop' is already defined
/home/soap/rockbox/firmware/target/arm/ipod/lcd-as-color-nano.S:505: Error: symbol `lcd_yuv_write_inner_loop' is already defined
make: *** [/home/soap/rockbox/buildnano/firmware/target/arm/ipod/lcd-as-color-nano.o] Error 1

v02 on iPod color (tested by Hayden Pearce):
LCD RGB 1/1: 51.7, 1/4: 202.5 LCD YUV 1/1: 45.5, 1/4: 180.0 @ 80MHz
LCD RGB 1/1: 19.4, 1/4: 76.0 LCD YUV 1/1: 17.0, 1/4: 67.1 @ 30MHz

v03 on iPod color (tested by Hayden Pearce):
LCD RGB 1/1: 51.7, 1/4: 202.5 ; LCD YUV 1/1: 51.0, 1/4: 202.0 @ 80MHZ
LCD RGB 1/1: 19.4, 1/4: 76.0 ; LCD YUV 1/1: 19.1, 1/4: 75.5 @ 30MHZ

YUV is nearly identical to RGB. This means the bottleneck should be the LCD IF itself.

Soap commented on 2010-12-29 22:52

Ok, me stupid, fixed now. ;)

@ 80 Mhz:
LCD = 214.5 / 850.0 (Identical to stock SVN)
YUV = 90.5 / 360.0 (vs 81.0 / 322.0 with v01 vs 61.5 / 246.0 with stock SVN)

Elephant's Dream /appears/ to play properly. What sort of artifacts should one expect? Subtle ones or gross ones? No gross ones to report.

Soap commented on 2010-12-29 22:53

The above comment is with v03 of the patch.

Submitted v02. The attached v04 patch avoids waiting for FIFO (as v03 did), but is synched against current svn.

v09 patch changes the YUV asm code which is derived from iPod Video/nano2G now. The new asm code converts and writes two lines at once and avoids recalculation of chroma values. Speed up on iPod nano 1G was measured to be about +4% against latest svn (83.5 fps boosted full screen).

v10 patch disables FIFO_WAIT. Speedup on nano 1G is about +17% against svn (94.0 fps boosted full screen).

v11 does contain some more changes. Introduced a swap-macro and an inlined lcd_write_line()-function for better readability. This is patch is submit-ready and needs verification on nano1G and color models.

After some debugging with soap this v13 fixes a bug with 1/4 screen updates.

New v15 simplifies the YUV loop a bit and unifies the RGB and YUV loops.

New v16 saves some binsize in the LCD driver.

1) Should fix issues with RGB screen updates on iPod color. On the iPod color two loops are needed to fully update the display. The pointer to the framebuffer must be updated after the first loop. This was not done in older patches. For the iPod nano this is not relevant.
2) Ensure that "h" (derived from "height") is always even for the internal loops. This ensures that the first loop also uses even "h" in the YUV blitting which writes two lines at once. This is also relevant for the iPod color only.

v17 measurements on iPod color (by Hayden Pearce):
LCD 1/1: 19.4, 1/4: 77.1 LCD YUV 1/1: 17.4, 1/4: 70.0 @30MHz ;
LCD 1/1: 51.7, 1/4: 206.0 LCD YUV 1/1: 46.7, 1/4: 187.0 @80MHz

v17 submitted with r28944.

Minor code simplification. Checking for the need of swapping is not needed for nano 1G (always false). Checking on iPod color is always false for y0/y1 and always true for x0/x1. Therefore remove the checking and directly swap x0/x1 for the iPod Color.

Submitted with r28956, no speed change.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing