OSDN Git Service

init.sh: honor video cmdline for all supported GPUs
authorChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 19 Sep 2018 02:25:37 +0000 (10:25 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 19 Sep 2018 02:25:37 +0000 (10:25 +0800)
Allow to use the standard video kernel cmdline to set resolution
for all supported GPUs.

Set the default resolution of virgl to 1280x800.

init.sh

diff --git a/init.sh b/init.sh
index 0cc9f06..f617ade 100644 (file)
--- a/init.sh
+++ b/init.sh
@@ -118,10 +118,8 @@ function set_drm_mode()
                ET1602*)
                        drm_mode=1366x768
                        ;;
-               VMware*)
-                       [ -n "$video" ] && drm_mode=$video
-                       ;;
                *)
+                       [ -n "$video" ] && drm_mode=$video
                        ;;
        esac
 
@@ -148,6 +146,7 @@ function init_hal_gralloc()
                        if [ "$HWACCEL" != "0" ]; then
                                set_property ro.hardware.hwcomposer drm
                                set_property ro.hardware.gralloc gbm
+                               set_property debug.drm.mode.force ${video:-1280x800}
                        fi
                        set_prop_if_empty sleep.state none
                        ;;