summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2007-12-11 14:46:51 +1000
committerDave Airlie <airlied@linux.ie>2007-12-11 14:46:51 +1000
commit3b6786e3e6523b1ceca3645ea4c6081f170d2134 (patch)
tree79f84063a455489dd15517f80abe8fe1dda4aa3e /tests
parent9d064966d8495038921d0e731c0bfca0cd58d244 (diff)
modesetting: add dpms property and initial settable property ioctl
Diffstat (limited to 'tests')
-rw-r--r--tests/mode/Makefile2
-rw-r--r--tests/mode/modetest.c10
2 files changed, 7 insertions, 5 deletions
diff --git a/tests/mode/Makefile b/tests/mode/Makefile
index 205c2ba1..a3d3b49a 100644
--- a/tests/mode/Makefile
+++ b/tests/mode/Makefile
@@ -5,7 +5,7 @@ all: modetest
# -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE \
modetest: modetest.c
- @gcc -o modetest -Wall -I../../libdrm -I../../shared-core -L../../libdrm/.libs -ldrm modetest.c
+ @gcc $(CFLAGS) -o modetest -Wall -I../../libdrm -I../../shared-core -L../../libdrm/.libs -ldrm modetest.c
clean:
@rm -f modetest
diff --git a/tests/mode/modetest.c b/tests/mode/modetest.c
index c396da41..4a8c6a17 100644
--- a/tests/mode/modetest.c
+++ b/tests/mode/modetest.c
@@ -80,15 +80,17 @@ int printOutput(int fd, drmModeResPtr res, drmModeOutputPtr output, uint32_t id)
drmModePropertyBlobPtr blob;
blob = drmModeGetPropertyBlob(fd, output->prop_values[i]);
-
- printf("blob is %d length, %08X\n", blob->length, *(uint32_t *)blob->data);
- drmModeFreePropertyBlob(blob);
+ if (blob) {
+ printf("blob is %d length, %08X\n", blob->length, *(uint32_t *)blob->data);
+ drmModeFreePropertyBlob(blob);
+ }
} else {
for (j = 0; j < props->count_enums; j++) {
+ printf("\t\t%lld = %s\n", props->enums[j].value, props->enums[j].name);
if (output->prop_values[i] == props->enums[j].value)
name = props->enums[j].name;
- printf("\t\t%d = %s\n", props->enums[j].value, props->enums[j].name);
+
}
if (props->count_enums && name) {