drm_probe_helper: Cancel previous job before starting new one
authorDom Cobley <popcornmix@gmail.com>
Thu, 8 Dec 2022 17:21:00 +0000 (17:21 +0000)
committerPhil Elwell <8911409+pelwell@users.noreply.github.com>
Wed, 11 Jan 2023 15:22:45 +0000 (15:22 +0000)
commitd1d8e54defd22f2c4da71f1e9ce170f0e712bd41
tree14f8680d8ebc75d9a669b0de932da34bc7d37567
parent82efd01771e9d04d6016f6b00ff7ecac89d9d869
drm_probe_helper: Cancel previous job before starting new one

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.

Signed-off-by: Dom Cobley <popcornmix@gmail.com>
drivers/gpu/drm/drm_probe_helper.c