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

Commit 0252310b authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "disp: msm: sde: avoid registering vblank callback during CWB"

parents 6e0320c9 2211a5da
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -658,7 +658,7 @@ static void msm_atomic_commit_dispatch(struct drm_device *dev,
	struct msm_drm_private *priv = dev->dev_private;
	struct drm_crtc *crtc = NULL;
	struct drm_crtc_state *crtc_state = NULL;
	int ret = -EINVAL, i = 0, j = 0;
	int ret = -ECANCELED, i = 0, j = 0;
	bool nonblock;

	/* cache since work will kfree commit in non-blocking case */
@@ -679,6 +679,7 @@ static void msm_atomic_commit_dispatch(struct drm_device *dev,
				} else {
					DRM_ERROR(" Error for crtc_id: %d\n",
						priv->disp_thread[j].crtc_id);
					ret = -EINVAL;
				}
				break;
			}
@@ -694,13 +695,17 @@ static void msm_atomic_commit_dispatch(struct drm_device *dev,
	}

	if (ret) {
		if (ret == -EINVAL)
			DRM_ERROR("failed to dispatch commit to any CRTC\n");
		else
			DRM_DEBUG_DRIVER_RATELIMITED("empty crtc state\n");

		/**
		 * this is not expected to happen, but at this point the state
		 * has been swapped, but we couldn't dispatch to a crtc thread.
		 * fallback now to a synchronous complete_commit to try and
		 * ensure that SW and HW state don't get out of sync.
		 */
		DRM_ERROR("failed to dispatch commit to any CRTC\n");
		complete_commit(commit);
	} else if (!nonblock) {
		kthread_flush_work(&commit->commit_work);
+5 −0
Original line number Diff line number Diff line
@@ -3057,6 +3057,11 @@ void sde_encoder_register_vblank_callback(struct drm_encoder *drm_enc,
	SDE_DEBUG_ENC(sde_enc, "\n");
	SDE_EVT32(DRMID(drm_enc), enable);

	if (sde_encoder_in_clone_mode(drm_enc)) {
		SDE_EVT32(DRMID(drm_enc), SDE_EVTLOG_ERROR);
		return;
	}

	spin_lock_irqsave(&sde_enc->enc_spinlock, lock_flags);
	sde_enc->crtc_vblank_cb = vbl_cb;
	sde_enc->crtc_vblank_cb_data = vbl_data;