mirror of
https://git.sr.ht/~calebccff/pbsplash
synced 2026-01-12 20:48:40 -09:00
drm: make master
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
This commit is contained in:
parent
458926088e
commit
42f442d08c
1 changed files with 4 additions and 3 deletions
|
|
@ -128,6 +128,8 @@ static int drm_init(int fd)
|
|||
return -errno;
|
||||
}
|
||||
|
||||
drmSetMaster(fd);
|
||||
|
||||
/* iterate all connectors */
|
||||
for (i = 0; i < res->count_connectors; ++i) {
|
||||
/* get information for each connector */
|
||||
|
|
@ -424,9 +426,6 @@ int drm_framebuffer_init(int *handle, const char *card)
|
|||
return ret;
|
||||
}
|
||||
|
||||
printf("DRM mode %dx%d @ %dHz\n", drm->bufs[0].width, drm->bufs[0].height,
|
||||
drm->mode.vrefresh);
|
||||
|
||||
/* draw some colors for 5seconds */
|
||||
// modeset_draw(*handle);
|
||||
|
||||
|
|
@ -458,6 +457,8 @@ void drm_framebuffer_close(int handle)
|
|||
modeset_destroy_fb(handle, &drm->bufs[1]);
|
||||
modeset_destroy_fb(handle, &drm->bufs[0]);
|
||||
|
||||
drmDropMaster(handle);
|
||||
|
||||
/* free allocated memory */
|
||||
free(drm);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue