From 3313eba1bf5974b58cc4e1ed4e439bbd6bcd4e42 Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Sat, 18 Apr 2015 21:01:03 +0200 Subject: vo_drm: fix VT behavior with auxiliary screens Fixes #1828 --- video/out/vo_drm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'video') diff --git a/video/out/vo_drm.c b/video/out/vo_drm.c index 2d820ba566..c7501d3360 100644 --- a/video/out/vo_drm.c +++ b/video/out/vo_drm.c @@ -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); -- cgit v1.2.3