diff --git a/packages/x11/other/intel-gpu-tools/install b/packages/x11/other/intel-gpu-tools/install index cbf471cdad..21f521f3bd 100755 --- a/packages/x11/other/intel-gpu-tools/install +++ b/packages/x11/other/intel-gpu-tools/install @@ -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 diff --git a/packages/x11/other/intel-gpu-tools/scripts/set-intel-color-space b/packages/x11/other/intel-gpu-tools/scripts/set-intel-color-space new file mode 100755 index 0000000000..be054bd483 --- /dev/null +++ b/packages/x11/other/intel-gpu-tools/scripts/set-intel-color-space @@ -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