diff options
author | Anton Kindestam <antonki@kth.se> | 2018-06-02 12:53:54 +0200 |
---|---|---|
committer | Jan Ekström <jeebjp@gmail.com> | 2018-07-09 02:17:47 +0300 |
commit | 7beee68f8d8617557990a5f860d9d1f99c4ba009 (patch) | |
tree | 592bd1673b1edd902746e4bf39d9c7406d69f987 /video/out/vo_drm.c | |
parent | 1298b9d201fc61cfffc6f82d78ae27fc294655b7 (diff) | |
download | mpv-7beee68f8d8617557990a5f860d9d1f99c4ba009.tar.bz2 mpv-7beee68f8d8617557990a5f860d9d1f99c4ba009.tar.xz |
context_drm_egl: Fix CRTC setup and release code when using atomic
The previous code did not save enough information about the old state,
and could end up changing what plane the fbcon:s FB got attached to,
or in worse case causing a blank screen (observed in some multi-screen
setups on Sandy Bridge).
In addition refactor the handling of drmModeModeInfo property blobs to
not leak, as well as enable reuse of already created blobs.
Diffstat (limited to 'video/out/vo_drm.c')
-rw-r--r-- | video/out/vo_drm.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/video/out/vo_drm.c b/video/out/vo_drm.c index ed41d2aab0..7f5290110f 100644 --- a/video/out/vo_drm.c +++ b/video/out/vo_drm.c @@ -153,8 +153,8 @@ static bool fb_setup_double_buffering(struct vo *vo) p->front_buf = 0; for (unsigned int i = 0; i < 2; i++) { - p->bufs[i].width = p->kms->mode.hdisplay; - p->bufs[i].height = p->kms->mode.vdisplay; + p->bufs[i].width = p->kms->mode.mode.hdisplay; + p->bufs[i].height = p->kms->mode.mode.vdisplay; } for (unsigned int i = 0; i < BUF_COUNT; i++) { @@ -186,7 +186,7 @@ static bool crtc_setup(struct vo *vo) int ret = drmModeSetCrtc(p->kms->fd, p->kms->crtc_id, p->bufs[MOD(p->front_buf - 1, BUF_COUNT)].fb, 0, 0, &p->kms->connector->connector_id, 1, - &p->kms->mode); + &p->kms->mode.mode); p->active = true; return ret == 0; } |