summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/display/intel_hotplug.c
diff options
context:
space:
mode:
authorJouni Högander <jouni.hogander@intel.com>2022-06-10 11:54:28 +0300
committerJani Nikula <jani.nikula@intel.com>2022-06-16 13:15:39 +0300
commit04770b082e2a207804c633fbfd5efec28cbc5673 (patch)
tree065d13dbcee9b45009d2fbd7d9a3e88011fe1942 /drivers/gpu/drm/i915/display/intel_hotplug.c
parenteb2983c09f4e053f2c3362763f5e1073b5e4cd7d (diff)
drm/i915: Do not start connector polling if display is disabled
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
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_hotplug.c')
-rw-r--r--drivers/gpu/drm/i915/display/intel_hotplug.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_hotplug.c b/drivers/gpu/drm/i915/display/intel_hotplug.c
index 8204126d17f9..5f8b4f481cff 100644
--- a/drivers/gpu/drm/i915/display/intel_hotplug.c
+++ b/drivers/gpu/drm/i915/display/intel_hotplug.c
@@ -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);