Merge "init: early_boot: Use virtual_size to set lcd_density"
This commit is contained in:
commit
b7ae5489be
|
@ -45,6 +45,11 @@ else
|
|||
soc_hwver=`cat /sys/devices/system/soc/soc0/platform_version` 2> /dev/null
|
||||
fi
|
||||
|
||||
if [ -f /sys/class/graphics/fb0/virtual_size ]; then
|
||||
res=`cat /sys/class/graphics/fb0/virtual_size` 2> /dev/null
|
||||
fb_width=${res%,*}
|
||||
fi
|
||||
|
||||
log -t BOOT -p i "MSM target '$1', SoC '$soc_hwplatform', HwID '$soc_hwid', SoC ver '$soc_hwver'"
|
||||
|
||||
target=`getprop ro.board.platform`
|
||||
|
@ -178,6 +183,20 @@ case "$target" in
|
|||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
if [ -z $fb_width ]; then
|
||||
setprop ro.sf.lcd_density 320
|
||||
else
|
||||
if [ $fb_width -ge 1080 ]; then
|
||||
setprop ro.sf.lcd_density 480
|
||||
elif [ $fb_width -ge 720 ]; then
|
||||
setprop ro.sf.lcd_density 320 #for 720X1280 resolution
|
||||
elif [ $fb_width -ge 480 ]; then
|
||||
setprop ro.sf.lcd_density 240 #for 480X854 QRD resolution
|
||||
else
|
||||
setprop ro.sf.lcd_density 160
|
||||
fi
|
||||
fi
|
||||
esac
|
||||
|
||||
# Setup display nodes & permissions
|
||||
|
|
Loading…
Reference in New Issue