summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHo Ming Shun <cyph1984@gmail.com>2022-06-28 21:10:50 +0800
committersfan5 <sfan5@live.de>2022-08-03 16:42:49 +0200
commit8b1f9787125f2eaa85912f5143c470a4261d084a (patch)
treee9979dcb58a3f3faf8c72be33777cb0ca8d1221b
parent24d10fc998a7b69c3254fef49d3ea9d79f82ebca (diff)
downloadmpv-8b1f9787125f2eaa85912f5143c470a4261d084a.tar.bz2
mpv-8b1f9787125f2eaa85912f5143c470a4261d084a.tar.xz
drm: avoid drmModeAtomicCommit races by blocking
On S905X (meson) boards drmModeAtomicCommit called from disable_video_plane in hwdec_drmprime_drm.c might still be running when another call is made from queue_flip in context_drm_egl.c. This causes EBUSY error in queue_flip, and causes mpv to hang.
-rw-r--r--video/out/opengl/hwdec_drmprime_drm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/opengl/hwdec_drmprime_drm.c b/video/out/opengl/hwdec_drmprime_drm.c
index 88b20491f7..87b04c350f 100644
--- a/video/out/opengl/hwdec_drmprime_drm.c
+++ b/video/out/opengl/hwdec_drmprime_drm.c
@@ -131,7 +131,7 @@ static void disable_video_plane(struct ra_hwdec *hw)
drm_object_set_property(request, p->ctx->drmprime_video_plane, "CRTC_ID", 0);
int ret = drmModeAtomicCommit(p->ctx->fd, request,
- DRM_MODE_ATOMIC_NONBLOCK, NULL);
+ 0, NULL);
if (ret)
MP_ERR(hw, "Failed to commit disable plane request (code %d)", ret);