@@ -797,7 +797,8 @@ void intel_crt_init(struct drm_device *dev)
*/
crt->force_hotplug_required = 0;
- dev_priv->hotplug_supported_mask |= intel_crt_hotplug_int_status(dev);
+ intel_connector->hpd_status_bit = intel_crt_hotplug_int_status(dev);
+ dev_priv->hotplug_supported_mask |= intel_connector->hpd_status_bit;
/*
* TODO: find a proper way to discover whether we need to set the
@@ -2766,7 +2766,8 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
WARN(1, "Invalid port %c\n", port_name(port));
break;
}
- dev_priv->hotplug_supported_mask |= intel_hotplug_int_status(dev, port);
+ intel_connector->hpd_status_bit = intel_hotplug_int_status(dev, port);
+ dev_priv->hotplug_supported_mask |= intel_connector->hpd_status_bit;
if (is_edp(intel_dp))
intel_dp_init_panel_power_sequencer(dev, intel_dp);
@@ -191,6 +191,9 @@ struct intel_connector {
/* Cached EDID for eDP and LVDS. May hold ERR_PTR for invalid EDID. */
struct edid *edid;
+
+ /* hpd status bit for this connector */
+ u32 hpd_status_bit;
};
struct intel_crtc {
@@ -992,7 +992,8 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,
default:
BUG();
}
- dev_priv->hotplug_supported_mask |= intel_hotplug_int_status(dev, port);
+ intel_connector->hpd_status_bit = intel_hotplug_int_status(dev, port);
+ dev_priv->hotplug_supported_mask |= intel_connector->hpd_status_bit;
if (!HAS_PCH_SPLIT(dev)) {
intel_hdmi->write_infoframe = g4x_write_infoframe;
@@ -2697,6 +2697,7 @@ bool intel_sdvo_init(struct drm_device *dev, uint32_t sdvo_reg, bool is_sdvob)
struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_encoder *intel_encoder;
struct intel_sdvo *intel_sdvo;
+ struct drm_connector *connector;
u32 hotplug_mask;
int i;
@@ -2749,8 +2750,16 @@ bool intel_sdvo_init(struct drm_device *dev, uint32_t sdvo_reg, bool is_sdvob)
/* Only enable the hotplug irq if we need it, to work around noisy
* hotplug lines.
*/
- if (intel_sdvo->hotplug_active)
+ if (intel_sdvo->hotplug_active) {
dev_priv->hotplug_supported_mask |= hotplug_mask;
+ list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
+ struct intel_connector *intel_connector = to_intel_connector(connector);
+ if (intel_connector->encoder == intel_encoder) {
+ intel_connector->hpd_status_bit = hotplug_mask;
+ break;
+ }
+ }
+ }
intel_sdvo_select_ddc_bus(dev_priv, intel_sdvo, sdvo_reg);
To be able to map an HPD interrupt to a connector add the hpd status bit to the intel_connector structure. Signed-off-by: Egbert Eich <eich@suse.de> --- drivers/gpu/drm/i915/intel_crt.c | 3 ++- drivers/gpu/drm/i915/intel_dp.c | 3 ++- drivers/gpu/drm/i915/intel_drv.h | 3 +++ drivers/gpu/drm/i915/intel_hdmi.c | 3 ++- drivers/gpu/drm/i915/intel_sdvo.c | 11 ++++++++++- 5 files changed, 19 insertions(+), 4 deletions(-)