disp: msm: send power_on event in dual display composer kill scenario

On composer kill event, drm lastclose occurs during which suspend
commit gets triggered on primary. If secondary display is stuck in
continuous splash, then we do a early return without triggering
this suspend commit. On composer start, userspace waits for power on
event, but the drm_driver has never entered suspend state, so power
on event is never sent to userspace. This causes HWC deadlock side
effect and the current change triggers null_commit on secondary
display and then issues a suspend commit on both the displays to
avoid this deadlock issue.

Change-Id: I126f43ba3dd2c3bfa83346e8fd4678f35527893d
Signed-off-by: Jayaprakash Madisetty <quic_jmadiset@quicinc.com>
Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
This commit is contained in:
Jayaprakash Madisetty
2022-01-20 11:58:11 +05:30
committed by Veera Sundaram Sankaran
szülő 7a013221ae
commit b837aa4c77
3 fájl változott, egészen pontosan 58 új sor hozzáadva és 4 régi sor törölve

Fájl megtekintése

@@ -1130,8 +1130,19 @@ static void msm_lastclose(struct drm_device *dev)
* commit then ignore the last close call
*/
if (kms->funcs && kms->funcs->check_for_splash
&& kms->funcs->check_for_splash(kms))
return;
&& kms->funcs->check_for_splash(kms)) {
msm_wait_event_timeout(priv->pending_crtcs_event, !priv->pending_crtcs,
LASTCLOSE_TIMEOUT_MS, rc);
if (!rc)
DRM_INFO("wait for crtc mask 0x%x failed, commit anyway...\n",
priv->pending_crtcs);
rc = kms->funcs->trigger_null_flush(kms);
if (rc) {
DRM_ERROR("null flush commit failure during lastclose\n");
return;
}
}
/*
* clean up vblank disable immediately as this is the last close.
@@ -1574,8 +1585,15 @@ static int msm_release(struct inode *inode, struct file *filp)
* refcount > 1. This operation is not triggered from upstream
* drm as msm_driver does not support DRIVER_LEGACY feature.
*/
if (drm_is_current_master(file_priv))
if (drm_is_current_master(file_priv)) {
msm_wait_event_timeout(priv->pending_crtcs_event, !priv->pending_crtcs,
LASTCLOSE_TIMEOUT_MS, ret);
if (!ret)
DRM_INFO("wait for crtc mask 0x%x failed, commit anyway...\n",
priv->pending_crtcs);
msm_preclose(dev, file_priv);
}
ret = drm_release(inode, filp);
filp->private_data = NULL;