diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-04-15 01:48:12 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-04-15 01:48:12 +0000 |
commit | 7cdc9d7627f7d1ac10257f5076115990b4dd13cb (patch) | |
tree | 4b6f0809a68800a8e808a0d3f4ea8601a1738b44 | |
parent | bb357996a0a77f2d04938c23ee300f4831cdfa2b (diff) |
drm: Check polling initialized before enabling in drm_helper_probe_single_connector_modes
From Shradha Gupta
5c1dc516f52a5a0c0370086509ec12e6c3acb428 in linux-6.6.y/6.6.27
048a36d8a6085bbd8ab9e5794b713b92ac986450 in mainline linux
-rw-r--r-- | sys/dev/pci/drm/drm_probe_helper.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/drm_probe_helper.c b/sys/dev/pci/drm/drm_probe_helper.c index fd7deaa754d..da3d8e3eeaa 100644 --- a/sys/dev/pci/drm/drm_probe_helper.c +++ b/sys/dev/pci/drm/drm_probe_helper.c @@ -629,8 +629,12 @@ retry: 0); } - /* Re-enable polling in case the global poll config changed. */ - drm_kms_helper_poll_enable(dev); + /* + * Re-enable polling in case the global poll config changed but polling + * is still initialized. + */ + if (dev->mode_config.poll_enabled) + drm_kms_helper_poll_enable(dev); if (connector->status == connector_status_disconnected) { DRM_DEBUG_KMS("[CONNECTOR:%d:%s] disconnected\n", |