In order to catch issues in other drivers to ensure proper call sequence of polling function. v2: drop Fixes tag in commit message (Bert & Jani) v3: use drm_WARN_ON instead of WARN_ON (Jani) Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2411 Reported-by: Bert Karwatzki <spasswolf@xxxxxx> Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx> Signed-off-by: Guchun Chen <guchun.chen@xxxxxxx> --- drivers/gpu/drm/drm_probe_helper.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c index 8127be134c39..d812a4e91760 100644 --- a/drivers/gpu/drm/drm_probe_helper.c +++ b/drivers/gpu/drm/drm_probe_helper.c @@ -852,6 +852,8 @@ EXPORT_SYMBOL(drm_kms_helper_is_poll_worker); */ void drm_kms_helper_poll_disable(struct drm_device *dev) { + drm_WARN_ON(dev, !dev->mode_config.poll_enabled); + if (dev->mode_config.poll_running) drm_kms_helper_disable_hpd(dev); -- 2.25.1