Skip to contentSkip to conversation

drm/probe_helper: warning on poll_enabled for issue catching

PATCH In review Guchun Chen 2 participants 2 messages Mar 8, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 drm/probe_helper: warning on poll_enabled for issue catching

In order to catch issues in other drivers to ensure proper call sequence of polling function.

Fixes a4e771729a51("drm/probe_helper: sort out poll_running vs poll_enabled")
---
 drivers/gpu/drm/drm_probe_helper.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/drm_probe_helper.c +2 -0
index 8127be134c39..85e0e80d4a52 100644
@@ -852,6 +852,8 @@ EXPORT_SYMBOL(drm_kms_helper_is_poll_worker);
  */
 void drm_kms_helper_poll_disable(struct drm_device *dev)
 {
+	WARN_ON(!dev->mode_config.poll_enabled);
+
 	if (dev->mode_config.poll_running)
 		drm_kms_helper_disable_hpd(dev);
 
Signature · 1 line
2.25.1
#1 lore raw
Quoted 5 lines · Guchun Chen

In order to catch issues in other drivers to ensure proper call sequence of polling function.

Fixes a4e771729a51("drm/probe_helper: sort out poll_running vs poll_enabled")

How does an additional warning "fix" anything?

Quoted 12 lines
---
 drivers/gpu/drm/drm_probe_helper.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/drm_probe_helper.c +0 -0
index 8127be134c39..85e0e80d4a52 100644

drivers/gpu/drm/drm_probe_helper.c EXPORT_SYMBOL(drm_kms_helper_is_poll_worker); · line 855

Quoted 4 lines
drivers/gpu/drm/drm_probe_helper.c +1 -0
@@ -852,6 +852,8 @@ EXPORT_SYMBOL(drm_kms_helper_is_poll_worker);
  */
 void drm_kms_helper_poll_disable(struct drm_device *dev)
 {
+	WARN_ON(!dev->mode_config.poll_enabled);

drm_WARN_ON() please.

Quoted 3 lines
drivers/gpu/drm/drm_probe_helper.c +1 -0
+
 	if (dev->mode_config.poll_running)
 		drm_kms_helper_disable_hpd(dev);
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center