From 0a4df3372aec219298e3787f6f377941bc51bfcb Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Thu, 10 Jan 2008 05:03:13 +0100 Subject: Updated test mode and added modedemo --- tests/mode/Makefile | 11 +++++++---- tests/mode/modetest.c | 10 +++++++++- tests/mode/test | 2 +- 3 files changed, 17 insertions(+), 6 deletions(-) (limited to 'tests/mode') diff --git a/tests/mode/Makefile b/tests/mode/Makefile index a3d3b49a..7a9c3c24 100644 --- a/tests/mode/Makefile +++ b/tests/mode/Makefile @@ -1,11 +1,14 @@ -all: modetest +all: app #CFLAGS = -g -ansi -pedantic -DPOSIX_C_SOURCE=199309L \ # -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE \ -modetest: modetest.c - @gcc $(CFLAGS) -o modetest -Wall -I../../libdrm -I../../shared-core -L../../libdrm/.libs -ldrm modetest.c +app: modetest.c + @gcc $(CFLAGS) -o app -Wall -I../../libdrm -I../../shared-core -L../../libdrm/.libs -ldrm modetest.c clean: - @rm -f modetest + @rm -f app + +run: app + @sudo ./test diff --git a/tests/mode/modetest.c b/tests/mode/modetest.c index bd8372dc..c1f291b2 100644 --- a/tests/mode/modetest.c +++ b/tests/mode/modetest.c @@ -278,7 +278,15 @@ int testFrameBufferAdd(int fd, drmModeResPtr res) printf("\tCreating BO\n"); /* TODO */ - ret = 1; + ret = drmBOCreate(fd, 800 * 600 * 4, 0, 0, + DRM_BO_FLAG_READ | + DRM_BO_FLAG_WRITE | + DRM_BO_FLAG_MEM_TT | + DRM_BO_FLAG_MEM_VRAM | + DRM_BO_FLAG_NO_EVICT, + DRM_BO_HINT_DONT_FENCE, &bo); + + printf("\tgot %i\n", ret); if (ret) goto err; diff --git a/tests/mode/test b/tests/mode/test index fa155f4e..f98e3708 100755 --- a/tests/mode/test +++ b/tests/mode/test @@ -1 +1 @@ -LD_PRELOAD=../../libdrm/.libs/libdrm.so ./modetest +LD_PRELOAD=../../libdrm/.libs/libdrm.so ./app -- cgit v1.2.3