Commit 7ce19535 authored by Thomas Zimmermann's avatar Thomas Zimmermann

drm/fb-helper: Always initialize generic fbdev emulation

Initialize the generic fbdev emulation even if it has been disabled
on the kernel command line. The hotplug and mode initialization will
fail accordingly.

The kernel parameter can still be changed at runtime and the emulation
will initialize after hotplugging the connector.
Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: default avatarJavier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221103151446.2638-20-tzimmermann@suse.de
parent 93e81e38
......@@ -526,11 +526,6 @@ int drm_fb_helper_init(struct drm_device *dev,
{
int ret;
if (!drm_fbdev_emulation) {
dev->fb_helper = fb_helper;
return 0;
}
/*
* If this is not the generic fbdev client, initialize a drm_client
* without callbacks so we can use the modesets.
......@@ -2716,9 +2711,6 @@ void drm_fbdev_generic_setup(struct drm_device *dev,
drm_WARN(dev, !dev->registered, "Device has not been registered.\n");
drm_WARN(dev, dev->fb_helper, "fb_helper is already set!\n");
if (!drm_fbdev_emulation)
return;
fb_helper = kzalloc(sizeof(*fb_helper), GFP_KERNEL);
if (!fb_helper) {
drm_err(dev, "Failed to allocate fb_helper\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment