diff options
author | Marcin Kurczewski <mkurczew@gmail.com> | 2015-04-18 21:01:03 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-04-18 21:20:42 +0200 |
commit | 3313eba1bf5974b58cc4e1ed4e439bbd6bcd4e42 (patch) | |
tree | 4ef7d9cf6b5c26c6f898642c5eac440474b073db /video | |
parent | f3c8c613ba93f622a8a15299b2a05838b470b923 (diff) | |
download | mpv-3313eba1bf5974b58cc4e1ed4e439bbd6bcd4e42.tar.bz2 mpv-3313eba1bf5974b58cc4e1ed4e439bbd6bcd4e42.tar.xz |
vo_drm: fix VT behavior with auxiliary screens
Fixes #1828
Diffstat (limited to 'video')
-rw-r--r-- | video/out/vo_drm.c | 6 |
1 files changed, 4 insertions, 2 deletions
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); |