Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bc182fb1 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drm/msm/sde: add kthread_flush_work for crtc event thread"

parents b2bbcbd7 6d21d4c0
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
@@ -3222,7 +3222,7 @@ static void sde_crtc_destroy_state(struct drm_crtc *crtc,
static int _sde_crtc_wait_for_frame_done(struct drm_crtc *crtc)
{
	struct sde_crtc *sde_crtc;
	int ret, rc = 0;
	int ret, rc = 0, i;

	if (!crtc) {
		SDE_ERROR("invalid argument\n");
@@ -3235,7 +3235,17 @@ static int _sde_crtc_wait_for_frame_done(struct drm_crtc *crtc)
		return 0;
	}

	SDE_EVT32_VERBOSE(DRMID(crtc), SDE_EVTLOG_FUNC_ENTRY);
	SDE_EVT32(DRMID(crtc), SDE_EVTLOG_FUNC_ENTRY);

	/*
	 * flush all the event thread work to make sure all the
	 * FRAME_EVENTS from encoder are propagated to crtc
	 */
	for (i = 0; i < ARRAY_SIZE(sde_crtc->frame_events); i++) {
		if (list_empty(&sde_crtc->frame_events[i].list))
			kthread_flush_work(&sde_crtc->frame_events[i].work);
	}

	ret = wait_for_completion_timeout(&sde_crtc->frame_done_comp,
			msecs_to_jiffies(SDE_FRAME_DONE_TIMEOUT));
	if (!ret) {