From: Shradha Gupta <shradhagupta@linux.microsoft.com>
To: linux-kernel@vger.kernel.org,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.dev>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
dri-devel@lists.freedesktop.org,
Saurabh Singh Sengar <ssengar@linux.microsoft.com>
Cc: Shradha Gupta <shradhagupta@linux.microsoft.com>,
Shradha Gupta <shradhagupta@microsoft.com>
Subject: [PATCH v4, 2/2] drm: Check polling initialized before enabling in drm_helper_probe_single_connector_modes
Date: Thu, 1 Feb 2024 22:43:44 -0800 [thread overview]
Message-ID: <1706856224-9725-1-git-send-email-shradhagupta@linux.microsoft.com> (raw)
In-Reply-To: <1706856176-9483-1-git-send-email-shradhagupta@linux.microsoft.com>
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 <oliver.sang@intel.com>
Closes: https://lore.kernel.org/oe-lkp/202401191128.db8423f1-oliver.sang@intel.com
Signed-off-by: Shradha Gupta <shradhagupta@linux.microsoft.com>
---
Changes in v4
* Clubbed this patch with similar patches and added a cover letter
---
drivers/gpu/drm/drm_probe_helper.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
index bd76603dc387..30e6063535cd 100644
--- a/drivers/gpu/drm/drm_probe_helper.c
+++ b/drivers/gpu/drm/drm_probe_helper.c
@@ -622,8 +622,12 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
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",
--
2.34.1
next prev parent reply other threads:[~2024-02-02 6:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-02 6:42 [PATCH v4 0/2] drm: Check polling initialized before Shradha Gupta
2024-02-02 6:43 ` [PATCH v4, 1/2] drm: Check output polling initialized before disabling Shradha Gupta
2024-02-02 6:43 ` Shradha Gupta [this message]
2024-02-06 14:07 ` [PATCH v4 0/2] drm: Check polling initialized before Daniel Vetter
2024-02-20 6:02 ` Shradha Gupta
2024-02-28 14:08 ` Daniel Vetter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1706856224-9725-1-git-send-email-shradhagupta@linux.microsoft.com \
--to=shradhagupta@linux.microsoft.com \
--cc=airlied@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=shradhagupta@microsoft.com \
--cc=ssengar@linux.microsoft.com \
--cc=tzimmermann@suse.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox