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

Commit 03810e38 authored by Lloyd Atkinson's avatar Lloyd Atkinson
Browse files

drm/msm/sde: check for missed frame done after waiting



Fix disable callflow in sde encoder so that the physical
encoder has a chance to wait for the frame done first, before
the virtual encoder declares an error for a missed frame done
event in the encoder disable case.

Change-Id: Ifc6cad708ad98324eef31435e709ad763059abbf
Signed-off-by: default avatarLloyd Atkinson <latkinso@codeaurora.org>
parent 900cea2a
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -446,11 +446,6 @@ static void sde_encoder_virt_disable(struct drm_encoder *drm_enc)

	SDE_EVT32(DRMID(drm_enc));

	if (atomic_xchg(&sde_enc->frame_done_timeout, 0)) {
		SDE_ERROR("enc%d timeout pending\n", drm_enc->base.id);
		del_timer_sync(&sde_enc->frame_done_timer);
	}

	for (i = 0; i < sde_enc->num_phys_encs; i++) {
		struct sde_encoder_phys *phys = sde_enc->phys_encs[i];

@@ -461,6 +456,12 @@ static void sde_encoder_virt_disable(struct drm_encoder *drm_enc)
		}
	}

	/* after phys waits for frame-done, should be no more frames pending */
	if (atomic_xchg(&sde_enc->frame_done_timeout, 0)) {
		SDE_ERROR("enc%d timeout pending\n", drm_enc->base.id);
		del_timer_sync(&sde_enc->frame_done_timer);
	}

	if (sde_enc->cur_master && sde_enc->cur_master->ops.disable)
		sde_enc->cur_master->ops.disable(sde_enc->cur_master);