mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2025-12-24 16:00:13 +01:00
Add property info.
fix bo handle
This commit is contained in:
parent
1a959a2095
commit
b87c7ff79e
1 changed files with 13 additions and 3 deletions
|
|
@ -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->handle, &fb);
|
||||
ret = drmModeAddFB(fd, SIZE_X, SIZE_Y, 32, 32, PITCH * 4, bo.handle, &fb);
|
||||
|
||||
if (ret)
|
||||
goto err_bo;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue