aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShradha Gupta <[email protected]>2024-02-01 22:43:44 -0800
committerDaniel Vetter <[email protected]>2024-02-28 15:07:22 +0100
commit048a36d8a6085bbd8ab9e5794b713b92ac986450 (patch)
tree3b7afa63a20eb887eaa35a7f987af325e42c97b2
parent5abffb66d12bcac84bf7b66389c571b8bb6e82bd (diff)
drm: Check polling initialized before enabling in drm_helper_probe_single_connector_modes
In function drm_helper_probe_single_connector_modes() when we enable polling again, if it is already uninitialized, a warning is reported. This patch fixes the warning message by checking if poll is initialized before enabling it. Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-lkp/[email protected] Signed-off-by: Shradha Gupta <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/1706856224-9725-1-git-send-email-shradhagupta@linux.microsoft.com
-rw-r--r--drivers/gpu/drm/drm_probe_helper.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
index 87d78d8206ff..19ecb749704b 100644
--- a/drivers/gpu/drm/drm_probe_helper.c
+++ b/drivers/gpu/drm/drm_probe_helper.c
@@ -622,8 +622,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",