]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-6.6/drm-check-polling-initialized-before-enabling-in-drm_helper_probe_single_connector_modes.patch
6.6-stable patches
[thirdparty/kernel/stable-queue.git] / queue-6.6 / drm-check-polling-initialized-before-enabling-in-drm_helper_probe_single_connector_modes.patch
1 From 048a36d8a6085bbd8ab9e5794b713b92ac986450 Mon Sep 17 00:00:00 2001
2 From: Shradha Gupta <shradhagupta@linux.microsoft.com>
3 Date: Thu, 1 Feb 2024 22:43:44 -0800
4 Subject: drm: Check polling initialized before enabling in drm_helper_probe_single_connector_modes
5
6 From: Shradha Gupta <shradhagupta@linux.microsoft.com>
7
8 commit 048a36d8a6085bbd8ab9e5794b713b92ac986450 upstream.
9
10 In function drm_helper_probe_single_connector_modes() when we enable
11 polling again, if it is already uninitialized, a warning is reported.
12 This patch fixes the warning message by checking if poll is initialized
13 before enabling it.
14
15 Reported-by: kernel test robot <oliver.sang@intel.com>
16 Closes: https://lore.kernel.org/oe-lkp/202401191128.db8423f1-oliver.sang@intel.com
17 Signed-off-by: Shradha Gupta <shradhagupta@linux.microsoft.com>
18 Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
19 Link: https://patchwork.freedesktop.org/patch/msgid/1706856224-9725-1-git-send-email-shradhagupta@linux.microsoft.com
20 Cc: Holger Hoffstätte <holger@applied-asynchrony.com>
21 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22 ---
23 drivers/gpu/drm/drm_probe_helper.c | 8 ++++++--
24 1 file changed, 6 insertions(+), 2 deletions(-)
25
26 --- a/drivers/gpu/drm/drm_probe_helper.c
27 +++ b/drivers/gpu/drm/drm_probe_helper.c
28 @@ -629,8 +629,12 @@ retry:
29 0);
30 }
31
32 - /* Re-enable polling in case the global poll config changed. */
33 - drm_kms_helper_poll_enable(dev);
34 + /*
35 + * Re-enable polling in case the global poll config changed but polling
36 + * is still initialized.
37 + */
38 + if (dev->mode_config.poll_enabled)
39 + drm_kms_helper_poll_enable(dev);
40
41 if (connector->status == connector_status_disconnected) {
42 DRM_DEBUG_KMS("[CONNECTOR:%d:%s] disconnected\n",