OSDN Git Service

init.sh: fix the old software renderer
authorChih-Wei Huang <cwhuang@linux.org.tw>
Fri, 6 May 2016 06:15:29 +0000 (14:15 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Fri, 6 May 2016 06:15:29 +0000 (14:15 +0800)
We changed the uvesafb to 32-bit for llvmpipe software renderer.
However, it breaks the old AOSP software renderer.

Fix it by determining the bpp via the HWACCEL variable.

init.sh

diff --git a/init.sh b/init.sh
index 3e9a2c6..3e02a24 100644 (file)
--- a/init.sh
+++ b/init.sh
@@ -109,7 +109,8 @@ function init_uvesafb()
                        ;;
        esac
 
-       modprobe uvesafb mode_option=${UVESA_MODE:-800x600}-32 ${UVESA_OPTION:-mtrr=3 scroll=redraw}
+       [ "$HWACCEL" = "0" ] && bpp=16 || bpp=32
+       modprobe uvesafb mode_option=${UVESA_MODE:-800x600}-$bpp ${UVESA_OPTION:-mtrr=3 scroll=redraw}
 }
 
 function init_hal_gralloc()