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

Commit 9414a5b7 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: Fix deadlock due to input handler"

parents 63a0f8a0 779c7521
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -1888,7 +1888,7 @@ static void sde_encoder_input_event_handler(struct input_handle *handle,
{
	struct drm_encoder *drm_enc = NULL;
	struct sde_encoder_virt *sde_enc = NULL;
	struct msm_drm_thread *disp_thread = NULL;
	struct msm_drm_thread *event_thread = NULL;
	struct msm_drm_private *priv = NULL;

	if (!handle || !handle->handler || !handle->handler->private) {
@@ -1905,7 +1905,7 @@ static void sde_encoder_input_event_handler(struct input_handle *handle,
	priv = drm_enc->dev->dev_private;
	sde_enc = to_sde_encoder_virt(drm_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,
@@ -1915,9 +1915,10 @@ static void sde_encoder_input_event_handler(struct input_handle *handle,

	SDE_EVT32_VERBOSE(DRMID(drm_enc));

	disp_thread = &priv->disp_thread[sde_enc->crtc->index];
	event_thread = &priv->event_thread[sde_enc->crtc->index];

	kthread_queue_work(&disp_thread->worker,
	/* Queue input event work to event thread */
	kthread_queue_work(&event_thread->worker,
				&sde_enc->input_event_work);
}