From: Jani Nikula Date: Thu, 28 May 2015 12:43:51 +0000 (+0300) Subject: drm/i915: merge the two hpd loops in intel_hpd_irq_handler to one X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9ace043310ba4875e08863b9f31f429d853685f2;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/i915: merge the two hpd loops in intel_hpd_irq_handler to one Nothing in the two consecutive loops over hpd pins depends on state in a larger context than the single hpd pin. If we skip the rest of the loop on short hpd pulses, we can merge the two loops into one. Signed-off-by: Jani Nikula Reviewed-by: Paulo Zanoni Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 4840b21c1869..b53b91744a17 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -1463,22 +1463,17 @@ static void intel_hpd_irq_handler(struct drm_device *dev, * For long HPD pulses we want to have the digital queue happen, * but we still want HPD storm detection to function. */ + queue_dig = true; if (long_hpd) { dev_priv->hotplug.long_port_mask |= (1 << port); + /* FIXME: this can be simplified. */ dig_port_mask |= hpd[i]; } else { /* for short HPD just trigger the digital queue */ dev_priv->hotplug.short_port_mask |= (1 << port); - hotplug_trigger &= ~hpd[i]; + continue; } - - queue_dig = true; } - } - - for_each_hpd_pin(i) { - if (!(hpd[i] & hotplug_trigger)) - continue; if (dev_priv->hotplug.stats[i].state == HPD_DISABLED) { /*