summaryrefslogtreecommitdiff
path: root/tests/modedemo/demo.c
diff options
context:
space:
mode:
authorJerome Glisse <glisse@freedesktop.org>2008-03-10 23:36:27 +0100
committerJohn Doe <glisse@freedesktop.org>2008-03-10 23:36:27 +0100
commita7e6ca62ad0d9c3c45fd9e1d81b59c2db2d714cf (patch)
tree8f757eeaa2c234af14ca1df515de7810e770ed91 /tests/modedemo/demo.c
parenta7dc4d08b9b4f8fe6fcaa4c778f6dd3718d1e36a (diff)
parent9f19e79f955281b9de393219e4ad9835ffe29c49 (diff)
Merge branch 'modesetting-101' of ssh://git.freedesktop.org/git/mesa/drm into modesetting-101
Diffstat (limited to 'tests/modedemo/demo.c')
-rw-r--r--tests/modedemo/demo.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/tests/modedemo/demo.c b/tests/modedemo/demo.c
index db51cd66..83a33aa6 100644
--- a/tests/modedemo/demo.c
+++ b/tests/modedemo/demo.c
@@ -429,7 +429,7 @@ void demoUpdateRes(struct demo_driver *driver)
int demoFindConnectedOutputs(struct demo_driver *driver, drmModeOutputPtr *out, size_t max_out)
{
int count = 0;
- int i;
+ int i,j;
int fd = driver->fd;
drmModeResPtr res = driver->res;
@@ -441,10 +441,20 @@ int demoFindConnectedOutputs(struct demo_driver *driver, drmModeOutputPtr *out,
if (!output)
continue;
- if (output->connection != DRM_MODE_CONNECTED) {
+ if (output->connection == DRM_MODE_DISCONNECTED) {
drmModeFreeOutput(output);
continue;
}
+
+ for (j = 0; j < output->count_props; j++) {
+ drmModePropertyPtr prop;
+
+ prop = drmModeGetProperty(fd, output->props[j]);
+
+ printf("Property: %s\n",prop->name);
+ if (prop->count_enums)
+ printf("%s\n",prop->enums[output->prop_values[j]].name);
+ }
out[count++] = output;
}
@@ -483,7 +493,7 @@ drmModeFBPtr createFB(int fd, drmModeResPtr res)
goto err;
}
- ret = drmModeAddFB(fd, SIZE_X, SIZE_Y, 32, 32, PITCH * 4, &bo, &fb);
+ ret = drmModeAddFB(fd, SIZE_X, SIZE_Y, 32, 32, PITCH * 4, bo.handle, &fb);
if (ret)
goto err_bo;