]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/probe-helper: Cancel previous job before starting new one
authorDom Cobley <popcornmix@gmail.com>
Fri, 27 Jan 2023 15:40:52 +0000 (16:40 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 May 2023 09:11:39 +0000 (11:11 +0200)
commit74400353bdeb0e79f0e1ceeb86239503cf05f07e
tree9820340da6bfae395a8b51b3349459f9903dfcc3
parent0f04e217cafd480433a8f707d467d1da7cf4109a
drm/probe-helper: Cancel previous job before starting new one

[ Upstream commit a8e47884f1906cd7440fafa056adc8817568e73e ]

Currently we schedule a call to output_poll_execute from
drm_kms_helper_poll_enable for 10s in future. Later we try to replace
that in drm_helper_probe_single_connector_modes with a 0s schedule with
delayed_event set.

But as there is already a job in the queue this fails, and the immediate
job we wanted with delayed_event set doesn't occur until 10s later.

And that call acts as if connector state has changed, reprobing modes.
This has a side effect of waking up a display that has been blanked.

Make sure we cancel the old job before submitting the immediate one.

Fixes: 162b6a57ac50 ("drm/probe-helper: don't lose hotplug event")
Acked-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
[Maxime: Switched to mod_delayed_work]
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20230127154052.452524-1-maxime@cerno.tech
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/drm_probe_helper.c