Nico Huber has uploaded this change for review. ( https://review.coreboot.org/22715
Change subject: gfx_test: Update i915 binding in wrapper script
......................................................................
gfx_test: Update i915 binding in wrapper script
Always load i915 even if it wasn't loaded before. Also, force
`modeset=1` as that's our use case and we might have booted with
`i915.modeset=0`. Last but not least, search for the correct
vtcon* entry in sysfs instead of guessing, and always unbind it
(i.e. unbind the dummy driver when we want to switch back to
i915).
Change-Id: Ib62a05a3621aef2992372a6d3acad1196a363a95
Signed-off-by: Nico Huber <nico.h(a)gmx.de>
---
M gfxtest/gfx_test.sh
1 file changed, 16 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/15/22715/1
diff --git a/gfxtest/gfx_test.sh b/gfxtest/gfx_test.sh
index 9df0005..5315b51 100755
--- a/gfxtest/gfx_test.sh
+++ b/gfxtest/gfx_test.sh
@@ -35,10 +35,15 @@
while [ `fgconsole` -eq $orig_vt ]; do :; done
# take i915 out of charge
- echo 0 >/sys/devices/virtual/vtconsole/vtcon1/bind
+ for vtcon in /sys/devices/virtual/vtconsole/vtcon*; do
+ if grep -q frame\ buffer $vtcon/name >/dev/null 2>&1; then
+ echo 0 >$vtcon/bind
+ break
+ fi
+ done
# try unloading it
- if lsmod | grep -q i915 && modprobe -r i915 >/dev/null 2>&1; then
+ if modprobe -r i915 >/dev/null 2>&1; then
reload_i915=1
fi
}
@@ -46,11 +51,16 @@
restore_vt() {
# reload i915
if [ $reload_i915 -eq 1 ]; then
- modprobe i915
+ modprobe i915 modeset=1
+ else
+ # put i915 back in charge
+ for vtcon in /sys/devices/virtual/vtconsole/vtcon*; do
+ if grep -q dummy $vtcon/name >/dev/null 2>&1; then
+ echo 0 >$vtcon/bind
+ break
+ fi
+ done
fi
-
- # put i915 back in charge
- echo 1 >/sys/devices/virtual/vtconsole/vtcon1/bind
# return to original VT
chvt $orig_vt
--
To view, visit https://review.coreboot.org/22715
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: libgfxinit
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib62a05a3621aef2992372a6d3acad1196a363a95
Gerrit-Change-Number: 22715
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Nico Huber has uploaded this change for review. ( https://review.coreboot.org/22714
Change subject: gfx_test: Add top marker for rotated framebuffers
......................................................................
gfx_test: Add top marker for rotated framebuffers
Mark the top with an arrow. Desperately needs anti aliasing.
Change-Id: Ide0e06c29fefc8b5288714d53ee9fa15df2d5452
Signed-off-by: Nico Huber <nico.h(a)gmx.de>
---
M gfxtest/hw-gfx-gma-gfx_test.adb
1 file changed, 17 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/14/22714/1
diff --git a/gfxtest/hw-gfx-gma-gfx_test.adb b/gfxtest/hw-gfx-gma-gfx_test.adb
index e0ad71f..514e60f 100644
--- a/gfxtest/hw-gfx-gma-gfx_test.adb
+++ b/gfxtest/hw-gfx-gma-gfx_test.adb
@@ -160,6 +160,19 @@
-- We have pixel offset wheras the framebuffer has a byte offset
Offset_Y : Natural := Natural (Framebuffer.Offset / 4);
Offset : Natural;
+
+ function Top_Test (X, Y : Natural) return Boolean
+ is
+ C : constant Natural := Natural (Framebuffer.Width) / 2;
+ S_Y : constant Natural := 3 * Y / 2;
+ Left : constant Integer := X - C + S_Y;
+ Right : constant Integer := X - C - S_Y;
+ begin
+ return
+ Y < 12 and
+ ((-1 <= Left and Left <= 0) or
+ (0 <= Right and Right <= 1));
+ end Top_Test;
begin
for Y in 0 .. Natural (Framebuffer.Height) - 1 loop
Offset := Offset_Y;
@@ -168,6 +181,10 @@
(Y < 32 or Y >= Natural (Framebuffer.Height) - 32)
then
P := Corner_Fill (X, Y, Framebuffer, Pipe);
+ elsif Framebuffer.Rotation /= No_Rotation and then
+ Top_Test (X, Y)
+ then
+ P := White;
elsif Y mod 16 = 0 or X mod 16 = 0 then
P := Black;
else
--
To view, visit https://review.coreboot.org/22714
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: libgfxinit
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ide0e06c29fefc8b5288714d53ee9fa15df2d5452
Gerrit-Change-Number: 22714
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>