Merge "disp: msm: sde: avoid registering vblank callback during CWB"
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

commit
0252310b1b
@@ -658,7 +658,7 @@ static void msm_atomic_commit_dispatch(struct drm_device *dev,
|
|||||||
struct msm_drm_private *priv = dev->dev_private;
|
struct msm_drm_private *priv = dev->dev_private;
|
||||||
struct drm_crtc *crtc = NULL;
|
struct drm_crtc *crtc = NULL;
|
||||||
struct drm_crtc_state *crtc_state = NULL;
|
struct drm_crtc_state *crtc_state = NULL;
|
||||||
int ret = -EINVAL, i = 0, j = 0;
|
int ret = -ECANCELED, i = 0, j = 0;
|
||||||
bool nonblock;
|
bool nonblock;
|
||||||
|
|
||||||
/* cache since work will kfree commit in non-blocking case */
|
/* 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 {
|
} else {
|
||||||
DRM_ERROR(" Error for crtc_id: %d\n",
|
DRM_ERROR(" Error for crtc_id: %d\n",
|
||||||
priv->disp_thread[j].crtc_id);
|
priv->disp_thread[j].crtc_id);
|
||||||
|
ret = -EINVAL;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -694,13 +695,17 @@ static void msm_atomic_commit_dispatch(struct drm_device *dev,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ret) {
|
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
|
* this is not expected to happen, but at this point the state
|
||||||
* has been swapped, but we couldn't dispatch to a crtc thread.
|
* has been swapped, but we couldn't dispatch to a crtc thread.
|
||||||
* fallback now to a synchronous complete_commit to try and
|
* fallback now to a synchronous complete_commit to try and
|
||||||
* ensure that SW and HW state don't get out of sync.
|
* 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);
|
complete_commit(commit);
|
||||||
} else if (!nonblock) {
|
} else if (!nonblock) {
|
||||||
kthread_flush_work(&commit->commit_work);
|
kthread_flush_work(&commit->commit_work);
|
||||||
|
@@ -3057,6 +3057,11 @@ void sde_encoder_register_vblank_callback(struct drm_encoder *drm_enc,
|
|||||||
SDE_DEBUG_ENC(sde_enc, "\n");
|
SDE_DEBUG_ENC(sde_enc, "\n");
|
||||||
SDE_EVT32(DRMID(drm_enc), enable);
|
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);
|
spin_lock_irqsave(&sde_enc->enc_spinlock, lock_flags);
|
||||||
sde_enc->crtc_vblank_cb = vbl_cb;
|
sde_enc->crtc_vblank_cb = vbl_cb;
|
||||||
sde_enc->crtc_vblank_cb_data = vbl_data;
|
sde_enc->crtc_vblank_cb_data = vbl_data;
|
||||||
|
Reference in New Issue
Block a user