forked from OpenELEC/OpenELEC.tv
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Intel: Implement Passthrough-Range
- Loading branch information
Showing
3 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/sh | ||
FB_TYPE="$(grep '^0 ' /proc/fb | sed 's/[^[:space:]] //')" | ||
|
||
if [ "$FB_TYPE" == "inteldrmfb" ]; then | ||
OUTPUT=`/usr/bin/xrandr -display :0 -q | sed '/ connected/!d;s/ .*//;q'` | ||
for out in $OUTPUT ; do | ||
# Hack - something is not yet fully right | ||
/usr/bin/xrandr -display :0 --output $out --set "Broadcast RGB" "Full" | ||
/usr/bin/xrandr -display :0 --output $out --set "Broadcast RGB" "Video 16:235 pass-through" | ||
# Seems there is a little race somewhere on some outputs | ||
# Turn the display shortly off and on again | ||
if [ -e "/storage/.config/forcedisplay" ]; then | ||
/usr/bin/xrandr -display :0 --output $out --off ; /usr/bin/xrandr -display :0 --output $out --auto | ||
fi | ||
done | ||
fi |
13 changes: 13 additions & 0 deletions
13
projects/Generic/filesystem/usr/lib/systemd/system/intel-fullrange-resume.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[Unit] | ||
Description=Restore full range after suspend | ||
Before=sleep.target | ||
StopWhenUnneeded=yes | ||
|
||
[Service] | ||
Type=oneshot | ||
RemainAfterExit=yes | ||
ExecStart=/bin/true | ||
ExecStop=-/bin/sh "/usr/bin/intel-fullrange.sh" | ||
|
||
[Install] | ||
WantedBy=sleep.target |
14 changes: 14 additions & 0 deletions
14
projects/Generic/filesystem/usr/lib/systemd/system/intel-fullrange.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[Unit] | ||
Description=intel switch to full range | ||
Before=kodi.service | ||
After=graphical.target | ||
|
||
[Service] | ||
Type=oneshot | ||
Environment=DISPLAY=:0.0 | ||
ExecStart=-/bin/sh "/usr/bin/intel-fullrange.sh" | ||
StandardError=null | ||
RemainAfterExit=yes | ||
|
||
[Install] | ||
WantedBy=kodi.target |