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.
This commit is contained in:
Ho Ming Shun 2022-06-28 21:10:50 +08:00 committed by sfan5
parent 24d10fc998
commit 8b1f978712
1 changed files with 1 additions and 1 deletions

View File

@ -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);