xorg: modify to detect Nvidia Tegra and create Xorg.conf by Xorg.conf.tegra template provided with driver
This commit is contained in:
parent
f0dbdca8a8
commit
f365eb6f03
@ -165,7 +165,11 @@ rm -fr /tmp/.ICE-unix
|
||||
install -m 1777 -o root -g root -d /tmp/.ICE-unix
|
||||
|
||||
# video hardware change detection
|
||||
if [ -e /dev/nvhost-ctrl ]; then
|
||||
VIDEO_DEV="NVIDIA TEGRA"
|
||||
else
|
||||
VIDEO_DEV="`lspci -n | grep " 03[0-9][0-9]: "`"
|
||||
fi
|
||||
|
||||
if [ -e $XORGCONF -a -e $postpluglibdir/xorg.cache ]; then
|
||||
VIDEO_DEV_CACHED="`cat $postpluglibdir/xorg.cache`"
|
||||
@ -195,7 +199,10 @@ if [ ! -e $XORGCONF ]; then
|
||||
#
|
||||
# Create a new Xorg configuration file
|
||||
#
|
||||
|
||||
if [ -e /dev/nvhost-ctrl -a -e $XORGCONF.tegra ]; then
|
||||
# use default xorg.conf for Tegra
|
||||
cp $XORGCONF.tegra $XORGCONF
|
||||
else
|
||||
# fix set dri alternatives
|
||||
xorg_set_alternatives
|
||||
|
||||
@ -222,9 +229,10 @@ if [ ! -e $XORGCONF ]; then
|
||||
}
|
||||
|
||||
mv /tmp/xorg.conf.new $XORGCONF
|
||||
sed -i "s|#DisplaySize|DisplaySize|" $XORGCONF
|
||||
fi
|
||||
let "CONFCREATED = 1"
|
||||
|
||||
sed -i "s|#DisplaySize|DisplaySize|" $XORGCONF
|
||||
fi
|
||||
|
||||
DISPLAYSIZE="`sed -n "/Section[ \t]\"Monitor\"/,/EndSection/{s/[ \t]*DisplaySize[ \t]*\(.*\)/\1/p}" $XORGCONF`"
|
||||
|
Loading…
Reference in New Issue
Block a user