Changeset 3514


Ignore:
Timestamp:
Jan 8, 2013, 2:44:19 AM (3 years ago)
Author:
quozl
Message:

OLPC XO-4 - rework DCON freeze and unfreeze screen synchronisation, make wait-output global as requested by John.

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • cpu/arm/olpc/suspend.fth

    r3358 r3514  
    133133: screen-sleep
    134134   sleep-mask 1 and  if            \ DCON power down
    135       dcon-freeze
     135      dcon-screen-freeze
    136136   else
    137137      " dcon-suspend" $call-dcon
     138      " sleep" $call-screen
    138139   then
    139    " sleep" $call-screen
    140140   " set-ack" $call-ec
    141141
     
    157157   sleep-mask 2 and  0=  if  keyboard-power-on   then
    158158   " clr-ack" $call-ec
    159    " wake" $call-screen
    160159   sleep-mask 1 and  if            \ DCON power up
    161       dcon-unfreeze
     160      dcon-screen-unfreeze
    162161   else
     162      " wake" $call-screen
    163163      " dcon-resume" $call-dcon
    164164   then
  • cpu/x86/pc/olpc/disptest.fth

    r3390 r3514  
    174174: wait  ( -- )
    175175   hold-time
    176    dcon-freeze
     176   dcon-screen-freeze
    177177   hold-time
    178    dcon-unfreeze
     178   dcon-screen-unfreeze
    179179   hold-time2
    180180;
  • cpu/x86/pc/olpc/gui.fth

    r3460 r3514  
    356356;
    357357
    358 : frozen?  ( -- flag )  " vga?" $call-dcon 0=  ;
    359 : dcon-freeze    ( -- )  " dcon-freeze" $call-dcon d# 30 ms  ;
    360 : dcon-unfreeze  ( -- )  " dcon-unfreeze" $call-dcon d# 30 ms  ;
     358: frozen?   ( -- flag )  " vga?"          $call-dcon  0=  ;
     359: dcon-freeze    ( -- )  " dcon-freeze"   $call-dcon  ;
     360: dcon-unfreeze  ( -- )  " dcon-unfreeze" $call-dcon  ;
     361: wait-output    ( -- )  " wait-output"   $call-dcon  ;
     362: dcon-screen-freeze    ( -- )  " screen-freeze"   $call-dcon  ;
     363: dcon-screen-unfreeze  ( -- )  " screen-unfreeze" $call-dcon  ;
    361364
    362365\ === Stuff moved from security.fth ===
  • dev/olpc/dcon/mmp2dcon.fth

    r3513 r3514  
    137137   dup to vga?                      ( source )
    138138   if
    139       wait-output               \ Wait for the DCON to reach the scan line
    140       " wake" $call-screen      \ Enable video signal from SoC
    141       d# 25 ms
    142139      dcon-load                 \ Put the DCON in VGA-refreshed mode
    143140      d# 25 ms                  \ Ensure that that DCON sees the DCONLOAD high
     
    152149            dcon-load  d# 25 ms            ( )
    153150         repeat                            ( )
    154          " sleep" $call-screen
     151         d# 25 ms
    155152      then
    156153   then
     
    158155: dcon-freeze  ( -- )  0 set-source  ;
    159156: dcon-unfreeze  ( -- )  1 set-source  ;
     157
     158: screen-freeze  ( -- )
     159   dcon-freeze
     160   " sleep" $call-screen
     161;
     162
     163: screen-unfreeze ( -- )
     164   wait-output                  \ Wait for the DCON to reach the scan line
     165   " wake" $call-screen         \ Enable video signal from SoC
     166   d# 42 ms                     \ Synchronisation delay determined empirically
     167   dcon-unfreeze
     168;
    160169
    161170\ gx_configure_tft(info);
     
    286295;
    287296
    288 [ifdef] notdef
     297\ [ifdef] notdef
    289298: test-dcon-freeze-glitch
    290    screen-ih remove-output
     299   invisible
    291300   " gvsr" $call-screen
    292    begin  dcon-freeze  dcon-unfreeze  key?  until  key drop
    293    screen-ih add-output
     301   begin
     302      " screen-freeze" $call-dcon
     303      d# 25 ms
     304      " screen-unfreeze" $call-dcon
     305      key?
     306   until  key drop
     307   visible
    294308   page
    295309;
    296 [then]
     310\ [then]
    297311
    298312\ LICENSE_BEGIN
Note: See TracChangeset for help on using the changeset viewer.