From 0e1a857208b5ee575a579d2f782c3d85f6e55619 Mon Sep 17 00:00:00 2001 From: "Arun Kumar K.R" Date: Mon, 18 Mar 2013 18:34:13 -0700 Subject: [PATCH] init.qcom: Modify init.qcom files for HDMI node - HDMI fb number will not be known until the device boot up, it will be set depending on the driver registration - check the panel type and determine the HDMI fb node and change the permissions accordingly Change-Id: I49f9e8a957b1eb1fad111a321cf04a4963a1365e CRs-fixed: 451094 --- rootdir/etc/init.qcom.early_boot.sh | 20 ++++++++++++++++++++ rootdir/etc/init.qcom.rc | 12 ------------ 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/rootdir/etc/init.qcom.early_boot.sh b/rootdir/etc/init.qcom.early_boot.sh index 90b256c0..eb9f3286 100755 --- a/rootdir/etc/init.qcom.early_boot.sh +++ b/rootdir/etc/init.qcom.early_boot.sh @@ -125,3 +125,23 @@ case "$1" in esac ;; esac + +# Setup HDMI related nodes & permissions +# HDMI can be fb1 or fb2 +# Loop through the sysfs nodes and determine +# the HDMI(dtv panel) +for file in /sys/class/graphics/fb* +do + value=`cat $file/msm_fb_type` + case "$value" in + "dtv panel") + chown system.graphics $file/hpd + chmod 0664 $file/hpd + chmod 0664 $file/video_mode + chmod 0664 $file/format_3d + # create symbolic link + ln -s $file /dev/graphics/hdmi + # Change owner and group for media server and surface flinger + chown system.system $file/format_3d;; + esac +done diff --git a/rootdir/etc/init.qcom.rc b/rootdir/etc/init.qcom.rc index 32886b06..7551a8c2 100644 --- a/rootdir/etc/init.qcom.rc +++ b/rootdir/etc/init.qcom.rc @@ -103,18 +103,6 @@ on boot chmod 0444 /sys/devices/platform/msm_hsusb/gadget/usb_state - # create symlink for fb1 as HDMI - symlink /dev/graphics/fb1 /dev/graphics/hdmi - - # setup permissions for fb1 related nodes - chown system graphics /sys/class/graphics/fb1/hpd - chmod 0664 /sys/devices/virtual/graphics/fb1/hpd - chmod 0664 /sys/devices/virtual/graphics/fb1/video_mode - chmod 0664 /sys/devices/virtual/graphics/fb1/format_3d - - # Change owner and group for media server and surface flinger - chown system system /sys/devices/virtual/graphics/fb1/format_3d - #For bridgemgr daemon to inform the USB driver of the correct transport chown radio radio /sys/class/android_usb/f_rmnet_smd_sdio/transport