drm/i915: Do not start connector polling if display is disabled
authorJouni Högander <jouni.hogander@intel.com>
Fri, 10 Jun 2022 08:54:28 +0000 (11:54 +0300)
committerJani Nikula <jani.nikula@intel.com>
Thu, 16 Jun 2022 10:15:39 +0000 (13:15 +0300)
Currently we are starting connector polling if display is disabled
using disable_display module parameter. Polling is just returning
always "not connected" state. This can be optimized by not starting
polling at all.

Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220610085429.52935-3-jouni.hogander@intel.com
drivers/gpu/drm/i915/display/intel_hotplug.c

index 8204126..5f8b4f4 100644 (file)
@@ -668,7 +668,8 @@ static void i915_hpd_poll_init_work(struct work_struct *work)
  */
 void intel_hpd_poll_enable(struct drm_i915_private *dev_priv)
 {
-       if (!HAS_DISPLAY(dev_priv))
+       if (!HAS_DISPLAY(dev_priv) ||
+           !INTEL_DISPLAY_ENABLED(dev_priv))
                return;
 
        WRITE_ONCE(dev_priv->hotplug.poll_enabled, true);