intel-gpu-tools: add script to set colorspace. thanks to fritsch

This commit is contained in:
Stefan Saraev 2013-02-04 23:43:48 +02:00
parent 1a9508dceb
commit 09109e9259
2 changed files with 48 additions and 0 deletions

View File

@ -24,3 +24,4 @@
mkdir -p $INSTALL/usr/bin
cp -R $PKG_BUILD/tools/intel_reg_write $INSTALL/usr/bin
cp -P $PKG_DIR/scripts/set-intel-color-space $INSTALL/usr/bin

View File

@ -0,0 +1,47 @@
#!/bin/sh
################################################################################
# Copyright (C) 2009-2010 OpenELEC.tv
# http://www.openelec.tv
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
# Enable Limited or RGB full on intel Computers
# Usage:
# Set Limited mode:
# ./set-intel-color-space limited
# Set Full mode:
# ./set-intel-color-space full
################################################################################
if [ $# -gt 0 ] ; then
OUTPUT=`xrandr -display :0 -q | sed '/ connected/!d;s/ .*//;q'`
if [ "$1" = "limited" ] ; then
# limited modes
intel_reg_write 0x70008 0xC0000000
intel_reg_write 0x70180 0xD8004400
xrandr --output $OUTPUT --set "Broadcast RGB" "Limited 16:235"
elif [ "$1" == "full" ] ; then
# reset old mode
xrandr --output $OUTPUT --set "Broadcast RGB" "Limited 16:235"
intel_reg_write 0x70008 0xC4002000
intel_reg_write 0x70180 0xDA004400
# set new mode
xrandr --output $OUTPUT --set "Broadcast RGB" "Full"
fi
else
echo "Usage: $0 limited | full"
fi