]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/i915/hpd: Let an HPD pin be in the disabled state when handling missed IRQs
authorImre Deak <imre.deak@intel.com>
Tue, 4 Mar 2025 15:29:13 +0000 (17:29 +0200)
committerImre Deak <imre.deak@intel.com>
Tue, 11 Mar 2025 09:15:22 +0000 (11:15 +0200)
After suspending and resuming the detection on connectors, HPD IRQs that
arrived while the detection was suspended, are handled by scheduling the
intel_hotplug::hotplug work for them. All HPD pins must be at this point
in either the HPD_ENABLED (set for all pins during driver loading/system
resuming) or HPD_MARK_DISABLED (set by IRQ storm detection) state: the
HPD_DISABLED state for a pin can be set only from the HPD_MARK_DISABLED
state by the hotplug work after a storm detection (enabling polling on
the given pin/connector), however the hotplug work won't be scheduled
while the detection is suspended.

A follow-up change will add support for blocking the HPD IRQ handling
on a given HPD pin (without disabling the IRQ generation on it), after
which it becomes possible to see a pin in the HPD_DISABLED state when
unblocking the IRQ handling (since the blocking could've happened for an
already disabled pin). Adjust queue_work_for_missed_irqs() accordingly,
so that this function can be reused for unblocking the IRQ handling.

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250304152917.3407080-3-imre.deak@intel.com
drivers/gpu/drm/i915/display/intel_hotplug.c

index 9692b5c01aea919ac69764de1886ee974b0412e1..3fb5feeefa1444d1f8eca9e1240e34ba0f6f2694 100644 (file)
@@ -980,6 +980,7 @@ static void queue_work_for_missed_irqs(struct drm_i915_private *i915)
                case HPD_MARK_DISABLED:
                        queue_work = true;
                        break;
+               case HPD_DISABLED:
                case HPD_ENABLED:
                        break;
                default: