diff --git a/userspace/modetest/.gitignore b/userspace/modetest/.gitignore new file mode 100644 index 0000000..eb1acdf --- /dev/null +++ b/userspace/modetest/.gitignore @@ -0,0 +1 @@ +/libdrm/ diff --git a/userspace/modetest/README b/userspace/modetest/README new file mode 100644 index 0000000..15bdb5c --- /dev/null +++ b/userspace/modetest/README @@ -0,0 +1,3 @@ +The modetest binary used in AGNOS is built here. + +It's patched to remove the test pattern. \ No newline at end of file diff --git a/userspace/modetest/build.sh b/userspace/modetest/build.sh new file mode 100755 index 0000000..ccbe579 --- /dev/null +++ b/userspace/modetest/build.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +set -e + +DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" + +cd $DIR + + +if [ ! -d libdrm/ ]; then + git clone https://github.com/grate-driver/libdrm +fi +cd libdrm +git fetch --all +git checkout 3e3c53e +git reset --hard +git clean -xdff . diff --git a/userspace/modetest/modetest.diff b/userspace/modetest/modetest.diff new file mode 100644 index 0000000..5232501 --- /dev/null +++ b/userspace/modetest/modetest.diff @@ -0,0 +1,35 @@ +diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c +index 975dcbcd..8d71f08b 100644 +--- a/tests/modetest/modetest.c ++++ b/tests/modetest/modetest.c +@@ -1393,7 +1393,7 @@ static void set_mode(struct device *dev, struct pipe_arg *pipes, unsigned int co + + bo = bo_create(dev->fd, pipes[0].fourcc, dev->mode.width, + dev->mode.height, handles, pitches, offsets, +- UTIL_PATTERN_SMPTE); ++ UTIL_PATTERN_PLAIN); + if (bo == NULL) + return; + +@@ -2080,7 +2080,7 @@ int main(int argc, char **argv) + if (drop_master) + drmDropMaster(dev.fd); + +- getchar(); ++ // getchar(); + + if (test_cursor) + clear_cursors(&dev); +diff --git a/tests/util/pattern.c b/tests/util/pattern.c +index 9fa0a417..b8d162f2 100644 +--- a/tests/util/pattern.c ++++ b/tests/util/pattern.c +@@ -823,7 +823,7 @@ static void fill_plain(void *planes[3], + unsigned int height, + unsigned int stride) + { +- memset(planes[0], 0x77, stride * height); ++ memset(planes[0], 0x00, stride * height); + } + + /* diff --git a/userspace/usr/comma/modetest b/userspace/usr/comma/modetest index 101fa25..1e2f3f4 100755 Binary files a/userspace/usr/comma/modetest and b/userspace/usr/comma/modetest differ