summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/mode/modetest.c2
-rw-r--r--tests/modedemo/demo.c16
2 files changed, 14 insertions, 4 deletions
diff --git a/tests/mode/modetest.c b/tests/mode/modetest.c
index ab0cdc9c..a50b0cc5 100644
--- a/tests/mode/modetest.c
+++ b/tests/mode/modetest.c
@@ -291,7 +291,7 @@ int testFrameBufferAdd(int fd, drmModeResPtr res)
goto err;
printf("\tAdding FB\n");
- ret = drmModeAddFB(fd, 800, 600, 32, 8, 0, &bo, &fb);
+ ret = drmModeAddFB(fd, 800, 600, 32, 8, 0, bo->handle, &fb);
if (ret)
goto err_bo;
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;