[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250318054640.249840-1-rgbi3307@gmail.com>
Date: Tue, 18 Mar 2025 14:46:38 +0900
From: JaeJoon Jung <rgbi3307@...il.com>
To: David Airlie <airlied@...il.com>,
Jesse Barnes <jesse.barnes@...el.com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
Daniel Vetter <daniel@...ll.ch>,
Bob Beckett <bob.beckett@...labora.com>
Cc: JaeJoon Jung <rgbi3307@...il.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH] drm_fb_helper: Reduce duplicated execution of the drm_fb_helper_hotplug_event()
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@...il.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
Powered by blists - more mailing lists