diff --git a/rootdir/etc/init.qcom.early_boot.sh b/rootdir/etc/init.qcom.early_boot.sh index a8bcf09e..cc346c28 100755 --- a/rootdir/etc/init.qcom.early_boot.sh +++ b/rootdir/etc/init.qcom.early_boot.sh @@ -168,10 +168,17 @@ case "$1" in ;; esac -# Setup HDMI related nodes & permissions +# Setup display nodes & permissions # HDMI can be fb1 or fb2 # Loop through the sysfs nodes and determine # the HDMI(dtv panel) + +function set_perms() { + #Usage set_perms + chown -h $2 $1 + chmod $3 $1 +} + for fb_cnt in 0 1 2 do file=/sys/class/graphics/fb$fb_cnt @@ -181,20 +188,29 @@ dev_file=/dev/graphics/fb$fb_cnt value=`cat $file/msm_fb_type` case "$value" in "dtv panel") - chown -h system.graphics $file/hpd - chown -h system.system $file/hdcp/tp - chown -h system.graphics $file/vendor_name - chown -h system.graphics $file/product_description - chmod -h 0664 $file/hpd - chmod -h 0664 $file/hdcp/tp - chmod -h 0664 $file/vendor_name - chmod -h 0664 $file/product_description - chmod -h 0664 $file/video_mode - chmod -h 0664 $file/format_3d - # create symbolic link + set_perms $file/hpd system.graphics 0664 + set_perms $file/res_info system.graphics 0664 + set_perms $file/vendor_name system.graphics 0664 + set_perms $file/product_description system.graphics 0664 + set_perms $file/video_mode system.graphics 0664 + set_perms $file/format_3d system.graphics 0664 + set_perms $file/s3d_mode system.graphics 0664 + set_perms $file/cec/enable system.graphics 0664 + set_perms $file/cec/logical_addr system.graphics 0664 + set_perms $file/cec/rd_msg system.graphics 0664 + set_perms $file/pa system.graphics 0664 + set_perms $file/cec/wr_msg system.graphics 0600 + set_perms $file/hdcp/tp system.graphics 0664 ln -s $dev_file /dev/graphics/hdmi - # Change owner and group for media server and surface flinger - chown -h system.system $file/format_3d;; esac + if [ $fb_cnt -eq 0 ] + then + set_perms $file/idle_time system.graphics 0664 + set_perms $file/dynamic_fps system.graphics 0664 + set_perms $file/dyn_pu system.graphics 0664 + set_perms $file/modes system.graphics 0664 + set_perms $file/mode system.graphics 0664 + fi fi done + diff --git a/rootdir/etc/init.qcom.rc b/rootdir/etc/init.qcom.rc index e1167586..682fcf13 100644 --- a/rootdir/etc/init.qcom.rc +++ b/rootdir/etc/init.qcom.rc @@ -49,6 +49,7 @@ on early-boot write /sys/module/pil_msa/parameters/modem_auth_timeout_ms ${persist.sys.modem_auth_timeout} write /sys/module/peripheral_loader/parameters/proxy_timeout_ms ${persist.sys.pil_proxy_timeout} write /sys/kernel/boot_adsp/boot 1 + exec u:r:qti_init_shell:s0 -- /init.qcom.early_boot.sh on boot chown bluetooth bluetooth /sys/module/bluetooth_power/parameters/power