Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9ace0433 authored by Jani Nikula's avatar Jani Nikula Committed by Daniel Vetter
Browse files

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: 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 ab68d5bb
Loading
Loading
Loading
Loading
+3 −8
Original line number Diff line number Diff line
@@ -1463,23 +1463,18 @@ 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];
			}

			queue_dig = true;
				continue;
			}
		}

	for_each_hpd_pin(i) {
		if (!(hpd[i] & hotplug_trigger))
			continue;

		if (dev_priv->hotplug.stats[i].state == HPD_DISABLED) {
			/*
			 * On GMCH platforms the interrupt mask bits only