Merge "init: early_boot: Set up display permissions"

This commit is contained in:
Linux Build Service Account 2015-08-07 04:09:01 -07:00 committed by Gerrit - the friendly Code Review server
commit a3f24780c9
2 changed files with 31 additions and 14 deletions

View File

@ -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 <filename> <ownership> <permission>
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

View File

@ -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