Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
stefansaraev
Author
Contributor
|
||
fi | ||
else | ||
echo "Usage: $0 limited | full" | ||
fi |
@stefansaraev: We need to issue the intel_reg_write here again: intel_reg_write 0x70180 0xDA004400 concerning the original freedesktop bug: https://bugs.freedesktop.org/show_bug.cgi?id=46800