diff options
author | Dave Airlie <airlied@redhat.com> | 2014-05-02 13:44:18 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2014-07-21 16:48:58 +1000 |
commit | 36cd7444c044806cd2a4e450a8385597221d5d25 (patch) | |
tree | f10068f47dd96af9ed84bdb2adeff950a4e601d1 /drivers/gpu/drm/i915/i915_irq.c | |
parent | 44905a27dd01f2bddd96664d0ab7da43a07f4d5a (diff) | |
download | op-kernel-dev-36cd7444c044806cd2a4e450a8385597221d5d25.zip op-kernel-dev-36cd7444c044806cd2a4e450a8385597221d5d25.tar.gz |
drm/i915: check connector->encoder before using it.
DP MST will need connectors that aren't connected to specific
encoders, add some checks in advance to avoid oopses.
Reviewed-by: Todd Previte <tprevite@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_irq.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_irq.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 026f0a3..12d77b5 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -1165,6 +1165,8 @@ static void i915_hotplug_work_func(struct work_struct *work) dev_priv->hpd_event_bits = 0; list_for_each_entry(connector, &mode_config->connector_list, head) { intel_connector = to_intel_connector(connector); + if (!intel_connector->encoder) + continue; intel_encoder = intel_connector->encoder; if (intel_encoder->hpd_pin > HPD_NONE && dev_priv->hpd_stats[intel_encoder->hpd_pin].hpd_mark == HPD_MARK_DISABLED && @@ -1195,6 +1197,8 @@ static void i915_hotplug_work_func(struct work_struct *work) list_for_each_entry(connector, &mode_config->connector_list, head) { intel_connector = to_intel_connector(connector); + if (!intel_connector->encoder) + continue; intel_encoder = intel_connector->encoder; if (hpd_event_bits & (1 << intel_encoder->hpd_pin)) { if (intel_encoder->hot_plug) |