drm_fb_helper: Reduce duplicated execution of the drm_fb_helper_hotplug_event()
Subsystems (2)
PATCH 1/1 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 <[email protected]>
--- drivers/gpu/drm/drm_fb_helper.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/drm_fb_helper.c +3 -0
@@ -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);
Signature · 1 line
2.43.0