[openfirmware] [commit] r1799 - dev/via/unichrome

repository service svn at openfirmware.info
Fri Apr 30 08:27:42 CEST 2010


Author: wmb
Date: Fri Apr 30 08:27:41 2010
New Revision: 1799
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/1799

Log:
OLPC trac 10138 - fixed unnecessary screen-clearing when reopening the display device for the purpose of doing a selftest of either the screen or the camera.  The fix works by avoiding the installation of the terminal emulator package on nested opens.

Modified:
   dev/via/unichrome/accel2d.fth
   dev/via/unichrome/unichrome.fth

Modified: dev/via/unichrome/accel2d.fth
==============================================================================
--- dev/via/unichrome/accel2d.fth	Fri Apr 30 08:25:30 2010	(r1798)
+++ dev/via/unichrome/accel2d.fth	Fri Apr 30 08:27:41 2010	(r1799)
@@ -45,8 +45,9 @@
 
 : copy16>32  ( src-base src-pitch src-x,y dst-x,y w,h -- )
    wh!  dst!  src!                                 ( src-base src-pitch )
-   h# 30 mmio@ >r  8 mmio@ >r  h# 1c mmio@ >r      ( src-base src-pitch )
-   3 rshift  bytes/line 3 rshift  wljoin  8 mmio!  ( src-base )
+   h# 30 mmio@ >r  8 mmio@ >r                      ( src-base src-pitch r: reg30 reg8 )
+   3 rshift  r@ lwsplit nip  wljoin  8 mmio!       ( src-base r: reg30 reg8 )
+   h# 1c mmio@ >r                                  ( src-base )
    fb-va -  3 rshift  h# 1c mmio!                  ( )
    h# 8000.0041 h# 30 mmio!                        ( )  \ Expand RGB565 to ARGB8888
    h# cc.00.00.01 0 mmio!                          ( )  \ Perform BLT Output = source

Modified: dev/via/unichrome/unichrome.fth
==============================================================================
--- dev/via/unichrome/unichrome.fth	Fri Apr 30 08:25:30 2010	(r1798)
+++ dev/via/unichrome/unichrome.fth	Fri Apr 30 08:27:41 2010	(r1799)
@@ -1237,9 +1237,6 @@
 0 value open-count
 
 : display-remove  ( -- )
-   open-count 1 =  if
-   then
-   open-count 1- 0 max to open-count
 ;
 
 : display-install  ( -- )
@@ -1252,7 +1249,6 @@
    default-font set-font
    set-terminal
    fb-va to frame-buffer-adr
-   open-count 1+ to open-count
 ;
 
 : display-selftest  ( -- failed? )  false  ;
@@ -1261,6 +1257,18 @@
 ' display-remove   is-remove
 ' display-selftest is-selftest
 
+\ The previous value of "open" is created automatically by the execution
+\ of "is-install".   We need this override to prevent auto-clearing the
+\ screen when the display node is re-opened during the camera selftest.
+: open  ( -- okay? )
+   open-count 0=  if  open  else  true  then
+   dup  if  open-count 1+ to open-count  then
+;
+: close  ( -- )
+   open-count 1 =  if  close  then
+   open-count 1- 0 max to open-count
+;
+
 " display"                      device-type
 " ISO8859-1" encode-string    " character-set" property
 0 0  encode-bytes  " iso6429-1983-colors"  property



More information about the openfirmware mailing list