From 8b1f9787125f2eaa85912f5143c470a4261d084a Mon Sep 17 00:00:00 2001 From: Ho Ming Shun Date: Tue, 28 Jun 2022 21:10:50 +0800 Subject: 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. --- video/out/opengl/hwdec_drmprime_drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'video/out') 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); -- cgit v1.2.3