Skip to content

Commit

Permalink
Merge tag 'fbdev-v4.14' of git://github.com/bzolnier/linux
Browse files Browse the repository at this point in the history
Pull fbdev updates from Bartlomiej Zolnierkiewicz:

 - make fbcon a built-time depency for fbdev (fbcon was tristate option
   before, now it is a bool) - this is a first step in preparations for
   making console_lock usage saner (currently it acts like the BKL for
   all things fbdev/fbcon) (Daniel Vetter)

 - add fbcon=margin:<color> command line option to select the fbcon
   margin color (David Lechner)

 - add DMI quirk table for x86 systems which need fbcon rotation
   (devices like Asus T100HA, GPD Pocket, the GPD win and the I.T.Works
   TW891) (Hans de Goede)

 - fix 1bpp logo support for unusual width (needed by LEGO MINDSTORMS
   EV3) (David Lechner)

 - enable Xilinx FB driver for ARM ZynqMP platform (Michal Simek)

 - fix use after free in the error path of udlfb driver (Anton Vasilyev)

 - fix error return code handling in pxa3xx_gcu driver (Gustavo A. R.
   Silva)

 - fix bootparams.screeninfo arguments checking in vgacon (Jan H.
   Schönherr)

 - do not leak uninitialized padding in clk to userspace in the debug
   code of atyfb driver (Vladis Dronov)

 - fix compiler warnings in fbcon code and matroxfb driver (Arnd
   Bergmann)

 - convert fbdev susbsytem to using %pOF instead of full_name (Rob
   Herring)

 - structures constifications (Arvind Yadav, Bhumika Goyal, Gustavo A.
   R. Silva, Julia Lawall)

 - misc cleanups (Gustavo A. R. Silva, Hyun Kwon, Julia Lawall, Kuninori
   Morimoto, Lynn Lei)

* tag 'fbdev-v4.14' of git://github.com/bzolnier/linux: (75 commits)
  video/console: Update BIOS dates list for GPD win console rotation DMI quirk
  video/console: Add rotated LCD-panel DMI quirk for the VIOS LTH17
  video: fbdev: sis: fix duplicated code for different branches
  video: fbdev: make fb_var_screeninfo const
  video: fbdev: aty: do not leak uninitialized padding in clk to userspace
  vgacon: Prevent faulty bootparams.screeninfo from causing harm
  video: fbdev: make fb_videomode const
  video/console: Add new BIOS date for GPD pocket to dmi quirk table
  fbcon: remove restriction on margin color
  video: ARM CLCD: constify amba_id
  video: fm2fb: constify zorro_device_id
  video: fbdev: annotate fb_fix_screeninfo with const and __initconst
  omapfb: constify omap_video_timings structures
  video: fbdev: udlfb: Fix use after free on dlfb_usb_probe error path
  fbdev: i810: make fb_ops const
  fbdev: matrox: make fb_ops const
  video: fbdev: pxa3xx_gcu: fix error return code in pxa3xx_gcu_probe()
  video: fbdev: Enable Xilinx FB for ZynqMP
  video: fbdev: Fix multiple style issues in xilinxfb
  video: fbdev: udlfb: constify usb_device_id.
  ...
  • Loading branch information
torvalds committed Sep 14, 2017
2 parents 939ae58 + 23e9f4e commit 503f045
Show file tree
Hide file tree
Showing 94 changed files with 398 additions and 269 deletions.
7 changes: 7 additions & 0 deletions Documentation/fb/fbcon.txt
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,13 @@ C. Boot options
Actually, the underlying fb driver is totally ignorant of console
rotation.

5. fbcon=margin:<color>

This option specifies the color of the margins. The margins are the
leftover area at the right and the bottom of the screen that are not
used by text. By default, this area will be black. The 'color' value
is an integer number that depends on the framebuffer driver being used.

C. Attaching, Detaching and Unloading

Before going on how to attach, detach and unload the framebuffer console, an
Expand Down
2 changes: 1 addition & 1 deletion drivers/video/console/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ config DUMMY_CONSOLE_ROWS
Select 25 if you use a 640x480 resolution by default.

config FRAMEBUFFER_CONSOLE
tristate "Framebuffer Console support"
bool "Framebuffer Console support"
depends on FB && !UML
select VT_HW_CONSOLE_BINDING
select CRC32
Expand Down
8 changes: 0 additions & 8 deletions drivers/video/console/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,5 @@ obj-$(CONFIG_SGI_NEWPORT_CONSOLE) += newport_con.o
obj-$(CONFIG_STI_CONSOLE) += sticon.o sticore.o
obj-$(CONFIG_VGA_CONSOLE) += vgacon.o
obj-$(CONFIG_MDA_CONSOLE) += mdacon.o
obj-$(CONFIG_FRAMEBUFFER_CONSOLE) += fbcon.o bitblit.o softcursor.o
ifeq ($(CONFIG_FB_TILEBLITTING),y)
obj-$(CONFIG_FRAMEBUFFER_CONSOLE) += tileblit.o
endif
ifeq ($(CONFIG_FRAMEBUFFER_CONSOLE_ROTATION),y)
obj-$(CONFIG_FRAMEBUFFER_CONSOLE) += fbcon_rotate.o fbcon_cw.o fbcon_ud.o \
fbcon_ccw.o
endif

obj-$(CONFIG_FB_STI) += sticore.o
5 changes: 2 additions & 3 deletions drivers/video/console/vgacon.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,9 +398,8 @@ static const char *vgacon_startup(void)
#endif
}

/* boot_params.screen_info initialized? */
if ((screen_info.orig_video_mode == 0) &&
(screen_info.orig_video_lines == 0) &&
/* boot_params.screen_info reasonably initialized? */
if ((screen_info.orig_video_lines == 0) ||
(screen_info.orig_video_cols == 0))
goto no_vga;

Expand Down
2 changes: 1 addition & 1 deletion drivers/video/fbdev/68328fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ static struct fb_var_screeninfo mc68x328fb_default __initdata = {
.vmode = FB_VMODE_NONINTERLACED,
};

static struct fb_fix_screeninfo mc68x328fb_fix __initdata = {
static const struct fb_fix_screeninfo mc68x328fb_fix __initconst = {
.id = "68328fb",
.type = FB_TYPE_PACKED_PIXELS,
.xpanstep = 1,
Expand Down
2 changes: 1 addition & 1 deletion drivers/video/fbdev/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2173,7 +2173,7 @@ config FB_PS3_DEFAULT_SIZE_M

config FB_XILINX
tristate "Xilinx frame buffer support"
depends on FB && (XILINX_VIRTEX || MICROBLAZE || ARCH_ZYNQ)
depends on FB && (XILINX_VIRTEX || MICROBLAZE || ARCH_ZYNQ || ARCH_ZYNQMP)
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
Expand Down
2 changes: 1 addition & 1 deletion drivers/video/fbdev/amba-clcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,7 @@ static struct clcd_vendor_data vendor_nomadik = {
.init_panel = nomadik_clcd_init_panel,
};

static struct amba_id clcdfb_id_table[] = {
static const struct amba_id clcdfb_id_table[] = {
{
.id = 0x00041110,
.mask = 0x000ffffe,
Expand Down
2 changes: 1 addition & 1 deletion drivers/video/fbdev/arkfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1157,7 +1157,7 @@ static int ark_pci_resume (struct pci_dev* dev)

/* List of boards that we are trying to support */

static struct pci_device_id ark_devices[] = {
static const struct pci_device_id ark_devices[] = {
{PCI_DEVICE(0xEDD8, 0xA099)},
{0, 0, 0, 0, 0, 0, 0}
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/video/fbdev/asiliantfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ static void asiliantfb_remove(struct pci_dev *dp)
framebuffer_release(p);
}

static struct pci_device_id asiliantfb_pci_tbl[] = {
static const struct pci_device_id asiliantfb_pci_tbl[] = {
{ PCI_VENDOR_ID_CT, PCI_DEVICE_ID_CT_69000, PCI_ANY_ID, PCI_ANY_ID },
{ 0 }
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/video/fbdev/atmel_lcdfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ static inline void atmel_lcdfb_power_control(struct atmel_lcdfb_info *sinfo, int
}
}

static struct fb_fix_screeninfo atmel_lcdfb_fix __initdata = {
static const struct fb_fix_screeninfo atmel_lcdfb_fix __initconst = {
.type = FB_TYPE_PACKED_PIXELS,
.visual = FB_VISUAL_TRUECOLOR,
.xpanstep = 0,
Expand Down
4 changes: 2 additions & 2 deletions drivers/video/fbdev/aty/aty128fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ static const struct fb_var_screeninfo default_var = {

/* default modedb mode */
/* 640x480, 60 Hz, Non-Interlaced (25.172 MHz dotclock) */
static struct fb_videomode defaultmode = {
static const struct fb_videomode defaultmode = {
.refresh = 60,
.xres = 640,
.yres = 480,
Expand Down Expand Up @@ -166,7 +166,7 @@ static int aty128_pci_resume(struct pci_dev *pdev);
static int aty128_do_resume(struct pci_dev *pdev);

/* supported Rage128 chipsets */
static struct pci_device_id aty128_pci_tbl[] = {
static const struct pci_device_id aty128_pci_tbl[] = {
{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_LE,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_M3_pci },
{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_LF,
Expand Down
6 changes: 3 additions & 3 deletions drivers/video/fbdev/aty/atyfb_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ static struct fb_var_screeninfo default_var = {
0, FB_VMODE_NONINTERLACED
};

static struct fb_videomode defmode = {
static const struct fb_videomode defmode = {
/* 640x480 @ 60 Hz, 31.5 kHz hsync */
NULL, 60, 640, 480, 39721, 40, 24, 32, 11, 96, 2,
0, FB_VMODE_NONINTERLACED
Expand Down Expand Up @@ -1855,7 +1855,7 @@ static int atyfb_ioctl(struct fb_info *info, u_int cmd, u_long arg)
#if defined(DEBUG) && defined(CONFIG_FB_ATY_CT)
case ATYIO_CLKR:
if (M64_HAS(INTEGRATED)) {
struct atyclk clk;
struct atyclk clk = { 0 };
union aty_pll *pll = &par->pll;
u32 dsp_config = pll->ct.dsp_config;
u32 dsp_on_off = pll->ct.dsp_on_off;
Expand Down Expand Up @@ -3756,7 +3756,7 @@ static void atyfb_pci_remove(struct pci_dev *pdev)
atyfb_remove(info);
}

static struct pci_device_id atyfb_pci_tbl[] = {
static const struct pci_device_id atyfb_pci_tbl[] = {
#ifdef CONFIG_FB_ATY_GX
{ PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_CHIP_MACH64GX) },
{ PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_CHIP_MACH64CX) },
Expand Down
6 changes: 3 additions & 3 deletions drivers/video/fbdev/aty/radeon_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
#define CHIP_DEF(id, family, flags) \
{ PCI_VENDOR_ID_ATI, id, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (flags) | (CHIP_FAMILY_##family) }

static struct pci_device_id radeonfb_pci_table[] = {
static const struct pci_device_id radeonfb_pci_table[] = {
/* Radeon Xpress 200m */
CHIP_DEF(PCI_CHIP_RS480_5955, RS480, CHIP_HAS_CRTC2 | CHIP_IS_IGP | CHIP_IS_MOBILITY),
CHIP_DEF(PCI_CHIP_RS482_5975, RS480, CHIP_HAS_CRTC2 | CHIP_IS_IGP | CHIP_IS_MOBILITY),
Expand Down Expand Up @@ -2241,7 +2241,7 @@ static ssize_t radeon_show_edid2(struct file *filp, struct kobject *kobj,
return radeon_show_one_edid(buf, off, count, rinfo->mon2_EDID);
}

static struct bin_attribute edid1_attr = {
static const struct bin_attribute edid1_attr = {
.attr = {
.name = "edid1",
.mode = 0444,
Expand All @@ -2250,7 +2250,7 @@ static struct bin_attribute edid1_attr = {
.read = radeon_show_edid1,
};

static struct bin_attribute edid2_attr = {
static const struct bin_attribute edid2_attr = {
.attr = {
.name = "edid2",
.mode = 0444,
Expand Down
2 changes: 1 addition & 1 deletion drivers/video/fbdev/bfin-lq035q1-fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ static int bfin_lq035q1_resume(struct device *dev)
return 0;
}

static struct dev_pm_ops bfin_lq035q1_dev_pm_ops = {
static const struct dev_pm_ops bfin_lq035q1_dev_pm_ops = {
.suspend = bfin_lq035q1_suspend,
.resume = bfin_lq035q1_resume,
};
Expand Down
4 changes: 2 additions & 2 deletions drivers/video/fbdev/bw2.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,8 @@ static int bw2_probe(struct platform_device *op)

dev_set_drvdata(&op->dev, info);

printk(KERN_INFO "%s: bwtwo at %lx:%lx\n",
dp->full_name, par->which_io, info->fix.smem_start);
printk(KERN_INFO "%pOF: bwtwo at %lx:%lx\n",
dp, par->which_io, info->fix.smem_start);

return 0;

Expand Down
4 changes: 2 additions & 2 deletions drivers/video/fbdev/cg14.c
Original file line number Diff line number Diff line change
Expand Up @@ -553,8 +553,8 @@ static int cg14_probe(struct platform_device *op)

dev_set_drvdata(&op->dev, info);

printk(KERN_INFO "%s: cgfourteen at %lx:%lx, %dMB\n",
dp->full_name,
printk(KERN_INFO "%pOF: cgfourteen at %lx:%lx, %dMB\n",
dp,
par->iospace, info->fix.smem_start,
par->ramsize >> 20);

Expand Down
4 changes: 2 additions & 2 deletions drivers/video/fbdev/cg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,8 @@ static int cg3_probe(struct platform_device *op)

dev_set_drvdata(&op->dev, info);

printk(KERN_INFO "%s: cg3 at %lx:%lx\n",
dp->full_name, par->which_io, info->fix.smem_start);
printk(KERN_INFO "%pOF: cg3 at %lx:%lx\n",
dp, par->which_io, info->fix.smem_start);

return 0;

Expand Down
4 changes: 2 additions & 2 deletions drivers/video/fbdev/cg6.c
Original file line number Diff line number Diff line change
Expand Up @@ -810,8 +810,8 @@ static int cg6_probe(struct platform_device *op)

dev_set_drvdata(&op->dev, info);

printk(KERN_INFO "%s: CGsix [%s] at %lx:%lx\n",
dp->full_name, info->fix.id,
printk(KERN_INFO "%pOF: CGsix [%s] at %lx:%lx\n",
dp, info->fix.id,
par->which_io, info->fix.smem_start);

return 0;
Expand Down
4 changes: 2 additions & 2 deletions drivers/video/fbdev/chipsfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ static void chips_hw_init(void)
write_fr(chips_init_fr[i].addr, chips_init_fr[i].data);
}

static struct fb_fix_screeninfo chipsfb_fix = {
static const struct fb_fix_screeninfo chipsfb_fix = {
.id = "C&T 65550",
.type = FB_TYPE_PACKED_PIXELS,
.visual = FB_VISUAL_PSEUDOCOLOR,
Expand All @@ -309,7 +309,7 @@ static struct fb_fix_screeninfo chipsfb_fix = {
.smem_len = 0x100000, /* 1MB */
};

static struct fb_var_screeninfo chipsfb_var = {
static const struct fb_var_screeninfo chipsfb_var = {
.xres = 800,
.yres = 600,
.xres_virtual = 800,
Expand Down
2 changes: 1 addition & 1 deletion drivers/video/fbdev/cobalt_lcdfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ static void lcd_clear(struct fb_info *info)
lcd_write_control(info, LCD_RESET);
}

static struct fb_fix_screeninfo cobalt_lcdfb_fix = {
static const struct fb_fix_screeninfo cobalt_lcdfb_fix = {
.id = "cobalt-lcd",
.type = FB_TYPE_TEXT,
.type_aux = FB_AUX_TEXT_MDA,
Expand Down
14 changes: 14 additions & 0 deletions drivers/video/fbdev/core/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ obj-$(CONFIG_FB) += fb.o
fb-y := fbmem.o fbmon.o fbcmap.o fbsysfs.o \
modedb.o fbcvt.o
fb-$(CONFIG_FB_DEFERRED_IO) += fb_defio.o

ifeq ($(CONFIG_FRAMEBUFFER_CONSOLE),y)
fb-y += fbcon.o bitblit.o softcursor.o
ifeq ($(CONFIG_FB_TILEBLITTING),y)
fb-y += tileblit.o
endif
ifeq ($(CONFIG_FRAMEBUFFER_CONSOLE_ROTATION),y)
fb-y += fbcon_rotate.o fbcon_cw.o fbcon_ud.o \
fbcon_ccw.o
endif
ifeq ($(CONFIG_DMI),y)
fb-y += fbcon_dmi_quirks.o
endif
endif
fb-objs := $(fb-y)

obj-$(CONFIG_FB_CFB_FILLRECT) += cfbfillrect.o
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ static void bit_putcs(struct vc_data *vc, struct fb_info *info,
}

static void bit_clear_margins(struct vc_data *vc, struct fb_info *info,
int bottom_only)
int color, int bottom_only)
{
unsigned int cw = vc->vc_font.width;
unsigned int ch = vc->vc_font.height;
Expand All @@ -213,7 +213,7 @@ static void bit_clear_margins(struct vc_data *vc, struct fb_info *info,
unsigned int bs = info->var.yres - bh;
struct fb_fillrect region;

region.color = 0;
region.color = color;
region.rop = ROP_COPY;

if (rw && !bottom_only) {
Expand Down Expand Up @@ -416,7 +416,3 @@ void fbcon_set_bitops(struct fbcon_ops *ops)

EXPORT_SYMBOL(fbcon_set_bitops);

MODULE_AUTHOR("Antonino Daplas <[email protected]>");
MODULE_DESCRIPTION("Bit Blitting Operation");
MODULE_LICENSE("GPL");

Loading

0 comments on commit 503f045

Please sign in to comment.