Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'fbdev-v4.12' of git://github.com/bzolnier/linux

Pull fbdev updates from Bartlomiej Zolnierkiewicz:
"There is nothing really major here, just a couple of small bugfixes,
improvements and cleanups.

- fix handling of probing errors in omapfb (Arvind Yadav)

- remove incorrect __exit markups in few drivers (Dmitry Torokhov)

- fix boot time logo support for drivers using deferred probe
(Takeshi Kihara)

- fix DMA allocation size for ARM CLCD driver (Liam Beguin)

- add support for specifying size via xenstore in xen-frontfb
(Juergen Gross)

- support for AUS mode in imxfb driver (Martin Kaiser)

- fix buffer on stack usage in udlfb driver (Maksim Salau)

- probe failure path fixup in sm501fb driver (Alexey Khoroshilov)

- fix config dependency loop for stifb driver (Arnd Bergmann)

- misc cleanups (Joe Perches, Christophe Leroy, Karim Eshapa, Pushkar
Jambhlekar)"

* tag 'fbdev-v4.12' of git://github.com/bzolnier/linux:
fbdev: sti: don't select CONFIG_VT
drivers/video/fbdev/omap/lcd_mipid.c: Use time comparison kernel macros
sm501fb: don't return zero on failure path in sm501fb_start()
video: fbdev: udlfb: Fix buffer on stack
video: console: Remove reference to CONFIG_8xx
dt-bindings: display: imx: entry for AUS mode
video: fbdev: imxfb: support AUS mode
drivers/video/fbdev: Fixing coding guidelines in acornfb.c
xen, fbfront: add support for specifying size via xenstore
video: ARM CLCD: fix dma allocation size
drivers/video: Convert remaining uses of pr_warning to pr_warn
video/logo: tidyup fb_logo_late_init initcall timing
video: fbdev: i810: remove incorrect __exit markups
video: fbdev: pmag-aa-fb: remove incorrect __exit markups
video: fbdev: pmagb-b-fb: remove incorrect __exit markups
video: fbdev: pmag-ba-fb: remove incorrect __exit markups
omapfb: dss: Handle return errors in dss_init_ports()

+81 -38
+2
Documentation/devicetree/bindings/display/imx/fsl,imx-fb.txt
··· 13 13 Additional, the display node has to define properties: 14 14 - bits-per-pixel: Bits per pixel 15 15 - fsl,pcr: LCDC PCR value 16 + A display node may optionally define 17 + - fsl,aus-mode: boolean to enable AUS mode (only for imx21) 16 18 17 19 Optional properties: 18 20 - lcd-supply: Regulator for LCD supply voltage.
+1
drivers/video/Makefile
··· 2 2 obj-$(CONFIG_HDMI) += hdmi.o 3 3 4 4 obj-$(CONFIG_VT) += console/ 5 + obj-$(CONFIG_FB_STI) += console/ 5 6 obj-$(CONFIG_LOGO) += logo/ 6 7 obj-y += backlight/ 7 8
+1 -1
drivers/video/console/Kconfig
··· 6 6 7 7 config VGA_CONSOLE 8 8 bool "VGA text console" if EXPERT || !X86 9 - depends on !4xx && !8xx && !SPARC && !M68K && !PARISC && !FRV && \ 9 + depends on !4xx && !PPC_8xx && !SPARC && !M68K && !PARISC && !FRV && \ 10 10 !SUPERH && !BLACKFIN && !AVR32 && !MN10300 && !CRIS && \ 11 11 (!ARM || ARCH_FOOTBRIDGE || ARCH_INTEGRATOR || ARCH_NETWINDER) && \ 12 12 !ARM64 && !ARC && !MICROBLAZE && !OPENRISC
-2
drivers/video/fbdev/Kconfig
··· 689 689 select FB_CFB_FILLRECT 690 690 select FB_CFB_COPYAREA 691 691 select FB_CFB_IMAGEBLIT 692 - select STI_CONSOLE 693 - select VT 694 692 default y 695 693 ---help--- 696 694 STI refers to the HP "Standard Text Interface" which is a set of
+5 -7
drivers/video/fbdev/acornfb.c
··· 101 101 #ifdef HAS_VIDC20 102 102 #include <mach/acornfb.h> 103 103 104 - #define MAX_SIZE 2*1024*1024 104 + #define MAX_SIZE (2*1024*1024) 105 105 106 106 /* VIDC20 has a different set of rules from the VIDC: 107 107 * hcr : must be multiple of 4 ··· 162 162 if (memcmp(&current_vidc, &vidc, sizeof(vidc))) { 163 163 current_vidc = vidc; 164 164 165 - vidc_writel(VIDC20_CTRL| vidc.control); 165 + vidc_writel(VIDC20_CTRL | vidc.control); 166 166 vidc_writel(0xd0000000 | vidc.pll_ctl); 167 167 vidc_writel(0x80000000 | vidc.h_cycle); 168 168 vidc_writel(0x81000000 | vidc.h_sync_width); ··· 297 297 pal.p = 0; 298 298 vidc_writel(0x10000000); 299 299 for (i = 0; i < 256; i += 1) { 300 - pal.vidc20.red = current_par.palette[ i & 31].vidc20.red; 300 + pal.vidc20.red = current_par.palette[i & 31].vidc20.red; 301 301 pal.vidc20.green = current_par.palette[(i >> 1) & 31].vidc20.green; 302 302 pal.vidc20.blue = current_par.palette[(i >> 2) & 31].vidc20.blue; 303 303 vidc_writel(pal.p); ··· 1043 1043 base = dma_alloc_wc(current_par.dev, size, &handle, 1044 1044 GFP_KERNEL); 1045 1045 if (base == NULL) { 1046 - printk(KERN_ERR "acornfb: unable to allocate screen " 1047 - "memory\n"); 1046 + printk(KERN_ERR "acornfb: unable to allocate screen memory\n"); 1048 1047 return -ENOMEM; 1049 1048 } 1050 1049 ··· 1102 1103 v_sync = h_sync / (fb_info.var.yres + fb_info.var.upper_margin + 1103 1104 fb_info.var.lower_margin + fb_info.var.vsync_len); 1104 1105 1105 - printk(KERN_INFO "Acornfb: %dkB %cRAM, %s, using %dx%d, " 1106 - "%d.%03dkHz, %dHz\n", 1106 + printk(KERN_INFO "Acornfb: %dkB %cRAM, %s, using %dx%d, %d.%03dkHz, %dHz\n", 1107 1107 fb_info.fix.smem_len / 1024, 1108 1108 current_par.using_vram ? 'V' : 'D', 1109 1109 VIDC_NAME, fb_info.var.xres, fb_info.var.yres,
+2 -2
drivers/video/fbdev/amba-clcd.c
··· 881 881 if (err) 882 882 return err; 883 883 884 - framesize = fb->panel->mode.xres * fb->panel->mode.yres * 885 - fb->panel->bpp / 8; 884 + framesize = PAGE_ALIGN(fb->panel->mode.xres * fb->panel->mode.yres * 885 + fb->panel->bpp / 8); 886 886 fb->fb.screen_base = dma_alloc_coherent(&fb->dev->dev, framesize, 887 887 &dma, GFP_KERNEL); 888 888 if (!fb->fb.screen_base)
+2 -2
drivers/video/fbdev/aty/radeon_base.c
··· 2453 2453 err |= sysfs_create_bin_file(&rinfo->pdev->dev.kobj, 2454 2454 &edid2_attr); 2455 2455 if (err) 2456 - pr_warning("%s() Creating sysfs files failed, continuing\n", 2457 - __func__); 2456 + pr_warn("%s() Creating sysfs files failed, continuing\n", 2457 + __func__); 2458 2458 2459 2459 /* save current mode regs before we switch into the new one 2460 2460 * so we can restore this upon __exit
+2 -2
drivers/video/fbdev/core/fbmon.c
··· 1073 1073 for (i = specs->modedb_len + num; i < specs->modedb_len + num + svd_n; i++) { 1074 1074 int idx = svd[i - specs->modedb_len - num]; 1075 1075 if (!idx || idx >= ARRAY_SIZE(cea_modes)) { 1076 - pr_warning("Reserved SVD code %d\n", idx); 1076 + pr_warn("Reserved SVD code %d\n", idx); 1077 1077 } else if (!cea_modes[idx].xres) { 1078 - pr_warning("Unimplemented SVD code %d\n", idx); 1078 + pr_warn("Unimplemented SVD code %d\n", idx); 1079 1079 } else { 1080 1080 memcpy(&m[i], cea_modes + idx, sizeof(m[i])); 1081 1081 pr_debug("Adding SVD #%d: %ux%u@%u\n", idx,
+3 -3
drivers/video/fbdev/i810/i810_main.c
··· 81 81 static int i810fb_cursor(struct fb_info *info, struct fb_cursor *cursor); 82 82 static int i810fb_init_pci(struct pci_dev *dev, 83 83 const struct pci_device_id *entry); 84 - static void __exit i810fb_remove_pci(struct pci_dev *dev); 84 + static void i810fb_remove_pci(struct pci_dev *dev); 85 85 static int i810fb_resume(struct pci_dev *dev); 86 86 static int i810fb_suspend(struct pci_dev *dev, pm_message_t state); 87 87 ··· 128 128 .name = "i810fb", 129 129 .id_table = i810fb_pci_tbl, 130 130 .probe = i810fb_init_pci, 131 - .remove = __exit_p(i810fb_remove_pci), 131 + .remove = i810fb_remove_pci, 132 132 .suspend = i810fb_suspend, 133 133 .resume = i810fb_resume, 134 134 }; ··· 2123 2123 2124 2124 } 2125 2125 2126 - static void __exit i810fb_remove_pci(struct pci_dev *dev) 2126 + static void i810fb_remove_pci(struct pci_dev *dev) 2127 2127 { 2128 2128 struct fb_info *info = pci_get_drvdata(dev); 2129 2129 struct i810fb_par *par = info->par;
+17
drivers/video/fbdev/imxfb.c
··· 117 117 118 118 #define IMXFB_LSCR1_DEFAULT 0x00120300 119 119 120 + #define LCDC_LAUSCR 0x80 121 + #define LAUSCR_AUS_MODE (1<<31) 122 + 120 123 /* Used fb-mode. Can be set on kernel command line, therefore file-static. */ 121 124 static const char *fb_mode; 122 125 ··· 161 158 dma_addr_t dbar2; 162 159 163 160 u_int pcr; 161 + u_int lauscr; 164 162 u_int pwmr; 165 163 u_int lscr1; 166 164 u_int dmacr; ··· 426 422 pcr |= imxfb_mode->pcr & ~(0x3f | (7 << 25)); 427 423 428 424 fbi->pcr = pcr; 425 + /* 426 + * The LCDC AUS Mode Control Register does not exist on imx1. 427 + */ 428 + if (!is_imx1_fb(fbi) && imxfb_mode->aus_mode) 429 + fbi->lauscr = LAUSCR_AUS_MODE; 429 430 430 431 /* 431 432 * Copy the RGB parameters for this display ··· 647 638 if (fbi->dmacr) 648 639 writel(fbi->dmacr, fbi->regs + LCDC_DMACR); 649 640 641 + if (fbi->lauscr) 642 + writel(fbi->lauscr, fbi->regs + LCDC_LAUSCR); 643 + 650 644 return 0; 651 645 } 652 646 ··· 745 733 746 734 imxfb_mode->bpp = bpp; 747 735 imxfb_mode->pcr = pcr; 736 + 737 + /* 738 + * fsl,aus-mode is optional 739 + */ 740 + imxfb_mode->aus_mode = of_property_read_bool(np, "fsl,aus-mode"); 748 741 749 742 return 0; 750 743 }
+1 -1
drivers/video/fbdev/omap/lcd_mipid.c
··· 174 174 { 175 175 unsigned long wait = md->hw_guard_end - jiffies; 176 176 177 - if ((long)wait > 0 && wait <= md->hw_guard_wait) { 177 + if ((long)wait > 0 && time_before_eq(wait, md->hw_guard_wait)) { 178 178 set_current_state(TASK_UNINTERRUPTIBLE); 179 179 schedule_timeout(wait); 180 180 }
+11 -5
drivers/video/fbdev/omap2/omapfb/dss/dss.c
··· 941 941 return 0; 942 942 } 943 943 944 + static void dss_uninit_ports(struct platform_device *pdev); 945 + 944 946 static int dss_init_ports(struct platform_device *pdev) 945 947 { 946 948 struct device_node *parent = pdev->dev.of_node; 947 949 struct device_node *port; 948 - int r; 950 + int r, ret = 0; 949 951 950 952 if (parent == NULL) 951 953 return 0; ··· 974 972 975 973 switch (port_type) { 976 974 case OMAP_DISPLAY_TYPE_DPI: 977 - dpi_init_port(pdev, port); 975 + ret = dpi_init_port(pdev, port); 978 976 break; 979 977 case OMAP_DISPLAY_TYPE_SDI: 980 - sdi_init_port(pdev, port); 978 + ret = sdi_init_port(pdev, port); 981 979 break; 982 980 default: 983 981 break; 984 982 } 985 - } while ((port = omapdss_of_get_next_port(parent, port)) != NULL); 983 + } while (!ret && 984 + (port = omapdss_of_get_next_port(parent, port)) != NULL); 986 985 987 - return 0; 986 + if (ret) 987 + dss_uninit_ports(pdev); 988 + 989 + return ret; 988 990 } 989 991 990 992 static void dss_uninit_ports(struct platform_device *pdev)
+2 -2
drivers/video/fbdev/pmag-aa-fb.c
··· 247 247 return err; 248 248 } 249 249 250 - static int __exit pmagaafb_remove(struct device *dev) 250 + static int pmagaafb_remove(struct device *dev) 251 251 { 252 252 struct tc_dev *tdev = to_tc_dev(dev); 253 253 struct fb_info *info = dev_get_drvdata(dev); ··· 280 280 .name = "pmagaafb", 281 281 .bus = &tc_bus_type, 282 282 .probe = pmagaafb_probe, 283 - .remove = __exit_p(pmagaafb_remove), 283 + .remove = pmagaafb_remove, 284 284 }, 285 285 }; 286 286
+2 -2
drivers/video/fbdev/pmag-ba-fb.c
··· 235 235 return err; 236 236 } 237 237 238 - static int __exit pmagbafb_remove(struct device *dev) 238 + static int pmagbafb_remove(struct device *dev) 239 239 { 240 240 struct tc_dev *tdev = to_tc_dev(dev); 241 241 struct fb_info *info = dev_get_drvdata(dev); ··· 270 270 .name = "pmagbafb", 271 271 .bus = &tc_bus_type, 272 272 .probe = pmagbafb_probe, 273 - .remove = __exit_p(pmagbafb_remove), 273 + .remove = pmagbafb_remove, 274 274 }, 275 275 }; 276 276
+2 -2
drivers/video/fbdev/pmagb-b-fb.c
··· 353 353 return err; 354 354 } 355 355 356 - static int __exit pmagbbfb_remove(struct device *dev) 356 + static int pmagbbfb_remove(struct device *dev) 357 357 { 358 358 struct tc_dev *tdev = to_tc_dev(dev); 359 359 struct fb_info *info = dev_get_drvdata(dev); ··· 388 388 .name = "pmagbbfb", 389 389 .bus = &tc_bus_type, 390 390 .probe = pmagbbfb_probe, 391 - .remove = __exit_p(pmagbbfb_remove), 391 + .remove = pmagbbfb_remove, 392 392 }, 393 393 }; 394 394
+3 -4
drivers/video/fbdev/pxafb.c
··· 645 645 lcd_writel(ofb->fbi, FBR1, ofb->fbi->fdadr[DMA_OV1] | 0x3); 646 646 647 647 if (wait_for_completion_timeout(&ofb->branch_done, 1 * HZ) == 0) 648 - pr_warning("%s: timeout disabling overlay1\n", __func__); 648 + pr_warn("%s: timeout disabling overlay1\n", __func__); 649 649 650 650 lcd_writel(ofb->fbi, LCCR5, lccr5); 651 651 } ··· 710 710 lcd_writel(ofb->fbi, FBR4, ofb->fbi->fdadr[DMA_OV2_Cr] | 0x3); 711 711 712 712 if (wait_for_completion_timeout(&ofb->branch_done, 1 * HZ) == 0) 713 - pr_warning("%s: timeout disabling overlay2\n", __func__); 713 + pr_warn("%s: timeout disabling overlay2\n", __func__); 714 714 } 715 715 716 716 static struct pxafb_layer_ops ofb_ops[] = { ··· 1187 1187 lcd_writel(fbi, LCCR0, fbi->reg_lccr0 | LCCR0_ENB); 1188 1188 1189 1189 if (wait_for_completion_timeout(&fbi->command_done, HZ/2) == 0) { 1190 - pr_warning("%s: timeout waiting for command done\n", 1191 - __func__); 1190 + pr_warn("%s: timeout waiting for command done\n", __func__); 1192 1191 ret = -ETIMEDOUT; 1193 1192 } 1194 1193
+1
drivers/video/fbdev/sm501fb.c
··· 1600 1600 info->fbmem = ioremap(res->start, resource_size(res)); 1601 1601 if (info->fbmem == NULL) { 1602 1602 dev_err(dev, "cannot remap framebuffer\n"); 1603 + ret = -ENXIO; 1603 1604 goto err_mem_res; 1604 1605 } 1605 1606
+12 -2
drivers/video/fbdev/udlfb.c
··· 1487 1487 static int dlfb_select_std_channel(struct dlfb_data *dev) 1488 1488 { 1489 1489 int ret; 1490 - u8 set_def_chn[] = { 0x57, 0xCD, 0xDC, 0xA7, 1490 + void *buf; 1491 + static const u8 set_def_chn[] = { 1492 + 0x57, 0xCD, 0xDC, 0xA7, 1491 1493 0x1C, 0x88, 0x5E, 0x15, 1492 1494 0x60, 0xFE, 0xC6, 0x97, 1493 1495 0x16, 0x3D, 0x47, 0xF2 }; 1494 1496 1497 + buf = kmemdup(set_def_chn, sizeof(set_def_chn), GFP_KERNEL); 1498 + 1499 + if (!buf) 1500 + return -ENOMEM; 1501 + 1495 1502 ret = usb_control_msg(dev->udev, usb_sndctrlpipe(dev->udev, 0), 1496 1503 NR_USB_REQUEST_CHANNEL, 1497 1504 (USB_DIR_OUT | USB_TYPE_VENDOR), 0, 0, 1498 - set_def_chn, sizeof(set_def_chn), USB_CTRL_SET_TIMEOUT); 1505 + buf, sizeof(set_def_chn), USB_CTRL_SET_TIMEOUT); 1506 + 1507 + kfree(buf); 1508 + 1499 1509 return ret; 1500 1510 } 1501 1511
+10
drivers/video/fbdev/xen-fbfront.c
··· 18 18 * frame buffer. 19 19 */ 20 20 21 + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 22 + 21 23 #include <linux/console.h> 22 24 #include <linux/kernel.h> 23 25 #include <linux/errno.h> ··· 382 380 video[KPARAM_MEM] = val; 383 381 } 384 382 383 + video[KPARAM_WIDTH] = xenbus_read_unsigned(dev->otherend, "width", 384 + video[KPARAM_WIDTH]); 385 + video[KPARAM_HEIGHT] = xenbus_read_unsigned(dev->otherend, "height", 386 + video[KPARAM_HEIGHT]); 387 + 385 388 /* If requested res does not fit in available memory, use default */ 386 389 fb_size = video[KPARAM_MEM] * 1024 * 1024; 387 390 if (video[KPARAM_WIDTH] * video[KPARAM_HEIGHT] * XENFB_DEPTH / 8 388 391 > fb_size) { 392 + pr_warn("display parameters %d,%d,%d invalid, use defaults\n", 393 + video[KPARAM_MEM], video[KPARAM_WIDTH], 394 + video[KPARAM_HEIGHT]); 389 395 video[KPARAM_WIDTH] = XENFB_WIDTH; 390 396 video[KPARAM_HEIGHT] = XENFB_HEIGHT; 391 397 fb_size = XENFB_DEFAULT_FB_LEN;
+1 -1
drivers/video/logo/logo.c
··· 34 34 return 0; 35 35 } 36 36 37 - late_initcall(fb_logo_late_init); 37 + late_initcall_sync(fb_logo_late_init); 38 38 39 39 /* logo's are marked __initdata. Use __ref to tell 40 40 * modpost that it is intended that this function uses data
+1
include/linux/platform_data/video-imxfb.h
··· 50 50 struct imx_fb_videomode { 51 51 struct fb_videomode mode; 52 52 u32 pcr; 53 + bool aus_mode; 53 54 unsigned char bpp; 54 55 }; 55 56