Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Patches
  • Category Drivers
  • Assigned To
    desowin
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by desowin - 2011-12-18
Last edited by desowin - 2011-12-19

FS#12462 - TMS320DM320 runtime improvement by disabling ImageBuffer clock

TMS320DM320 devices running Rockbox operates with constantly running ImageBuffer clock. This leads to increased power consumption. This clock seems to be required to send interrupt from DSP to ARM.

On m:robe 500, ImageBuffer is used for LCD updates. On Sansa Connect, using it caused over 6 times increase in whole screen update and over 7 times more fps when updating 1/4 screen (both when unboosted; tested using test_fps).

Attaches are two patches.
imagebuffer_clock_on_demand.patch - this patch makes DSP turn on and off clock just for the mere moment of interrupting ARM. On Sansa Connect it resulted in 40 minutes runtime enhancement.
connect-lcd-dma.patch - this patch makes use of ImageBuffer for faster screen updates (mentioned above).

Unfortunately, applying those two patches in single build is prone to race conditions (actual check in DSP code is well, wrong, as DSP and ARM run concurently).
To solve the problem I can think of two possible solutions:
1) Handle ImageBuffer clock enable/disable entrinely to DSP
2) Search for some other way for DSP to interrupt ARM without the need for running ImageBuffer clock

As I don’t have m:robe 500, I cannot test the impact on runtime of imagebuffer patch on this device. To run proper test one would need to disable the LCD_USE_DMA in lcd-mr500.c (screen update turns on IMGBUF clock), as well as change the IMGBUF clock initialization in pcm-mr500.c.

Closed by  desowin
2011-12-19 06:41
Reason for closing:  Accepted
Additional comments about closing:  

Sansa Connect LCD patch commited as r31357. ImageBuffer clock on demand commited as r31358.

Actually, in the datasheet section about Coprocessor subsystem Clock Control there is note that the enable bits in IO_CLK_MOD1 and CP_CLKC are logically ORed, hence it is not prone to race conditions :-)

Attached are modified versions of both patches.
imagebuffer_clock_on_demand_v2.patch can be tested as is on m:robe 500.

Sychronised connect lcd patch to current SVN.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing