<p>Nico Huber has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/22715">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">gfx_test: Update i915 binding in wrapper script<br><br>Always load i915 even if it wasn't loaded before. Also, force<br>`modeset=1` as that's our use case and we might have booted with<br>`i915.modeset=0`. Last but not least, search for the correct<br>vtcon* entry in sysfs instead of guessing, and always unbind it<br>(i.e. unbind the dummy driver when we want to switch back to<br>i915).<br><br>Change-Id: Ib62a05a3621aef2992372a6d3acad1196a363a95<br>Signed-off-by: Nico Huber <nico.h@gmx.de><br>---<br>M gfxtest/gfx_test.sh<br>1 file changed, 16 insertions(+), 6 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/15/22715/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/gfxtest/gfx_test.sh b/gfxtest/gfx_test.sh<br>index 9df0005..5315b51 100755<br>--- a/gfxtest/gfx_test.sh<br>+++ b/gfxtest/gfx_test.sh<br>@@ -35,10 +35,15 @@<br> while [ `fgconsole` -eq $orig_vt ]; do :; done<br> <br> # take i915 out of charge<br>- echo 0 >/sys/devices/virtual/vtconsole/vtcon1/bind<br>+ for vtcon in /sys/devices/virtual/vtconsole/vtcon*; do<br>+ if grep -q frame\ buffer $vtcon/name >/dev/null 2>&1; then<br>+ echo 0 >$vtcon/bind<br>+ break<br>+ fi<br>+ done<br> <br> # try unloading it<br>- if lsmod | grep -q i915 && modprobe -r i915 >/dev/null 2>&1; then<br>+ if modprobe -r i915 >/dev/null 2>&1; then<br> reload_i915=1<br> fi<br> }<br>@@ -46,11 +51,16 @@<br> restore_vt() {<br> # reload i915<br> if [ $reload_i915 -eq 1 ]; then<br>- modprobe i915<br>+ modprobe i915 modeset=1<br>+ else<br>+ # put i915 back in charge<br>+ for vtcon in /sys/devices/virtual/vtconsole/vtcon*; do<br>+ if grep -q dummy $vtcon/name >/dev/null 2>&1; then<br>+ echo 0 >$vtcon/bind<br>+ break<br>+ fi<br>+ done<br> fi<br>-<br>- # put i915 back in charge<br>- echo 1 >/sys/devices/virtual/vtconsole/vtcon1/bind<br> <br> # return to original VT<br> chvt $orig_vt<br></pre><p>To view, visit <a href="https://review.coreboot.org/22715">change 22715</a>. To unsubscribe, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/22715"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: libgfxinit </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ib62a05a3621aef2992372a6d3acad1196a363a95 </div>
<div style="display:none"> Gerrit-Change-Number: 22715 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Nico Huber <nico.h@gmx.de> </div>