aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-01-05 21:15:37 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2019-01-05 21:15:37 -0500
commita8a6b1186b1a209647483c2ff81e0d59c43dbdd3 (patch)
treeeb3ad98f494d183c4174be1e2f16fa55442d45b9
parent7671c14e6aca7a816a29a85eba47d9bccb7d23ae (diff)
parent399382f8018204407174f0229b4087d40e1cdc82 (diff)
Merge tag 'fbdev-v4.21' of git://github.com/bzolnier/linux
Pull fbdev updates from Bartlomiej Zolnierkiewicz: "This time the pull request is really small. The most notable changes are fixing fbcon to not cause crash on unregister_framebuffer() operation when there is more than one framebuffer, adding config option to center the bootup logo and making FB_BACKLIGHT config option tristate (which in turn uncovered incorrect FB_BACKLIGHT usage by DRM's nouveau driver). Summary: - fix fbcon to not cause crash on unregister_framebuffer() when there is more than one framebuffer (Noralf Trønnes) - improve support for small rotated displays (Peter Rosin) - fix probe failure handling in udlfb driver (Dan Carpenter) - add config option to center the bootup logo (Peter Rosin) - make FB_BACKLIGHT config option tristate (Rob Clark) - remove superfluous HAS_DMA dependency for goldfishfb driver (Geert Uytterhoeven) - misc fixes (Alexey Khoroshilov, YueHaibing, Colin Ian King, Lubomir Rintel) - misc cleanups (Yangtao Li, Wen Yang) also there is DRM's nouveau driver fix for wrong FB_BACKLIGHT config option usage (FB_BACKLIGHT is for internal fbdev subsystem use only)" * tag 'fbdev-v4.21' of git://github.com/bzolnier/linux: drm/nouveau: fix incorrect FB_BACKLIGHT usage in Kconfig fbdev: fbcon: Fix unregister crash when more than one framebuffer fbdev: Remove depends on HAS_DMA in case of platform dependency pxa168fb: trivial typo fix fbdev: fsl-diu: remove redundant null check on cmap fbdev: omap2: omapfb: convert to DEFINE_SHOW_ATTRIBUTE fbdev: uvesafb: fix spelling mistake "memoery" -> "memory" fbdev: fbmem: add config option to center the bootup logo fbdev: fbmem: make fb_show_logo_line return the end instead of the height video: fbdev: pxafb: Fix "WARNING: invalid free of devm_ allocated data" fbdev: fbmem: behave better with small rotated displays and many CPUs video: clps711x-fb: release disp device node in probe() fbdev: make FB_BACKLIGHT a tristate udlfb: fix some inconsistent NULL checking
-rw-r--r--drivers/gpu/drm/nouveau/Kconfig3
-rw-r--r--drivers/video/fbdev/Kconfig5
-rw-r--r--drivers/video/fbdev/clps711x-fb.c5
-rw-r--r--drivers/video/fbdev/core/fbcon.c2
-rw-r--r--drivers/video/fbdev/core/fbmem.c39
-rw-r--r--drivers/video/fbdev/core/fbsysfs.c8
-rw-r--r--drivers/video/fbdev/fsl-diu-fb.c3
-rw-r--r--drivers/video/fbdev/omap2/omapfb/dss/core.c18
-rw-r--r--drivers/video/fbdev/pxa168fb.c2
-rw-r--r--drivers/video/fbdev/pxafb.c4
-rw-r--r--drivers/video/fbdev/udlfb.c14
-rw-r--r--drivers/video/fbdev/uvesafb.c2
-rw-r--r--drivers/video/logo/Kconfig9
-rw-r--r--include/linux/fb.h2
-rw-r--r--include/uapi/linux/fb.h2
15 files changed, 71 insertions, 47 deletions
diff --git a/drivers/gpu/drm/nouveau/Kconfig b/drivers/gpu/drm/nouveau/Kconfig
index 4b75ad40dd80..432c440223bb 100644
--- a/drivers/gpu/drm/nouveau/Kconfig
+++ b/drivers/gpu/drm/nouveau/Kconfig
@@ -4,7 +4,8 @@ config DRM_NOUVEAU
4 select FW_LOADER 4 select FW_LOADER
5 select DRM_KMS_HELPER 5 select DRM_KMS_HELPER
6 select DRM_TTM 6 select DRM_TTM
7 select FB_BACKLIGHT if DRM_NOUVEAU_BACKLIGHT 7 select BACKLIGHT_CLASS_DEVICE if DRM_NOUVEAU_BACKLIGHT
8 select BACKLIGHT_LCD_SUPPORT if DRM_NOUVEAU_BACKLIGHT
8 select ACPI_VIDEO if ACPI && X86 && BACKLIGHT_CLASS_DEVICE && INPUT 9 select ACPI_VIDEO if ACPI && X86 && BACKLIGHT_CLASS_DEVICE && INPUT
9 select X86_PLATFORM_DEVICES if ACPI && X86 10 select X86_PLATFORM_DEVICES if ACPI && X86
10 select ACPI_WMI if ACPI && X86 11 select ACPI_WMI if ACPI && X86
diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
index e413f54208f4..ae7712c9687a 100644
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -184,7 +184,7 @@ config FB_MACMODES
184 depends on FB 184 depends on FB
185 185
186config FB_BACKLIGHT 186config FB_BACKLIGHT
187 bool 187 tristate
188 depends on FB 188 depends on FB
189 select BACKLIGHT_LCD_SUPPORT 189 select BACKLIGHT_LCD_SUPPORT
190 select BACKLIGHT_CLASS_DEVICE 190 select BACKLIGHT_CLASS_DEVICE
@@ -2037,7 +2037,8 @@ config FB_XILINX
2037 2037
2038config FB_GOLDFISH 2038config FB_GOLDFISH
2039 tristate "Goldfish Framebuffer" 2039 tristate "Goldfish Framebuffer"
2040 depends on FB && HAS_DMA && (GOLDFISH || COMPILE_TEST) 2040 depends on FB
2041 depends on GOLDFISH || COMPILE_TEST
2041 select FB_CFB_FILLRECT 2042 select FB_CFB_FILLRECT
2042 select FB_CFB_COPYAREA 2043 select FB_CFB_COPYAREA
2043 select FB_CFB_IMAGEBLIT 2044 select FB_CFB_IMAGEBLIT
diff --git a/drivers/video/fbdev/clps711x-fb.c b/drivers/video/fbdev/clps711x-fb.c
index ff561073ee4e..42f909618f04 100644
--- a/drivers/video/fbdev/clps711x-fb.c
+++ b/drivers/video/fbdev/clps711x-fb.c
@@ -287,14 +287,17 @@ static int clps711x_fb_probe(struct platform_device *pdev)
287 } 287 }
288 288
289 ret = of_get_fb_videomode(disp, &cfb->mode, OF_USE_NATIVE_MODE); 289 ret = of_get_fb_videomode(disp, &cfb->mode, OF_USE_NATIVE_MODE);
290 if (ret) 290 if (ret) {
291 of_node_put(disp);
291 goto out_fb_release; 292 goto out_fb_release;
293 }
292 294
293 of_property_read_u32(disp, "ac-prescale", &cfb->ac_prescale); 295 of_property_read_u32(disp, "ac-prescale", &cfb->ac_prescale);
294 cfb->cmap_invert = of_property_read_bool(disp, "cmap-invert"); 296 cfb->cmap_invert = of_property_read_bool(disp, "cmap-invert");
295 297
296 ret = of_property_read_u32(disp, "bits-per-pixel", 298 ret = of_property_read_u32(disp, "bits-per-pixel",
297 &info->var.bits_per_pixel); 299 &info->var.bits_per_pixel);
300 of_node_put(disp);
298 if (ret) 301 if (ret)
299 goto out_fb_release; 302 goto out_fb_release;
300 303
diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
index 8958ccc8b1ac..8976190b6c1f 100644
--- a/drivers/video/fbdev/core/fbcon.c
+++ b/drivers/video/fbdev/core/fbcon.c
@@ -3064,7 +3064,7 @@ static int fbcon_fb_unbind(int idx)
3064 for (i = first_fb_vc; i <= last_fb_vc; i++) { 3064 for (i = first_fb_vc; i <= last_fb_vc; i++) {
3065 if (con2fb_map[i] != idx && 3065 if (con2fb_map[i] != idx &&
3066 con2fb_map[i] != -1) { 3066 con2fb_map[i] != -1) {
3067 new_idx = i; 3067 new_idx = con2fb_map[i];
3068 break; 3068 break;
3069 } 3069 }
3070 } 3070 }
diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c
index 861bf8081619..558ed2ed3124 100644
--- a/drivers/video/fbdev/core/fbmem.c
+++ b/drivers/video/fbdev/core/fbmem.c
@@ -436,7 +436,9 @@ static void fb_do_show_logo(struct fb_info *info, struct fb_image *image,
436 image->dx += image->width + 8; 436 image->dx += image->width + 8;
437 } 437 }
438 } else if (rotate == FB_ROTATE_UD) { 438 } else if (rotate == FB_ROTATE_UD) {
439 for (x = 0; x < num; x++) { 439 u32 dx = image->dx;
440
441 for (x = 0; x < num && image->dx <= dx; x++) {
440 info->fbops->fb_imageblit(info, image); 442 info->fbops->fb_imageblit(info, image);
441 image->dx -= image->width + 8; 443 image->dx -= image->width + 8;
442 } 444 }
@@ -448,7 +450,9 @@ static void fb_do_show_logo(struct fb_info *info, struct fb_image *image,
448 image->dy += image->height + 8; 450 image->dy += image->height + 8;
449 } 451 }
450 } else if (rotate == FB_ROTATE_CCW) { 452 } else if (rotate == FB_ROTATE_CCW) {
451 for (x = 0; x < num; x++) { 453 u32 dy = image->dy;
454
455 for (x = 0; x < num && image->dy <= dy; x++) {
452 info->fbops->fb_imageblit(info, image); 456 info->fbops->fb_imageblit(info, image);
453 image->dy -= image->height + 8; 457 image->dy -= image->height + 8;
454 } 458 }
@@ -502,8 +506,25 @@ static int fb_show_logo_line(struct fb_info *info, int rotate,
502 fb_set_logo(info, logo, logo_new, fb_logo.depth); 506 fb_set_logo(info, logo, logo_new, fb_logo.depth);
503 } 507 }
504 508
509#ifdef CONFIG_FB_LOGO_CENTER
510 {
511 int xres = info->var.xres;
512 int yres = info->var.yres;
513
514 if (rotate == FB_ROTATE_CW || rotate == FB_ROTATE_CCW) {
515 xres = info->var.yres;
516 yres = info->var.xres;
517 }
518
519 while (n && (n * (logo->width + 8) - 8 > xres))
520 --n;
521 image.dx = (xres - n * (logo->width + 8) - 8) / 2;
522 image.dy = y ?: (yres - logo->height) / 2;
523 }
524#else
505 image.dx = 0; 525 image.dx = 0;
506 image.dy = y; 526 image.dy = y;
527#endif
507 image.width = logo->width; 528 image.width = logo->width;
508 image.height = logo->height; 529 image.height = logo->height;
509 530
@@ -521,7 +542,7 @@ static int fb_show_logo_line(struct fb_info *info, int rotate,
521 info->pseudo_palette = saved_pseudo_palette; 542 info->pseudo_palette = saved_pseudo_palette;
522 kfree(logo_new); 543 kfree(logo_new);
523 kfree(logo_rotate); 544 kfree(logo_rotate);
524 return logo->height; 545 return image.dy + logo->height;
525} 546}
526 547
527 548
@@ -573,8 +594,8 @@ static int fb_show_extra_logos(struct fb_info *info, int y, int rotate)
573 unsigned int i; 594 unsigned int i;
574 595
575 for (i = 0; i < fb_logo_ex_num; i++) 596 for (i = 0; i < fb_logo_ex_num; i++)
576 y += fb_show_logo_line(info, rotate, 597 y = fb_show_logo_line(info, rotate,
577 fb_logo_ex[i].logo, y, fb_logo_ex[i].n); 598 fb_logo_ex[i].logo, y, fb_logo_ex[i].n);
578 599
579 return y; 600 return y;
580} 601}
@@ -600,6 +621,7 @@ int fb_prepare_logo(struct fb_info *info, int rotate)
600{ 621{
601 int depth = fb_get_color_depth(&info->var, &info->fix); 622 int depth = fb_get_color_depth(&info->var, &info->fix);
602 unsigned int yres; 623 unsigned int yres;
624 int height;
603 625
604 memset(&fb_logo, 0, sizeof(struct logo_data)); 626 memset(&fb_logo, 0, sizeof(struct logo_data));
605 627
@@ -661,7 +683,12 @@ int fb_prepare_logo(struct fb_info *info, int rotate)
661 } 683 }
662 } 684 }
663 685
664 return fb_prepare_extra_logos(info, fb_logo.logo->height, yres); 686 height = fb_logo.logo->height;
687#ifdef CONFIG_FB_LOGO_CENTER
688 height += (yres - fb_logo.logo->height) / 2;
689#endif
690
691 return fb_prepare_extra_logos(info, height, yres);
665} 692}
666 693
667int fb_show_logo(struct fb_info *info, int rotate) 694int fb_show_logo(struct fb_info *info, int rotate)
diff --git a/drivers/video/fbdev/core/fbsysfs.c b/drivers/video/fbdev/core/fbsysfs.c
index e31a182b42bf..44cca39f2b51 100644
--- a/drivers/video/fbdev/core/fbsysfs.c
+++ b/drivers/video/fbdev/core/fbsysfs.c
@@ -60,7 +60,7 @@ struct fb_info *framebuffer_alloc(size_t size, struct device *dev)
60 info->device = dev; 60 info->device = dev;
61 info->fbcon_rotate_hint = -1; 61 info->fbcon_rotate_hint = -1;
62 62
63#ifdef CONFIG_FB_BACKLIGHT 63#if IS_ENABLED(CONFIG_FB_BACKLIGHT)
64 mutex_init(&info->bl_curve_mutex); 64 mutex_init(&info->bl_curve_mutex);
65#endif 65#endif
66 66
@@ -429,7 +429,7 @@ static ssize_t show_fbstate(struct device *device,
429 return snprintf(buf, PAGE_SIZE, "%d\n", fb_info->state); 429 return snprintf(buf, PAGE_SIZE, "%d\n", fb_info->state);
430} 430}
431 431
432#ifdef CONFIG_FB_BACKLIGHT 432#if IS_ENABLED(CONFIG_FB_BACKLIGHT)
433static ssize_t store_bl_curve(struct device *device, 433static ssize_t store_bl_curve(struct device *device,
434 struct device_attribute *attr, 434 struct device_attribute *attr,
435 const char *buf, size_t count) 435 const char *buf, size_t count)
@@ -510,7 +510,7 @@ static struct device_attribute device_attrs[] = {
510 __ATTR(stride, S_IRUGO, show_stride, NULL), 510 __ATTR(stride, S_IRUGO, show_stride, NULL),
511 __ATTR(rotate, S_IRUGO|S_IWUSR, show_rotate, store_rotate), 511 __ATTR(rotate, S_IRUGO|S_IWUSR, show_rotate, store_rotate),
512 __ATTR(state, S_IRUGO|S_IWUSR, show_fbstate, store_fbstate), 512 __ATTR(state, S_IRUGO|S_IWUSR, show_fbstate, store_fbstate),
513#ifdef CONFIG_FB_BACKLIGHT 513#if IS_ENABLED(CONFIG_FB_BACKLIGHT)
514 __ATTR(bl_curve, S_IRUGO|S_IWUSR, show_bl_curve, store_bl_curve), 514 __ATTR(bl_curve, S_IRUGO|S_IWUSR, show_bl_curve, store_bl_curve),
515#endif 515#endif
516}; 516};
@@ -551,7 +551,7 @@ void fb_cleanup_device(struct fb_info *fb_info)
551 } 551 }
552} 552}
553 553
554#ifdef CONFIG_FB_BACKLIGHT 554#if IS_ENABLED(CONFIG_FB_BACKLIGHT)
555/* This function generates a linear backlight curve 555/* This function generates a linear backlight curve
556 * 556 *
557 * 0: off 557 * 0: off
diff --git a/drivers/video/fbdev/fsl-diu-fb.c b/drivers/video/fbdev/fsl-diu-fb.c
index 332a56b6811f..9a5451ba4d44 100644
--- a/drivers/video/fbdev/fsl-diu-fb.c
+++ b/drivers/video/fbdev/fsl-diu-fb.c
@@ -1575,8 +1575,7 @@ static void uninstall_fb(struct fb_info *info)
1575 1575
1576 unregister_framebuffer(info); 1576 unregister_framebuffer(info);
1577 unmap_video_memory(info); 1577 unmap_video_memory(info);
1578 if (&info->cmap) 1578 fb_dealloc_cmap(&info->cmap);
1579 fb_dealloc_cmap(&info->cmap);
1580 1579
1581 mfbi->registered = 0; 1580 mfbi->registered = 0;
1582} 1581}
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/core.c b/drivers/video/fbdev/omap2/omapfb/dss/core.c
index a5e58a829ea0..b4bcf3a4a647 100644
--- a/drivers/video/fbdev/omap2/omapfb/dss/core.c
+++ b/drivers/video/fbdev/omap2/omapfb/dss/core.c
@@ -99,24 +99,14 @@ int dss_set_min_bus_tput(struct device *dev, unsigned long tput)
99} 99}
100 100
101#if defined(CONFIG_FB_OMAP2_DSS_DEBUGFS) 101#if defined(CONFIG_FB_OMAP2_DSS_DEBUGFS)
102static int dss_debug_show(struct seq_file *s, void *unused) 102static int dss_show(struct seq_file *s, void *unused)
103{ 103{
104 void (*func)(struct seq_file *) = s->private; 104 void (*func)(struct seq_file *) = s->private;
105 func(s); 105 func(s);
106 return 0; 106 return 0;
107} 107}
108 108
109static int dss_debug_open(struct inode *inode, struct file *file) 109DEFINE_SHOW_ATTRIBUTE(dss);
110{
111 return single_open(file, dss_debug_show, inode->i_private);
112}
113
114static const struct file_operations dss_debug_fops = {
115 .open = dss_debug_open,
116 .read = seq_read,
117 .llseek = seq_lseek,
118 .release = single_release,
119};
120 110
121static struct dentry *dss_debugfs_dir; 111static struct dentry *dss_debugfs_dir;
122 112
@@ -130,7 +120,7 @@ static int dss_initialize_debugfs(void)
130 } 120 }
131 121
132 debugfs_create_file("clk", S_IRUGO, dss_debugfs_dir, 122 debugfs_create_file("clk", S_IRUGO, dss_debugfs_dir,
133 &dss_debug_dump_clocks, &dss_debug_fops); 123 &dss_debug_dump_clocks, &dss_fops);
134 124
135 return 0; 125 return 0;
136} 126}
@@ -145,7 +135,7 @@ int dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *))
145 struct dentry *d; 135 struct dentry *d;
146 136
147 d = debugfs_create_file(name, S_IRUGO, dss_debugfs_dir, 137 d = debugfs_create_file(name, S_IRUGO, dss_debugfs_dir,
148 write, &dss_debug_fops); 138 write, &dss_fops);
149 139
150 return PTR_ERR_OR_ZERO(d); 140 return PTR_ERR_OR_ZERO(d);
151} 141}
diff --git a/drivers/video/fbdev/pxa168fb.c b/drivers/video/fbdev/pxa168fb.c
index e31340fad3c7..1410f476e135 100644
--- a/drivers/video/fbdev/pxa168fb.c
+++ b/drivers/video/fbdev/pxa168fb.c
@@ -279,7 +279,7 @@ static void set_clock_divider(struct pxa168fb_info *fbi,
279 279
280 /* check whether divisor is too small. */ 280 /* check whether divisor is too small. */
281 if (divider_int < 2) { 281 if (divider_int < 2) {
282 dev_warn(fbi->dev, "Warning: clock source is too slow." 282 dev_warn(fbi->dev, "Warning: clock source is too slow. "
283 "Try smaller resolution\n"); 283 "Try smaller resolution\n");
284 divider_int = 2; 284 divider_int = 2;
285 } 285 }
diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c
index bbed039617a4..d59c8a59f582 100644
--- a/drivers/video/fbdev/pxafb.c
+++ b/drivers/video/fbdev/pxafb.c
@@ -2234,10 +2234,8 @@ static struct pxafb_mach_info *of_pxafb_of_mach_info(struct device *dev)
2234 if (!info) 2234 if (!info)
2235 return ERR_PTR(-ENOMEM); 2235 return ERR_PTR(-ENOMEM);
2236 ret = of_get_pxafb_mode_info(dev, info); 2236 ret = of_get_pxafb_mode_info(dev, info);
2237 if (ret) { 2237 if (ret)
2238 kfree(info->modes);
2239 return ERR_PTR(ret); 2238 return ERR_PTR(ret);
2240 }
2241 2239
2242 /* 2240 /*
2243 * On purpose, neither lccrX registers nor video memory size can be 2241 * On purpose, neither lccrX registers nor video memory size can be
diff --git a/drivers/video/fbdev/udlfb.c b/drivers/video/fbdev/udlfb.c
index 070026a7e55a..1d034dddc556 100644
--- a/drivers/video/fbdev/udlfb.c
+++ b/drivers/video/fbdev/udlfb.c
@@ -1598,7 +1598,7 @@ static int dlfb_usb_probe(struct usb_interface *intf,
1598 dlfb = kzalloc(sizeof(*dlfb), GFP_KERNEL); 1598 dlfb = kzalloc(sizeof(*dlfb), GFP_KERNEL);
1599 if (!dlfb) { 1599 if (!dlfb) {
1600 dev_err(&intf->dev, "%s: failed to allocate dlfb\n", __func__); 1600 dev_err(&intf->dev, "%s: failed to allocate dlfb\n", __func__);
1601 goto error; 1601 return -ENOMEM;
1602 } 1602 }
1603 1603
1604 INIT_LIST_HEAD(&dlfb->deferred_free); 1604 INIT_LIST_HEAD(&dlfb->deferred_free);
@@ -1703,7 +1703,7 @@ static int dlfb_usb_probe(struct usb_interface *intf,
1703error: 1703error:
1704 if (dlfb->info) { 1704 if (dlfb->info) {
1705 dlfb_ops_destroy(dlfb->info); 1705 dlfb_ops_destroy(dlfb->info);
1706 } else if (dlfb) { 1706 } else {
1707 usb_put_dev(dlfb->udev); 1707 usb_put_dev(dlfb->udev);
1708 kfree(dlfb); 1708 kfree(dlfb);
1709 } 1709 }
@@ -1730,12 +1730,10 @@ static void dlfb_usb_disconnect(struct usb_interface *intf)
1730 /* this function will wait for all in-flight urbs to complete */ 1730 /* this function will wait for all in-flight urbs to complete */
1731 dlfb_free_urb_list(dlfb); 1731 dlfb_free_urb_list(dlfb);
1732 1732
1733 if (info) { 1733 /* remove udlfb's sysfs interfaces */
1734 /* remove udlfb's sysfs interfaces */ 1734 for (i = 0; i < ARRAY_SIZE(fb_device_attrs); i++)
1735 for (i = 0; i < ARRAY_SIZE(fb_device_attrs); i++) 1735 device_remove_file(info->dev, &fb_device_attrs[i]);
1736 device_remove_file(info->dev, &fb_device_attrs[i]); 1736 device_remove_bin_file(info->dev, &edid_attr);
1737 device_remove_bin_file(info->dev, &edid_attr);
1738 }
1739 1737
1740 unregister_framebuffer(info); 1738 unregister_framebuffer(info);
1741} 1739}
diff --git a/drivers/video/fbdev/uvesafb.c b/drivers/video/fbdev/uvesafb.c
index 440a6636d8f0..34dc8e53a1e9 100644
--- a/drivers/video/fbdev/uvesafb.c
+++ b/drivers/video/fbdev/uvesafb.c
@@ -1979,7 +1979,7 @@ MODULE_PARM_DESC(noedid,
1979module_param(vram_remap, uint, 0); 1979module_param(vram_remap, uint, 0);
1980MODULE_PARM_DESC(vram_remap, "Set amount of video memory to be used [MiB]"); 1980MODULE_PARM_DESC(vram_remap, "Set amount of video memory to be used [MiB]");
1981module_param(vram_total, uint, 0); 1981module_param(vram_total, uint, 0);
1982MODULE_PARM_DESC(vram_total, "Set total amount of video memoery [MiB]"); 1982MODULE_PARM_DESC(vram_total, "Set total amount of video memory [MiB]");
1983module_param(maxclk, ushort, 0); 1983module_param(maxclk, ushort, 0);
1984MODULE_PARM_DESC(maxclk, "Maximum pixelclock [MHz], overrides EDID data"); 1984MODULE_PARM_DESC(maxclk, "Maximum pixelclock [MHz], overrides EDID data");
1985module_param(maxhf, ushort, 0); 1985module_param(maxhf, ushort, 0);
diff --git a/drivers/video/logo/Kconfig b/drivers/video/logo/Kconfig
index d1f6196c8b9a..1e972c4e88b1 100644
--- a/drivers/video/logo/Kconfig
+++ b/drivers/video/logo/Kconfig
@@ -10,6 +10,15 @@ menuconfig LOGO
10 10
11if LOGO 11if LOGO
12 12
13config FB_LOGO_CENTER
14 bool "Center the logo"
15 depends on FB=y
16 help
17 When this option is selected, the bootup logo is centered both
18 horizontally and vertically. If more than one logo is displayed
19 due to multiple CPUs, the collected line of logos is centered
20 as a whole.
21
13config FB_LOGO_EXTRA 22config FB_LOGO_EXTRA
14 bool 23 bool
15 depends on FB=y 24 depends on FB=y
diff --git a/include/linux/fb.h b/include/linux/fb.h
index a3cab6dc9b44..7cdd31a69719 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -485,7 +485,7 @@ struct fb_info {
485 struct list_head modelist; /* mode list */ 485 struct list_head modelist; /* mode list */
486 struct fb_videomode *mode; /* current mode */ 486 struct fb_videomode *mode; /* current mode */
487 487
488#ifdef CONFIG_FB_BACKLIGHT 488#if IS_ENABLED(CONFIG_FB_BACKLIGHT)
489 /* assigned backlight device */ 489 /* assigned backlight device */
490 /* set before framebuffer registration, 490 /* set before framebuffer registration,
491 remove after unregister */ 491 remove after unregister */
diff --git a/include/uapi/linux/fb.h b/include/uapi/linux/fb.h
index 6cd9b198b7c6..b6aac7ee1f67 100644
--- a/include/uapi/linux/fb.h
+++ b/include/uapi/linux/fb.h
@@ -393,11 +393,9 @@ struct fb_cursor {
393 struct fb_image image; /* Cursor image */ 393 struct fb_image image; /* Cursor image */
394}; 394};
395 395
396#ifdef CONFIG_FB_BACKLIGHT
397/* Settings for the generic backlight code */ 396/* Settings for the generic backlight code */
398#define FB_BACKLIGHT_LEVELS 128 397#define FB_BACKLIGHT_LEVELS 128
399#define FB_BACKLIGHT_MAX 0xFF 398#define FB_BACKLIGHT_MAX 0xFF
400#endif
401 399
402 400
403#endif /* _UAPI_LINUX_FB_H */ 401#endif /* _UAPI_LINUX_FB_H */