summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/i915_irq.c
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2015-05-28 15:43:49 +0300
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-05-29 11:15:29 +0300
commit641a969eff3ffb01088736ef9531caffe38a6fd9 (patch)
tree6527d8989dc1cba5c4481ed813ae47a36e35de28 /drivers/gpu/drm/i915/i915_irq.c
parentc91711f93f7102c4c71896b6e9273f222bf31989 (diff)
downloadlinux-641a969eff3ffb01088736ef9531caffe38a6fd9.tar.xz
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: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_irq.c')
-rw-r--r--drivers/gpu/drm/i915/i915_irq.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index ad8897828b0c..536e97381cef 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -1478,8 +1478,10 @@ static void intel_hpd_irq_handler(struct drm_device *dev,
}
for_each_hpd_pin(i) {
- if (hpd[i] & hotplug_trigger &&
- dev_priv->hotplug.stats[i].state == HPD_DISABLED) {
+ if (!(hpd[i] & hotplug_trigger))
+ continue;
+
+ if (dev_priv->hotplug.stats[i].state == HPD_DISABLED) {
/*
* On GMCH platforms the interrupt mask bits only
* prevent irq generation, not the setting of the
@@ -1493,8 +1495,7 @@ static void intel_hpd_irq_handler(struct drm_device *dev,
continue;
}
- if (!(hpd[i] & hotplug_trigger) ||
- dev_priv->hotplug.stats[i].state != HPD_ENABLED)
+ if (dev_priv->hotplug.stats[i].state != HPD_ENABLED)
continue;
if (!(dig_port_mask & hpd[i])) {