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

Commit c1940edc 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: queue display failure work to event thread"

parents c65602e7 00a28e9d
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1769,6 +1769,14 @@ static void _sde_connector_report_panel_dead(struct sde_connector *conn)
	if (!conn)
		return;

	/* Panel dead notification can come:
	 * 1) ESD thread
	 * 2) Commit thread (if TE stops coming)
	 * So such case, avoid failure notification twice.
	 */
	if (conn->panel_dead)
		return;

	conn->panel_dead = true;
	event.type = DRM_EVENT_PANEL_DEAD;
	event.length = sizeof(bool);
+8 −11
Original line number Diff line number Diff line
@@ -4900,7 +4900,7 @@ int sde_encoder_update_caps_for_cont_splash(struct drm_encoder *encoder)

int sde_encoder_display_failure_notification(struct drm_encoder *enc)
{
	struct msm_drm_thread *disp_thread = NULL;
	struct msm_drm_thread *event_thread = NULL;
	struct msm_drm_private *priv = NULL;
	struct sde_encoder_virt *sde_enc = NULL;

@@ -4912,7 +4912,7 @@ int sde_encoder_display_failure_notification(struct drm_encoder *enc)
	priv = enc->dev->dev_private;
	sde_enc = to_sde_encoder_virt(enc);
	if (!sde_enc->crtc || (sde_enc->crtc->index
			>= ARRAY_SIZE(priv->disp_thread))) {
			>= ARRAY_SIZE(priv->event_thread))) {
		SDE_DEBUG_ENC(sde_enc,
			"invalid cached CRTC: %d or crtc index: %d\n",
			sde_enc->crtc == NULL,
@@ -4922,15 +4922,12 @@ int sde_encoder_display_failure_notification(struct drm_encoder *enc)

	SDE_EVT32_VERBOSE(DRMID(enc));

	disp_thread = &priv->disp_thread[sde_enc->crtc->index];
	if (current->tgid == disp_thread->thread->tgid) {
		sde_encoder_resource_control(&sde_enc->base,
					     SDE_ENC_RC_EVENT_KICKOFF);
	} else {
		kthread_queue_work(&disp_thread->worker,
	event_thread = &priv->event_thread[sde_enc->crtc->index];

	kthread_queue_work(&event_thread->worker,
			   &sde_enc->esd_trigger_work);
	kthread_flush_work(&sde_enc->esd_trigger_work);
	}

	/**
	 * panel may stop generating te signal (vsync) during esd failure. rsc
	 * hardware may hang without vsync. Avoid rsc hang by generating the