Skip to content

Commit 72e6d66

Browse files
committed
drm: Fix output poll work for drm_kms_helper_poll=n
If drm_kms_helper_poll=n the output poll work will only get scheduled from drm_helper_probe_single_connector_modes() to handle a delayed hotplug event. Since polling is disabled the work in this case should just call drm_kms_helper_hotplug_event() w/o detecting the state of connectors and rescheduling the work. After commit d33a54e after a delayed hotplug event above the connectors did get re-detected in the poll work and the work got re-scheduled periodically (since poll_running is also false if drm_kms_helper_poll=n), in effect ignoring the drm_kms_helper_poll=n kernel param. Fix the above by calling only drm_kms_helper_hotplug_event() for a delayed hotplug event if drm_kms_helper_hotplug_event=n, as was done before d33a54e. Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Fixes: d33a54e ("drm/probe_helper: sort out poll_running vs poll_enabled") Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240301152243.1670573-1-imre.deak@intel.com
1 parent c707033 commit 72e6d66

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

drivers/gpu/drm/drm_probe_helper.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -760,9 +760,11 @@ static void output_poll_execute(struct work_struct *work)
760760
changed = dev->mode_config.delayed_event;
761761
dev->mode_config.delayed_event = false;
762762

763-
if (!drm_kms_helper_poll && dev->mode_config.poll_running) {
764-
drm_kms_helper_disable_hpd(dev);
765-
dev->mode_config.poll_running = false;
763+
if (!drm_kms_helper_poll) {
764+
if (dev->mode_config.poll_running) {
765+
drm_kms_helper_disable_hpd(dev);
766+
dev->mode_config.poll_running = false;
767+
}
766768
goto out;
767769
}
768770

0 commit comments

Comments
 (0)