vo_drm: fix VT behavior with auxiliary screens

Fixes #1828
This commit is contained in:
Marcin Kurczewski authored and wm4 committed 2015-04-18 21:20:42 +02:00
1 parent f3c8c613ba
commit 3313eba1bf
1 file changed
+4 -2
+4 -2
View File
@@ -64,6 +64,7 @@ struct modeset_buf {
struct modeset_dev {
struct modeset_buf bufs[BUF_COUNT];
drmModeModeInfo mode;
drmModeEncoder *enc;
uint32_t conn;
uint32_t crtc;
int front_buf;
@@ -210,8 +211,8 @@ static int modeset_find_crtc(struct vo *vo, int fd, drmModeRes *res,
if (!(enc->possible_crtcs & (1 << j)))
continue;
drmModeFreeEncoder(enc);
dev->crtc = res->crtcs[j];
dev->enc = enc;
dev->crtc = enc->crtc_id;
return 0;
}
@@ -603,6 +604,7 @@ static void uninit(struct vo *vo)
modeset_destroy_fb(p->fd, &p->dev->bufs[1]);
modeset_destroy_fb(p->fd, &p->dev->bufs[0]);
drmModeFreeEncoder(p->dev->enc);
}
vt_switcher_destroy(&p->vt_switcher);