From: JaeJoon Jung <rgbi3307@gmail.com>
To: David Airlie <airlied@gmail.com>,
Jesse Barnes <jesse.barnes@intel.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
Daniel Vetter <daniel@ffwll.ch>,
Bob Beckett <bob.beckett@collabora.com>
Cc: JaeJoon Jung <rgbi3307@gmail.com>, linux-kernel@vger.kernel.org
Subject: [PATCH] drm_fb_helper: Reduce duplicated execution of the drm_fb_helper_hotplug_event()
Date: Tue, 18 Mar 2025 14:46:38 +0900 [thread overview]
Message-ID: <20250318054640.249840-1-rgbi3307@gmail.com> (raw)
If drm_fb_helper->fb_info is already set,
Add an if condition as below to execute the hotplug event
only when the system_state is SYSTEM_RUNNING.
This will reduce duplicate execution.
In particular, It can prevent drm_fb_helper_hotplug_event()
from being executed repeatedly at booting time.
Signed-off-by: JaeJoon Jung <rgbi3307@gmail.com>
---
drivers/gpu/drm/drm_fb_helper.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index fb3614a7ba44..c042e5a2e046 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -1939,6 +1939,9 @@ int drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper)
if (!drm_fbdev_emulation || !fb_helper)
return 0;
+ if (fb_helper->info && system_state != SYSTEM_RUNNING)
+ return 0;
+
mutex_lock(&fb_helper->lock);
if (fb_helper->deferred_setup) {
err = __drm_fb_helper_initial_config_and_unlock(fb_helper);
--
2.43.0
reply other threads:[~2025-03-18 5:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20250318054640.249840-1-rgbi3307@gmail.com \
--to=rgbi3307@gmail.com \
--cc=airlied@gmail.com \
--cc=bob.beckett@collabora.com \
--cc=daniel@ffwll.ch \
--cc=jesse.barnes@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=tzimmermann@suse.de \
/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
all inboxes | Powered by JetHome®