From: Shreyas Neerebailoor Date: Fri, 9 Mar 2012 13:13:51 +0000 (+0530) Subject: [PORT FROM R2] GFX-Display:fix spurious HDMI plug/unplug messages to audio driver X-Git-Tag: 2.1b_release~1156 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=21c10ddcc90222101c4e3f18755b5258098e4a14;p=kernel%2Fkernel-mfld-blackbay.git [PORT FROM R2] GFX-Display:fix spurious HDMI plug/unplug messages to audio driver BZ: 21584 currently, gfx driver will send HDMI PLUG/UNPLUG message at several places, one is in hotplug workqueue, the other is in DPMS. based on analyze, the messgae sended in DPMS is not needed , if workqueue has make sure send once. so remove it. Change-Id: Ibe08eca125745de64af992c438b3934c7ab086ec Signed-off-by: Shreyas Neerebailoor Reviewed-on: http://android.intel.com:8080/38149 Reviewed-by: Xu, Randy Reviewed-by: Agarwal, Vaibhav Tested-by: Xu, Randy Reviewed-by: buildbot Tested-by: buildbot --- diff --git a/drivers/staging/mrst/drv/psb_drv.c b/drivers/staging/mrst/drv/psb_drv.c index 389df86..8178ad6 100644 --- a/drivers/staging/mrst/drv/psb_drv.c +++ b/drivers/staging/mrst/drv/psb_drv.c @@ -1212,18 +1212,11 @@ void hdmi_do_hotplug_wq(struct work_struct *work) if (hdmi_hpd_connected) { DRM_INFO("%s: HDMI plugged in\n", __func__); dev_priv->bhdmiconnected = true; - if (dev_priv->mdfld_had_event_callbacks) - (*dev_priv->mdfld_had_event_callbacks) - (HAD_EVENT_HOT_PLUG, dev_priv->had_pvt_data); - drm_sysfs_hotplug_event(dev_priv->dev); } else { DRM_INFO("%s: HDMI unplugged\n", __func__); dev_priv->bhdmiconnected = false; hdmi_state = 0; - if (dev_priv->mdfld_had_event_callbacks) - (*dev_priv->mdfld_had_event_callbacks) - (HAD_EVENT_HOT_UNPLUG, dev_priv->had_pvt_data); drm_sysfs_hotplug_event(dev_priv->dev); } #endif diff --git a/drivers/staging/mrst/drv/psb_intel_hdmi.c b/drivers/staging/mrst/drv/psb_intel_hdmi.c index f6acb96..8d519dc 100644 --- a/drivers/staging/mrst/drv/psb_intel_hdmi.c +++ b/drivers/staging/mrst/drv/psb_intel_hdmi.c @@ -805,7 +805,8 @@ static void mdfld_hdmi_dpms(struct drm_encoder *encoder, int mode) if (mode != DRM_MODE_DPMS_ON) { if (dev_priv->mdfld_had_event_callbacks - && !dev_priv->bDVIport) + && !dev_priv->bDVIport + && !dev_priv->bhdmiconnected) (*dev_priv->mdfld_had_event_callbacks) (HAD_EVENT_HOT_UNPLUG, dev_priv->had_pvt_data); @@ -822,7 +823,8 @@ static void mdfld_hdmi_dpms(struct drm_encoder *encoder, int mode) hdmib | HDMIB_PORT_EN); if (dev_priv->mdfld_had_event_callbacks - && !dev_priv->bDVIport) + && !dev_priv->bDVIport + && dev_priv->bhdmiconnected) (*dev_priv->mdfld_had_event_callbacks) (HAD_EVENT_HOT_PLUG, dev_priv->had_pvt_data); }