diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2023-02-09 14:55:03 +0100 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2023-02-20 14:56:45 +0100 |
commit | 089d924d03d5c17b05d02992f57671ccfba1c4f0 (patch) | |
tree | 962040f66e74e579f96102cc4454c78719370e24 /drivers/video | |
parent | cbfb2632003d4e0bb3bc69b9ba5e39621f8aa45b (diff) | |
download | linux-stable-089d924d03d5c17b05d02992f57671ccfba1c4f0.tar.gz linux-stable-089d924d03d5c17b05d02992f57671ccfba1c4f0.tar.bz2 linux-stable-089d924d03d5c17b05d02992f57671ccfba1c4f0.zip |
fbdev: Read video= option with fb_get_option() in modedb
Get the kernel's global video= parameter with fb_get_option(). Done
to unexport the internal fbdev state fb_mode_config. No functional
changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230209135509.7786-6-tzimmermann@suse.de
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/fbdev/core/modedb.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/video/fbdev/core/modedb.c b/drivers/video/fbdev/core/modedb.c index 6473e0dfe146..23cf8eba785d 100644 --- a/drivers/video/fbdev/core/modedb.c +++ b/drivers/video/fbdev/core/modedb.c @@ -620,6 +620,7 @@ int fb_find_mode(struct fb_var_screeninfo *var, const struct fb_videomode *default_mode, unsigned int default_bpp) { + char *mode_option_buf = NULL; int i; /* Set up defaults */ @@ -635,8 +636,10 @@ int fb_find_mode(struct fb_var_screeninfo *var, default_bpp = 8; /* Did the user specify a video mode? */ - if (!mode_option) - mode_option = fb_mode_option; + if (!mode_option) { + fb_get_options(NULL, &mode_option_buf); + mode_option = mode_option_buf; + } if (mode_option) { const char *name = mode_option; unsigned int namelen = strlen(name); @@ -715,6 +718,7 @@ int fb_find_mode(struct fb_var_screeninfo *var, res_specified = 1; } done: + kfree(mode_option_buf); if (cvt) { struct fb_videomode cvt_mode; int ret; |