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 <shreyasx.neerebailoor@intel.com>
Reviewed-on: http://android.intel.com:8080/38149
Reviewed-by: Xu, Randy <randy.xu@intel.com>
Reviewed-by: Agarwal, Vaibhav <vaibhav.agarwal@intel.com>
Tested-by: Xu, Randy <randy.xu@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
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
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);
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);
}