From: Anand Saggi Date: Wed, 29 Feb 2012 14:18:29 +0000 (-0800) Subject: Patch to mitigate HDMI Suspend/Resume crash/noise during Audio Playback. X-Git-Tag: 2.1b_release~249 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1bf05fc9b6758762bf445dd530bdd131e078e0c4;p=kernel%2Fkernel-mfld-blackbay.git Patch to mitigate HDMI Suspend/Resume crash/noise during Audio Playback. We were sending HAD DRM_DPMS_ON event when resuming from sleep state in gfx_late_resume. Which was causing the HAD HOT_PLUG sequence to run again causing: 1. Audio Noise 2. Random crash. With this patch, we handle the situation by checking if audio stream is busy in resume sequence. If yes, we don't send DRM_DPMS_ON in gfx_late_resume to both Local MIPI and HDMI as we never send DRM_DPMS_OFF in case HDMI audio is busy becasue of a known JIRA issue - ANDROID-1553. Otherwise we turn them ON. After the Jira issue is resolved, we can turn the local MIPI sequence independent of HDMI Audio state. Refer JIRA: ANDROID-1553 for more details. ISSUE: HSD-206943 Signed-off-by: Mohan Kandra Signed-off-by: Kirill A. Shutemov --- diff --git a/drivers/staging/mrst/drv/psb_powermgmt.c b/drivers/staging/mrst/drv/psb_powermgmt.c index efd6ae3..48e538c 100644 --- a/drivers/staging/mrst/drv/psb_powermgmt.c +++ b/drivers/staging/mrst/drv/psb_powermgmt.c @@ -390,7 +390,18 @@ static void gfx_late_resume(struct early_suspend *es) struct drm_encoder_helper_funcs *ehf = encoder->helper_private; if (drm_helper_encoder_in_use(encoder) && ehf && ehf->mode_set - && ehf->dpms) { + && ehf->dpms +#ifndef JIRA_ANDROID-1553 + /* + Local MIPI fails to turn back on from a DPMS off/on cycle if HDMI + audio returns busy to disallow system suspend. + Once ANDROID-1553 is fixed, the expectation is to turn off MIPI but + keep display island on if there is active audio playback over HDMI + Refer Jira bug# Android-1553 for more details. + */ + && !(dev_priv->hdmi_audio_busy) +#endif + ) { struct drm_crtc *crtc = encoder->crtc; if (crtc)