Skip to content

Commit 4892c6f

Browse files
committed
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()
2 parents 55a1ab5 + 34bf129 commit 4892c6f

File tree

21 files changed

+81
-38
lines changed

21 files changed

+81
-38
lines changed

Documentation/devicetree/bindings/display/imx/fsl,imx-fb.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Required nodes:
1313
Additional, the display node has to define properties:
1414
- bits-per-pixel: Bits per pixel
1515
- fsl,pcr: LCDC PCR value
16+
A display node may optionally define
17+
- fsl,aus-mode: boolean to enable AUS mode (only for imx21)
1618

1719
Optional properties:
1820
- lcd-supply: Regulator for LCD supply voltage.

drivers/video/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ obj-$(CONFIG_VGASTATE) += vgastate.o
22
obj-$(CONFIG_HDMI) += hdmi.o
33

44
obj-$(CONFIG_VT) += console/
5+
obj-$(CONFIG_FB_STI) += console/
56
obj-$(CONFIG_LOGO) += logo/
67
obj-y += backlight/
78

drivers/video/console/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ menu "Console display driver support"
66

77
config VGA_CONSOLE
88
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 && \
1010
!SUPERH && !BLACKFIN && !AVR32 && !MN10300 && !CRIS && \
1111
(!ARM || ARCH_FOOTBRIDGE || ARCH_INTEGRATOR || ARCH_NETWINDER) && \
1212
!ARM64 && !ARC && !MICROBLAZE && !OPENRISC

drivers/video/fbdev/Kconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -689,8 +689,6 @@ config FB_STI
689689
select FB_CFB_FILLRECT
690690
select FB_CFB_COPYAREA
691691
select FB_CFB_IMAGEBLIT
692-
select STI_CONSOLE
693-
select VT
694692
default y
695693
---help---
696694
STI refers to the HP "Standard Text Interface" which is a set of

drivers/video/fbdev/acornfb.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ extern unsigned int vram_size; /* set by setup.c */
101101
#ifdef HAS_VIDC20
102102
#include <mach/acornfb.h>
103103

104-
#define MAX_SIZE 2*1024*1024
104+
#define MAX_SIZE (2*1024*1024)
105105

106106
/* VIDC20 has a different set of rules from the VIDC:
107107
* hcr : must be multiple of 4
@@ -162,7 +162,7 @@ static void acornfb_set_timing(struct fb_info *info)
162162
if (memcmp(&current_vidc, &vidc, sizeof(vidc))) {
163163
current_vidc = vidc;
164164

165-
vidc_writel(VIDC20_CTRL| vidc.control);
165+
vidc_writel(VIDC20_CTRL | vidc.control);
166166
vidc_writel(0xd0000000 | vidc.pll_ctl);
167167
vidc_writel(0x80000000 | vidc.h_cycle);
168168
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,
297297
pal.p = 0;
298298
vidc_writel(0x10000000);
299299
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;
301301
pal.vidc20.green = current_par.palette[(i >> 1) & 31].vidc20.green;
302302
pal.vidc20.blue = current_par.palette[(i >> 2) & 31].vidc20.blue;
303303
vidc_writel(pal.p);
@@ -1043,8 +1043,7 @@ static int acornfb_probe(struct platform_device *dev)
10431043
base = dma_alloc_wc(current_par.dev, size, &handle,
10441044
GFP_KERNEL);
10451045
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");
10481047
return -ENOMEM;
10491048
}
10501049

@@ -1103,8 +1102,7 @@ static int acornfb_probe(struct platform_device *dev)
11031102
v_sync = h_sync / (fb_info.var.yres + fb_info.var.upper_margin +
11041103
fb_info.var.lower_margin + fb_info.var.vsync_len);
11051104

1106-
printk(KERN_INFO "Acornfb: %dkB %cRAM, %s, using %dx%d, "
1107-
"%d.%03dkHz, %dHz\n",
1105+
printk(KERN_INFO "Acornfb: %dkB %cRAM, %s, using %dx%d, %d.%03dkHz, %dHz\n",
11081106
fb_info.fix.smem_len / 1024,
11091107
current_par.using_vram ? 'V' : 'D',
11101108
VIDC_NAME, fb_info.var.xres, fb_info.var.yres,

drivers/video/fbdev/amba-clcd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -881,8 +881,8 @@ static int clcdfb_of_dma_setup(struct clcd_fb *fb)
881881
if (err)
882882
return err;
883883

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);
886886
fb->fb.screen_base = dma_alloc_coherent(&fb->dev->dev, framesize,
887887
&dma, GFP_KERNEL);
888888
if (!fb->fb.screen_base)

drivers/video/fbdev/aty/radeon_base.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2453,8 +2453,8 @@ static int radeonfb_pci_register(struct pci_dev *pdev,
24532453
err |= sysfs_create_bin_file(&rinfo->pdev->dev.kobj,
24542454
&edid2_attr);
24552455
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__);
24582458

24592459
/* save current mode regs before we switch into the new one
24602460
* so we can restore this upon __exit

drivers/video/fbdev/core/fbmon.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,9 +1073,9 @@ void fb_edid_add_monspecs(unsigned char *edid, struct fb_monspecs *specs)
10731073
for (i = specs->modedb_len + num; i < specs->modedb_len + num + svd_n; i++) {
10741074
int idx = svd[i - specs->modedb_len - num];
10751075
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);
10771077
} else if (!cea_modes[idx].xres) {
1078-
pr_warning("Unimplemented SVD code %d\n", idx);
1078+
pr_warn("Unimplemented SVD code %d\n", idx);
10791079
} else {
10801080
memcpy(&m[i], cea_modes + idx, sizeof(m[i]));
10811081
pr_debug("Adding SVD #%d: %ux%u@%u\n", idx,

drivers/video/fbdev/i810/i810_main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ static u32 voffset;
8181
static int i810fb_cursor(struct fb_info *info, struct fb_cursor *cursor);
8282
static int i810fb_init_pci(struct pci_dev *dev,
8383
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);
8585
static int i810fb_resume(struct pci_dev *dev);
8686
static int i810fb_suspend(struct pci_dev *dev, pm_message_t state);
8787

@@ -128,7 +128,7 @@ static struct pci_driver i810fb_driver = {
128128
.name = "i810fb",
129129
.id_table = i810fb_pci_tbl,
130130
.probe = i810fb_init_pci,
131-
.remove = __exit_p(i810fb_remove_pci),
131+
.remove = i810fb_remove_pci,
132132
.suspend = i810fb_suspend,
133133
.resume = i810fb_resume,
134134
};
@@ -2123,7 +2123,7 @@ static void i810fb_release_resource(struct fb_info *info,
21232123

21242124
}
21252125

2126-
static void __exit i810fb_remove_pci(struct pci_dev *dev)
2126+
static void i810fb_remove_pci(struct pci_dev *dev)
21272127
{
21282128
struct fb_info *info = pci_get_drvdata(dev);
21292129
struct i810fb_par *par = info->par;

drivers/video/fbdev/imxfb.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@
117117

118118
#define IMXFB_LSCR1_DEFAULT 0x00120300
119119

120+
#define LCDC_LAUSCR 0x80
121+
#define LAUSCR_AUS_MODE (1<<31)
122+
120123
/* Used fb-mode. Can be set on kernel command line, therefore file-static. */
121124
static const char *fb_mode;
122125

@@ -158,6 +161,7 @@ struct imxfb_info {
158161
dma_addr_t dbar2;
159162

160163
u_int pcr;
164+
u_int lauscr;
161165
u_int pwmr;
162166
u_int lscr1;
163167
u_int dmacr;
@@ -422,6 +426,11 @@ static int imxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
422426
pcr |= imxfb_mode->pcr & ~(0x3f | (7 << 25));
423427

424428
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;
425434

426435
/*
427436
* 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
638647
if (fbi->dmacr)
639648
writel(fbi->dmacr, fbi->regs + LCDC_DMACR);
640649

650+
if (fbi->lauscr)
651+
writel(fbi->lauscr, fbi->regs + LCDC_LAUSCR);
652+
641653
return 0;
642654
}
643655

@@ -734,6 +746,11 @@ static int imxfb_of_read_mode(struct device *dev, struct device_node *np,
734746
imxfb_mode->bpp = bpp;
735747
imxfb_mode->pcr = pcr;
736748

749+
/*
750+
* fsl,aus-mode is optional
751+
*/
752+
imxfb_mode->aus_mode = of_property_read_bool(np, "fsl,aus-mode");
753+
737754
return 0;
738755
}
739756

0 commit comments

Comments
 (0)