aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-05-11 14:12:26 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-05-11 14:12:26 -0400
commit4892c6f72e4b335b162edadbefc5378cea4f0ee1 (patch)
tree1647d6741f2126e1825953aa4cb01334fe71edbb
parent55a1ab56c7981ab84373f372a4df75e3ee1535a7 (diff)
parent34bf129a7f068e3108dbb051b4b05674e2a270e7 (diff)
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()
-rw-r--r--Documentation/devicetree/bindings/display/imx/fsl,imx-fb.txt2
-rw-r--r--drivers/video/Makefile1
-rw-r--r--drivers/video/console/Kconfig2
-rw-r--r--drivers/video/fbdev/Kconfig2
-rw-r--r--drivers/video/fbdev/acornfb.c12
-rw-r--r--drivers/video/fbdev/amba-clcd.c4
-rw-r--r--drivers/video/fbdev/aty/radeon_base.c4
-rw-r--r--drivers/video/fbdev/core/fbmon.c4
-rw-r--r--drivers/video/fbdev/i810/i810_main.c6
-rw-r--r--drivers/video/fbdev/imxfb.c17
-rw-r--r--drivers/video/fbdev/omap/lcd_mipid.c2
-rw-r--r--drivers/video/fbdev/omap2/omapfb/dss/dss.c16
-rw-r--r--drivers/video/fbdev/pmag-aa-fb.c4
-rw-r--r--drivers/video/fbdev/pmag-ba-fb.c4
-rw-r--r--drivers/video/fbdev/pmagb-b-fb.c4
-rw-r--r--drivers/video/fbdev/pxafb.c7
-rw-r--r--drivers/video/fbdev/sm501fb.c1
-rw-r--r--drivers/video/fbdev/udlfb.c14
-rw-r--r--drivers/video/fbdev/xen-fbfront.c10
-rw-r--r--drivers/video/logo/logo.c2
-rw-r--r--include/linux/platform_data/video-imxfb.h1
21 files changed, 81 insertions, 38 deletions
diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx-fb.txt b/Documentation/devicetree/bindings/display/imx/fsl,imx-fb.txt
index 7a5c0e204c8e..e5a8b363d829 100644
--- a/Documentation/devicetree/bindings/display/imx/fsl,imx-fb.txt
+++ b/Documentation/devicetree/bindings/display/imx/fsl,imx-fb.txt
@@ -13,6 +13,8 @@ Required nodes:
13 Additional, the display node has to define properties: 13 Additional, the display node has to define properties:
14 - bits-per-pixel: Bits per pixel 14 - bits-per-pixel: Bits per pixel
15 - fsl,pcr: LCDC PCR value 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
17Optional properties: 19Optional properties:
18- lcd-supply: Regulator for LCD supply voltage. 20- lcd-supply: Regulator for LCD supply voltage.
diff --git a/drivers/video/Makefile b/drivers/video/Makefile
index 9ad3c17d6456..445b2c230b56 100644
--- a/drivers/video/Makefile
+++ b/drivers/video/Makefile
@@ -2,6 +2,7 @@ obj-$(CONFIG_VGASTATE) += vgastate.o
2obj-$(CONFIG_HDMI) += hdmi.o 2obj-$(CONFIG_HDMI) += hdmi.o
3 3
4obj-$(CONFIG_VT) += console/ 4obj-$(CONFIG_VT) += console/
5obj-$(CONFIG_FB_STI) += console/
5obj-$(CONFIG_LOGO) += logo/ 6obj-$(CONFIG_LOGO) += logo/
6obj-y += backlight/ 7obj-y += backlight/
7 8
diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig
index 5b71bd905a60..2111d06f8c81 100644
--- a/drivers/video/console/Kconfig
+++ b/drivers/video/console/Kconfig
@@ -6,7 +6,7 @@ menu "Console display driver support"
6 6
7config VGA_CONSOLE 7config VGA_CONSOLE
8 bool "VGA text console" if EXPERT || !X86 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 !SUPERH && !BLACKFIN && !AVR32 && !MN10300 && !CRIS && \ 10 !SUPERH && !BLACKFIN && !AVR32 && !MN10300 && !CRIS && \
11 (!ARM || ARCH_FOOTBRIDGE || ARCH_INTEGRATOR || ARCH_NETWINDER) && \ 11 (!ARM || ARCH_FOOTBRIDGE || ARCH_INTEGRATOR || ARCH_NETWINDER) && \
12 !ARM64 && !ARC && !MICROBLAZE && !OPENRISC 12 !ARM64 && !ARC && !MICROBLAZE && !OPENRISC
diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
index 922e4eaed9c5..5c6696bb56da 100644
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -689,8 +689,6 @@ config FB_STI
689 select FB_CFB_FILLRECT 689 select FB_CFB_FILLRECT
690 select FB_CFB_COPYAREA 690 select FB_CFB_COPYAREA
691 select FB_CFB_IMAGEBLIT 691 select FB_CFB_IMAGEBLIT
692 select STI_CONSOLE
693 select VT
694 default y 692 default y
695 ---help--- 693 ---help---
696 STI refers to the HP "Standard Text Interface" which is a set of 694 STI refers to the HP "Standard Text Interface" which is a set of
diff --git a/drivers/video/fbdev/acornfb.c b/drivers/video/fbdev/acornfb.c
index fb75b7e5a19a..0c325b4da61d 100644
--- a/drivers/video/fbdev/acornfb.c
+++ b/drivers/video/fbdev/acornfb.c
@@ -101,7 +101,7 @@ extern unsigned int vram_size; /* set by setup.c */
101#ifdef HAS_VIDC20 101#ifdef HAS_VIDC20
102#include <mach/acornfb.h> 102#include <mach/acornfb.h>
103 103
104#define MAX_SIZE 2*1024*1024 104#define MAX_SIZE (2*1024*1024)
105 105
106/* VIDC20 has a different set of rules from the VIDC: 106/* VIDC20 has a different set of rules from the VIDC:
107 * hcr : must be multiple of 4 107 * hcr : must be multiple of 4
@@ -162,7 +162,7 @@ static void acornfb_set_timing(struct fb_info *info)
162 if (memcmp(&current_vidc, &vidc, sizeof(vidc))) { 162 if (memcmp(&current_vidc, &vidc, sizeof(vidc))) {
163 current_vidc = vidc; 163 current_vidc = vidc;
164 164
165 vidc_writel(VIDC20_CTRL| vidc.control); 165 vidc_writel(VIDC20_CTRL | vidc.control);
166 vidc_writel(0xd0000000 | vidc.pll_ctl); 166 vidc_writel(0xd0000000 | vidc.pll_ctl);
167 vidc_writel(0x80000000 | vidc.h_cycle); 167 vidc_writel(0x80000000 | vidc.h_cycle);
168 vidc_writel(0x81000000 | vidc.h_sync_width); 168 vidc_writel(0x81000000 | vidc.h_sync_width);
@@ -297,7 +297,7 @@ acornfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
297 pal.p = 0; 297 pal.p = 0;
298 vidc_writel(0x10000000); 298 vidc_writel(0x10000000);
299 for (i = 0; i < 256; i += 1) { 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 pal.vidc20.green = current_par.palette[(i >> 1) & 31].vidc20.green; 301 pal.vidc20.green = current_par.palette[(i >> 1) & 31].vidc20.green;
302 pal.vidc20.blue = current_par.palette[(i >> 2) & 31].vidc20.blue; 302 pal.vidc20.blue = current_par.palette[(i >> 2) & 31].vidc20.blue;
303 vidc_writel(pal.p); 303 vidc_writel(pal.p);
@@ -1043,8 +1043,7 @@ static int acornfb_probe(struct platform_device *dev)
1043 base = dma_alloc_wc(current_par.dev, size, &handle, 1043 base = dma_alloc_wc(current_par.dev, size, &handle,
1044 GFP_KERNEL); 1044 GFP_KERNEL);
1045 if (base == NULL) { 1045 if (base == NULL) {
1046 printk(KERN_ERR "acornfb: unable to allocate screen " 1046 printk(KERN_ERR "acornfb: unable to allocate screen memory\n");
1047 "memory\n");
1048 return -ENOMEM; 1047 return -ENOMEM;
1049 } 1048 }
1050 1049
@@ -1103,8 +1102,7 @@ static int acornfb_probe(struct platform_device *dev)
1103 v_sync = h_sync / (fb_info.var.yres + fb_info.var.upper_margin + 1102 v_sync = h_sync / (fb_info.var.yres + fb_info.var.upper_margin +
1104 fb_info.var.lower_margin + fb_info.var.vsync_len); 1103 fb_info.var.lower_margin + fb_info.var.vsync_len);
1105 1104
1106 printk(KERN_INFO "Acornfb: %dkB %cRAM, %s, using %dx%d, " 1105 printk(KERN_INFO "Acornfb: %dkB %cRAM, %s, using %dx%d, %d.%03dkHz, %dHz\n",
1107 "%d.%03dkHz, %dHz\n",
1108 fb_info.fix.smem_len / 1024, 1106 fb_info.fix.smem_len / 1024,
1109 current_par.using_vram ? 'V' : 'D', 1107 current_par.using_vram ? 'V' : 'D',
1110 VIDC_NAME, fb_info.var.xres, fb_info.var.yres, 1108 VIDC_NAME, fb_info.var.xres, fb_info.var.yres,
diff --git a/drivers/video/fbdev/amba-clcd.c b/drivers/video/fbdev/amba-clcd.c
index 0fab92c62828..ffc2c33c6cef 100644
--- a/drivers/video/fbdev/amba-clcd.c
+++ b/drivers/video/fbdev/amba-clcd.c
@@ -881,8 +881,8 @@ static int clcdfb_of_dma_setup(struct clcd_fb *fb)
881 if (err) 881 if (err)
882 return err; 882 return err;
883 883
884 framesize = fb->panel->mode.xres * fb->panel->mode.yres * 884 framesize = PAGE_ALIGN(fb->panel->mode.xres * fb->panel->mode.yres *
885 fb->panel->bpp / 8; 885 fb->panel->bpp / 8);
886 fb->fb.screen_base = dma_alloc_coherent(&fb->dev->dev, framesize, 886 fb->fb.screen_base = dma_alloc_coherent(&fb->dev->dev, framesize,
887 &dma, GFP_KERNEL); 887 &dma, GFP_KERNEL);
888 if (!fb->fb.screen_base) 888 if (!fb->fb.screen_base)
diff --git a/drivers/video/fbdev/aty/radeon_base.c b/drivers/video/fbdev/aty/radeon_base.c
index 218339a4edaa..6b4c7872b375 100644
--- a/drivers/video/fbdev/aty/radeon_base.c
+++ b/drivers/video/fbdev/aty/radeon_base.c
@@ -2453,8 +2453,8 @@ static int radeonfb_pci_register(struct pci_dev *pdev,
2453 err |= sysfs_create_bin_file(&rinfo->pdev->dev.kobj, 2453 err |= sysfs_create_bin_file(&rinfo->pdev->dev.kobj,
2454 &edid2_attr); 2454 &edid2_attr);
2455 if (err) 2455 if (err)
2456 pr_warning("%s() Creating sysfs files failed, continuing\n", 2456 pr_warn("%s() Creating sysfs files failed, continuing\n",
2457 __func__); 2457 __func__);
2458 2458
2459 /* save current mode regs before we switch into the new one 2459 /* save current mode regs before we switch into the new one
2460 * so we can restore this upon __exit 2460 * so we can restore this upon __exit
diff --git a/drivers/video/fbdev/core/fbmon.c b/drivers/video/fbdev/core/fbmon.c
index 62c0cf79674f..687ebb053438 100644
--- a/drivers/video/fbdev/core/fbmon.c
+++ b/drivers/video/fbdev/core/fbmon.c
@@ -1073,9 +1073,9 @@ void fb_edid_add_monspecs(unsigned char *edid, struct fb_monspecs *specs)
1073 for (i = specs->modedb_len + num; i < specs->modedb_len + num + svd_n; i++) { 1073 for (i = specs->modedb_len + num; i < specs->modedb_len + num + svd_n; i++) {
1074 int idx = svd[i - specs->modedb_len - num]; 1074 int idx = svd[i - specs->modedb_len - num];
1075 if (!idx || idx >= ARRAY_SIZE(cea_modes)) { 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 } else if (!cea_modes[idx].xres) { 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 } else { 1079 } else {
1080 memcpy(&m[i], cea_modes + idx, sizeof(m[i])); 1080 memcpy(&m[i], cea_modes + idx, sizeof(m[i]));
1081 pr_debug("Adding SVD #%d: %ux%u@%u\n", idx, 1081 pr_debug("Adding SVD #%d: %ux%u@%u\n", idx,
diff --git a/drivers/video/fbdev/i810/i810_main.c b/drivers/video/fbdev/i810/i810_main.c
index 483ab2592d0c..2488baab7c89 100644
--- a/drivers/video/fbdev/i810/i810_main.c
+++ b/drivers/video/fbdev/i810/i810_main.c
@@ -81,7 +81,7 @@ static u32 voffset;
81static int i810fb_cursor(struct fb_info *info, struct fb_cursor *cursor); 81static int i810fb_cursor(struct fb_info *info, struct fb_cursor *cursor);
82static int i810fb_init_pci(struct pci_dev *dev, 82static int i810fb_init_pci(struct pci_dev *dev,
83 const struct pci_device_id *entry); 83 const struct pci_device_id *entry);
84static void __exit i810fb_remove_pci(struct pci_dev *dev); 84static void i810fb_remove_pci(struct pci_dev *dev);
85static int i810fb_resume(struct pci_dev *dev); 85static int i810fb_resume(struct pci_dev *dev);
86static int i810fb_suspend(struct pci_dev *dev, pm_message_t state); 86static int i810fb_suspend(struct pci_dev *dev, pm_message_t state);
87 87
@@ -128,7 +128,7 @@ static struct pci_driver i810fb_driver = {
128 .name = "i810fb", 128 .name = "i810fb",
129 .id_table = i810fb_pci_tbl, 129 .id_table = i810fb_pci_tbl,
130 .probe = i810fb_init_pci, 130 .probe = i810fb_init_pci,
131 .remove = __exit_p(i810fb_remove_pci), 131 .remove = i810fb_remove_pci,
132 .suspend = i810fb_suspend, 132 .suspend = i810fb_suspend,
133 .resume = i810fb_resume, 133 .resume = i810fb_resume,
134}; 134};
@@ -2123,7 +2123,7 @@ static void i810fb_release_resource(struct fb_info *info,
2123 2123
2124} 2124}
2125 2125
2126static void __exit i810fb_remove_pci(struct pci_dev *dev) 2126static void i810fb_remove_pci(struct pci_dev *dev)
2127{ 2127{
2128 struct fb_info *info = pci_get_drvdata(dev); 2128 struct fb_info *info = pci_get_drvdata(dev);
2129 struct i810fb_par *par = info->par; 2129 struct i810fb_par *par = info->par;
diff --git a/drivers/video/fbdev/imxfb.c b/drivers/video/fbdev/imxfb.c
index 1b0faadb3080..c166e0725be5 100644
--- a/drivers/video/fbdev/imxfb.c
+++ b/drivers/video/fbdev/imxfb.c
@@ -117,6 +117,9 @@
117 117
118#define IMXFB_LSCR1_DEFAULT 0x00120300 118#define IMXFB_LSCR1_DEFAULT 0x00120300
119 119
120#define LCDC_LAUSCR 0x80
121#define LAUSCR_AUS_MODE (1<<31)
122
120/* Used fb-mode. Can be set on kernel command line, therefore file-static. */ 123/* Used fb-mode. Can be set on kernel command line, therefore file-static. */
121static const char *fb_mode; 124static const char *fb_mode;
122 125
@@ -158,6 +161,7 @@ struct imxfb_info {
158 dma_addr_t dbar2; 161 dma_addr_t dbar2;
159 162
160 u_int pcr; 163 u_int pcr;
164 u_int lauscr;
161 u_int pwmr; 165 u_int pwmr;
162 u_int lscr1; 166 u_int lscr1;
163 u_int dmacr; 167 u_int dmacr;
@@ -422,6 +426,11 @@ static int imxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
422 pcr |= imxfb_mode->pcr & ~(0x3f | (7 << 25)); 426 pcr |= imxfb_mode->pcr & ~(0x3f | (7 << 25));
423 427
424 fbi->pcr = pcr; 428 fbi->pcr = pcr;
429 /*
430 * The LCDC AUS Mode Control Register does not exist on imx1.
431 */
432 if (!is_imx1_fb(fbi) && imxfb_mode->aus_mode)
433 fbi->lauscr = LAUSCR_AUS_MODE;
425 434
426 /* 435 /*
427 * Copy the RGB parameters for this display 436 * Copy the RGB parameters for this display
@@ -638,6 +647,9 @@ static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *inf
638 if (fbi->dmacr) 647 if (fbi->dmacr)
639 writel(fbi->dmacr, fbi->regs + LCDC_DMACR); 648 writel(fbi->dmacr, fbi->regs + LCDC_DMACR);
640 649
650 if (fbi->lauscr)
651 writel(fbi->lauscr, fbi->regs + LCDC_LAUSCR);
652
641 return 0; 653 return 0;
642} 654}
643 655
@@ -734,6 +746,11 @@ static int imxfb_of_read_mode(struct device *dev, struct device_node *np,
734 imxfb_mode->bpp = bpp; 746 imxfb_mode->bpp = bpp;
735 imxfb_mode->pcr = pcr; 747 imxfb_mode->pcr = pcr;
736 748
749 /*
750 * fsl,aus-mode is optional
751 */
752 imxfb_mode->aus_mode = of_property_read_bool(np, "fsl,aus-mode");
753
737 return 0; 754 return 0;
738} 755}
739 756
diff --git a/drivers/video/fbdev/omap/lcd_mipid.c b/drivers/video/fbdev/omap/lcd_mipid.c
index c81f150589e1..df9e6ebcfad5 100644
--- a/drivers/video/fbdev/omap/lcd_mipid.c
+++ b/drivers/video/fbdev/omap/lcd_mipid.c
@@ -174,7 +174,7 @@ static void hw_guard_wait(struct mipid_device *md)
174{ 174{
175 unsigned long wait = md->hw_guard_end - jiffies; 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 set_current_state(TASK_UNINTERRUPTIBLE); 178 set_current_state(TASK_UNINTERRUPTIBLE);
179 schedule_timeout(wait); 179 schedule_timeout(wait);
180 } 180 }
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dss.c b/drivers/video/fbdev/omap2/omapfb/dss/dss.c
index 47d7f69ad9ad..48c6500c24e1 100644
--- a/drivers/video/fbdev/omap2/omapfb/dss/dss.c
+++ b/drivers/video/fbdev/omap2/omapfb/dss/dss.c
@@ -941,11 +941,13 @@ static int dss_init_features(struct platform_device *pdev)
941 return 0; 941 return 0;
942} 942}
943 943
944static void dss_uninit_ports(struct platform_device *pdev);
945
944static int dss_init_ports(struct platform_device *pdev) 946static int dss_init_ports(struct platform_device *pdev)
945{ 947{
946 struct device_node *parent = pdev->dev.of_node; 948 struct device_node *parent = pdev->dev.of_node;
947 struct device_node *port; 949 struct device_node *port;
948 int r; 950 int r, ret = 0;
949 951
950 if (parent == NULL) 952 if (parent == NULL)
951 return 0; 953 return 0;
@@ -972,17 +974,21 @@ static int dss_init_ports(struct platform_device *pdev)
972 974
973 switch (port_type) { 975 switch (port_type) {
974 case OMAP_DISPLAY_TYPE_DPI: 976 case OMAP_DISPLAY_TYPE_DPI:
975 dpi_init_port(pdev, port); 977 ret = dpi_init_port(pdev, port);
976 break; 978 break;
977 case OMAP_DISPLAY_TYPE_SDI: 979 case OMAP_DISPLAY_TYPE_SDI:
978 sdi_init_port(pdev, port); 980 ret = sdi_init_port(pdev, port);
979 break; 981 break;
980 default: 982 default:
981 break; 983 break;
982 } 984 }
983 } while ((port = omapdss_of_get_next_port(parent, port)) != NULL); 985 } while (!ret &&
986 (port = omapdss_of_get_next_port(parent, port)) != NULL);
984 987
985 return 0; 988 if (ret)
989 dss_uninit_ports(pdev);
990
991 return ret;
986} 992}
987 993
988static void dss_uninit_ports(struct platform_device *pdev) 994static void dss_uninit_ports(struct platform_device *pdev)
diff --git a/drivers/video/fbdev/pmag-aa-fb.c b/drivers/video/fbdev/pmag-aa-fb.c
index ffe2dd482f84..39922f072db4 100644
--- a/drivers/video/fbdev/pmag-aa-fb.c
+++ b/drivers/video/fbdev/pmag-aa-fb.c
@@ -247,7 +247,7 @@ err_alloc:
247 return err; 247 return err;
248} 248}
249 249
250static int __exit pmagaafb_remove(struct device *dev) 250static int pmagaafb_remove(struct device *dev)
251{ 251{
252 struct tc_dev *tdev = to_tc_dev(dev); 252 struct tc_dev *tdev = to_tc_dev(dev);
253 struct fb_info *info = dev_get_drvdata(dev); 253 struct fb_info *info = dev_get_drvdata(dev);
@@ -280,7 +280,7 @@ static struct tc_driver pmagaafb_driver = {
280 .name = "pmagaafb", 280 .name = "pmagaafb",
281 .bus = &tc_bus_type, 281 .bus = &tc_bus_type,
282 .probe = pmagaafb_probe, 282 .probe = pmagaafb_probe,
283 .remove = __exit_p(pmagaafb_remove), 283 .remove = pmagaafb_remove,
284 }, 284 },
285}; 285};
286 286
diff --git a/drivers/video/fbdev/pmag-ba-fb.c b/drivers/video/fbdev/pmag-ba-fb.c
index df02fb4b7fd1..1fd02f40708e 100644
--- a/drivers/video/fbdev/pmag-ba-fb.c
+++ b/drivers/video/fbdev/pmag-ba-fb.c
@@ -235,7 +235,7 @@ err_alloc:
235 return err; 235 return err;
236} 236}
237 237
238static int __exit pmagbafb_remove(struct device *dev) 238static int pmagbafb_remove(struct device *dev)
239{ 239{
240 struct tc_dev *tdev = to_tc_dev(dev); 240 struct tc_dev *tdev = to_tc_dev(dev);
241 struct fb_info *info = dev_get_drvdata(dev); 241 struct fb_info *info = dev_get_drvdata(dev);
@@ -270,7 +270,7 @@ static struct tc_driver pmagbafb_driver = {
270 .name = "pmagbafb", 270 .name = "pmagbafb",
271 .bus = &tc_bus_type, 271 .bus = &tc_bus_type,
272 .probe = pmagbafb_probe, 272 .probe = pmagbafb_probe,
273 .remove = __exit_p(pmagbafb_remove), 273 .remove = pmagbafb_remove,
274 }, 274 },
275}; 275};
276 276
diff --git a/drivers/video/fbdev/pmagb-b-fb.c b/drivers/video/fbdev/pmagb-b-fb.c
index a7a179a0bb33..46e96c451506 100644
--- a/drivers/video/fbdev/pmagb-b-fb.c
+++ b/drivers/video/fbdev/pmagb-b-fb.c
@@ -353,7 +353,7 @@ err_alloc:
353 return err; 353 return err;
354} 354}
355 355
356static int __exit pmagbbfb_remove(struct device *dev) 356static int pmagbbfb_remove(struct device *dev)
357{ 357{
358 struct tc_dev *tdev = to_tc_dev(dev); 358 struct tc_dev *tdev = to_tc_dev(dev);
359 struct fb_info *info = dev_get_drvdata(dev); 359 struct fb_info *info = dev_get_drvdata(dev);
@@ -388,7 +388,7 @@ static struct tc_driver pmagbbfb_driver = {
388 .name = "pmagbbfb", 388 .name = "pmagbbfb",
389 .bus = &tc_bus_type, 389 .bus = &tc_bus_type,
390 .probe = pmagbbfb_probe, 390 .probe = pmagbbfb_probe,
391 .remove = __exit_p(pmagbbfb_remove), 391 .remove = pmagbbfb_remove,
392 }, 392 },
393}; 393};
394 394
diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c
index ef73f14d7ba0..b21a89b03fb4 100644
--- a/drivers/video/fbdev/pxafb.c
+++ b/drivers/video/fbdev/pxafb.c
@@ -645,7 +645,7 @@ static void overlay1fb_disable(struct pxafb_layer *ofb)
645 lcd_writel(ofb->fbi, FBR1, ofb->fbi->fdadr[DMA_OV1] | 0x3); 645 lcd_writel(ofb->fbi, FBR1, ofb->fbi->fdadr[DMA_OV1] | 0x3);
646 646
647 if (wait_for_completion_timeout(&ofb->branch_done, 1 * HZ) == 0) 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 lcd_writel(ofb->fbi, LCCR5, lccr5); 650 lcd_writel(ofb->fbi, LCCR5, lccr5);
651} 651}
@@ -710,7 +710,7 @@ static void overlay2fb_disable(struct pxafb_layer *ofb)
710 lcd_writel(ofb->fbi, FBR4, ofb->fbi->fdadr[DMA_OV2_Cr] | 0x3); 710 lcd_writel(ofb->fbi, FBR4, ofb->fbi->fdadr[DMA_OV2_Cr] | 0x3);
711 711
712 if (wait_for_completion_timeout(&ofb->branch_done, 1 * HZ) == 0) 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
716static struct pxafb_layer_ops ofb_ops[] = { 716static struct pxafb_layer_ops ofb_ops[] = {
@@ -1187,8 +1187,7 @@ int pxafb_smart_flush(struct fb_info *info)
1187 lcd_writel(fbi, LCCR0, fbi->reg_lccr0 | LCCR0_ENB); 1187 lcd_writel(fbi, LCCR0, fbi->reg_lccr0 | LCCR0_ENB);
1188 1188
1189 if (wait_for_completion_timeout(&fbi->command_done, HZ/2) == 0) { 1189 if (wait_for_completion_timeout(&fbi->command_done, HZ/2) == 0) {
1190 pr_warning("%s: timeout waiting for command done\n", 1190 pr_warn("%s: timeout waiting for command done\n", __func__);
1191 __func__);
1192 ret = -ETIMEDOUT; 1191 ret = -ETIMEDOUT;
1193 } 1192 }
1194 1193
diff --git a/drivers/video/fbdev/sm501fb.c b/drivers/video/fbdev/sm501fb.c
index d80bc8a3200f..67e314fdd947 100644
--- a/drivers/video/fbdev/sm501fb.c
+++ b/drivers/video/fbdev/sm501fb.c
@@ -1600,6 +1600,7 @@ static int sm501fb_start(struct sm501fb_info *info,
1600 info->fbmem = ioremap(res->start, resource_size(res)); 1600 info->fbmem = ioremap(res->start, resource_size(res));
1601 if (info->fbmem == NULL) { 1601 if (info->fbmem == NULL) {
1602 dev_err(dev, "cannot remap framebuffer\n"); 1602 dev_err(dev, "cannot remap framebuffer\n");
1603 ret = -ENXIO;
1603 goto err_mem_res; 1604 goto err_mem_res;
1604 } 1605 }
1605 1606
diff --git a/drivers/video/fbdev/udlfb.c b/drivers/video/fbdev/udlfb.c
index e9c2f7ba3c8e..6a3c353de7c3 100644
--- a/drivers/video/fbdev/udlfb.c
+++ b/drivers/video/fbdev/udlfb.c
@@ -1487,15 +1487,25 @@ static struct device_attribute fb_device_attrs[] = {
1487static int dlfb_select_std_channel(struct dlfb_data *dev) 1487static int dlfb_select_std_channel(struct dlfb_data *dev)
1488{ 1488{
1489 int ret; 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 0x1C, 0x88, 0x5E, 0x15, 1493 0x1C, 0x88, 0x5E, 0x15,
1492 0x60, 0xFE, 0xC6, 0x97, 1494 0x60, 0xFE, 0xC6, 0x97,
1493 0x16, 0x3D, 0x47, 0xF2 }; 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 ret = usb_control_msg(dev->udev, usb_sndctrlpipe(dev->udev, 0), 1502 ret = usb_control_msg(dev->udev, usb_sndctrlpipe(dev->udev, 0),
1496 NR_USB_REQUEST_CHANNEL, 1503 NR_USB_REQUEST_CHANNEL,
1497 (USB_DIR_OUT | USB_TYPE_VENDOR), 0, 0, 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 return ret; 1509 return ret;
1500} 1510}
1501 1511
diff --git a/drivers/video/fbdev/xen-fbfront.c b/drivers/video/fbdev/xen-fbfront.c
index 3ee309c50b2d..46f63960fa9e 100644
--- a/drivers/video/fbdev/xen-fbfront.c
+++ b/drivers/video/fbdev/xen-fbfront.c
@@ -18,6 +18,8 @@
18 * frame buffer. 18 * frame buffer.
19 */ 19 */
20 20
21#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
22
21#include <linux/console.h> 23#include <linux/console.h>
22#include <linux/kernel.h> 24#include <linux/kernel.h>
23#include <linux/errno.h> 25#include <linux/errno.h>
@@ -380,10 +382,18 @@ static int xenfb_probe(struct xenbus_device *dev,
380 video[KPARAM_MEM] = val; 382 video[KPARAM_MEM] = val;
381 } 383 }
382 384
385 video[KPARAM_WIDTH] = xenbus_read_unsigned(dev->otherend, "width",
386 video[KPARAM_WIDTH]);
387 video[KPARAM_HEIGHT] = xenbus_read_unsigned(dev->otherend, "height",
388 video[KPARAM_HEIGHT]);
389
383 /* If requested res does not fit in available memory, use default */ 390 /* If requested res does not fit in available memory, use default */
384 fb_size = video[KPARAM_MEM] * 1024 * 1024; 391 fb_size = video[KPARAM_MEM] * 1024 * 1024;
385 if (video[KPARAM_WIDTH] * video[KPARAM_HEIGHT] * XENFB_DEPTH / 8 392 if (video[KPARAM_WIDTH] * video[KPARAM_HEIGHT] * XENFB_DEPTH / 8
386 > fb_size) { 393 > fb_size) {
394 pr_warn("display parameters %d,%d,%d invalid, use defaults\n",
395 video[KPARAM_MEM], video[KPARAM_WIDTH],
396 video[KPARAM_HEIGHT]);
387 video[KPARAM_WIDTH] = XENFB_WIDTH; 397 video[KPARAM_WIDTH] = XENFB_WIDTH;
388 video[KPARAM_HEIGHT] = XENFB_HEIGHT; 398 video[KPARAM_HEIGHT] = XENFB_HEIGHT;
389 fb_size = XENFB_DEFAULT_FB_LEN; 399 fb_size = XENFB_DEFAULT_FB_LEN;
diff --git a/drivers/video/logo/logo.c b/drivers/video/logo/logo.c
index b6bc4a0bda2a..4d50bfd13e7c 100644
--- a/drivers/video/logo/logo.c
+++ b/drivers/video/logo/logo.c
@@ -34,7 +34,7 @@ static int __init fb_logo_late_init(void)
34 return 0; 34 return 0;
35} 35}
36 36
37late_initcall(fb_logo_late_init); 37late_initcall_sync(fb_logo_late_init);
38 38
39/* logo's are marked __initdata. Use __ref to tell 39/* logo's are marked __initdata. Use __ref to tell
40 * modpost that it is intended that this function uses data 40 * modpost that it is intended that this function uses data
diff --git a/include/linux/platform_data/video-imxfb.h b/include/linux/platform_data/video-imxfb.h
index a5c0a71ec914..cf9348b376ac 100644
--- a/include/linux/platform_data/video-imxfb.h
+++ b/include/linux/platform_data/video-imxfb.h
@@ -50,6 +50,7 @@
50struct imx_fb_videomode { 50struct imx_fb_videomode {
51 struct fb_videomode mode; 51 struct fb_videomode mode;
52 u32 pcr; 52 u32 pcr;
53 bool aus_mode;
53 unsigned char bpp; 54 unsigned char bpp;
54}; 55};
55 56