Commit 641a969e authored by Jani Nikula's avatar Jani Nikula Committed by Daniel Vetter

drm/i915: simplify conditions for skipping the 2nd hpd loop iterations

Multiple positive and negative checks for hpd[i] & hotplug_trigger gets
hard to read. Simplify. This should make follow-up patches merging the
two loops easier. No functional changes.
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Reviewed-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent c91711f9
...@@ -1478,8 +1478,10 @@ static void intel_hpd_irq_handler(struct drm_device *dev, ...@@ -1478,8 +1478,10 @@ static void intel_hpd_irq_handler(struct drm_device *dev,
} }
for_each_hpd_pin(i) { for_each_hpd_pin(i) {
if (hpd[i] & hotplug_trigger && if (!(hpd[i] & hotplug_trigger))
dev_priv->hotplug.stats[i].state == HPD_DISABLED) { continue;
if (dev_priv->hotplug.stats[i].state == HPD_DISABLED) {
/* /*
* On GMCH platforms the interrupt mask bits only * On GMCH platforms the interrupt mask bits only
* prevent irq generation, not the setting of the * prevent irq generation, not the setting of the
...@@ -1493,8 +1495,7 @@ static void intel_hpd_irq_handler(struct drm_device *dev, ...@@ -1493,8 +1495,7 @@ static void intel_hpd_irq_handler(struct drm_device *dev,
continue; continue;
} }
if (!(hpd[i] & hotplug_trigger) || if (dev_priv->hotplug.stats[i].state != HPD_ENABLED)
dev_priv->hotplug.stats[i].state != HPD_ENABLED)
continue; continue;
if (!(dig_port_mask & hpd[i])) { if (!(dig_port_mask & hpd[i])) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment