fbdev changes for v4.12:

- 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)
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABCAAGBQJZFFnCAAoJEH4ztj+gR8IL7wQQAIRj9F7PGMOMtf5wXD6Uc6az
 0LUtQPgP8zmJs6Q8zywaFsuQ7q4reh6RCJxByHMcxFGS8p4cIbCRhaijdavf/Qc0
 2HVN9AXlQTh6X8987rDapCdU7jnfswLvzs0m63Kq1eW6CdvPFZUR4ZgKGVavUUW1
 ZxkkoNzhM1277WU7RZP56mTB3pAecQJjt1BTLctAixWrQfQPHJfeuAJbOz4OLAYh
 1RFNvrUyB9hiFYkxh5mbFq9qh8pDgxt7XNwdR9faEPk81GZMti/9wC2L6cnpvnhg
 dcfrsiioY2We29ErntQQEzzmMQPOiEKTkFMXcRNdn17hcSR6madEIhdS57PKgmt+
 ZOi9Uw/6CXSic3UQbwM8jtcmyEM0hJ2L6qAQFmYe45E8sZQZZgCDGm13ObwtT65Z
 4Z6UfrxJ4Uckaoje1Tq1G4eLqBIPTDJhj/QcofR6tLcJqupUe/IRa4UbaQySZcpm
 JXNI/Av9tQy7hQojQmcLXN21VjrFKZJprMJlQ3ABkDJribsuEfMrghOu2fEult6T
 /w3EpFMA05SAoItpVJMs/rEgeiNJh4+PnwnLyNDAJLBctmDHSB3TcARB5pN0C+9B
 HN04+cVz0I++4trPo4YdEWYFGYYst6VrD0vO1AClg7d5a6uqmdkszrwA3Jv+0akn
 na9jp5/3o6Wk/mYvR4LL
 =C0jZ
 -----END PGP SIGNATURE-----

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()
This commit is contained in:
Linus Torvalds 2017-05-11 11:12:26 -07:00
commit 4892c6f72e
21 changed files with 81 additions and 38 deletions

View File

@ -13,6 +13,8 @@ Required nodes:
Additional, the display node has to define properties:
- bits-per-pixel: Bits per pixel
- fsl,pcr: LCDC PCR value
A display node may optionally define
- fsl,aus-mode: boolean to enable AUS mode (only for imx21)
Optional properties:
- lcd-supply: Regulator for LCD supply voltage.

View File

@ -2,6 +2,7 @@ obj-$(CONFIG_VGASTATE) += vgastate.o
obj-$(CONFIG_HDMI) += hdmi.o
obj-$(CONFIG_VT) += console/
obj-$(CONFIG_FB_STI) += console/
obj-$(CONFIG_LOGO) += logo/
obj-y += backlight/

View File

@ -6,7 +6,7 @@ menu "Console display driver support"
config VGA_CONSOLE
bool "VGA text console" if EXPERT || !X86
depends on !4xx && !8xx && !SPARC && !M68K && !PARISC && !FRV && \
depends on !4xx && !PPC_8xx && !SPARC && !M68K && !PARISC && !FRV && \
!SUPERH && !BLACKFIN && !AVR32 && !MN10300 && !CRIS && \
(!ARM || ARCH_FOOTBRIDGE || ARCH_INTEGRATOR || ARCH_NETWINDER) && \
!ARM64 && !ARC && !MICROBLAZE && !OPENRISC

View File

@ -689,8 +689,6 @@ config FB_STI
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
select STI_CONSOLE
select VT
default y
---help---
STI refers to the HP "Standard Text Interface" which is a set of

View File

@ -101,7 +101,7 @@ extern unsigned int vram_size; /* set by setup.c */
#ifdef HAS_VIDC20
#include <mach/acornfb.h>
#define MAX_SIZE 2*1024*1024
#define MAX_SIZE (2*1024*1024)
/* VIDC20 has a different set of rules from the VIDC:
* hcr : must be multiple of 4
@ -162,7 +162,7 @@ static void acornfb_set_timing(struct fb_info *info)
if (memcmp(&current_vidc, &vidc, sizeof(vidc))) {
current_vidc = vidc;
vidc_writel(VIDC20_CTRL| vidc.control);
vidc_writel(VIDC20_CTRL | vidc.control);
vidc_writel(0xd0000000 | vidc.pll_ctl);
vidc_writel(0x80000000 | vidc.h_cycle);
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,
pal.p = 0;
vidc_writel(0x10000000);
for (i = 0; i < 256; i += 1) {
pal.vidc20.red = current_par.palette[ i & 31].vidc20.red;
pal.vidc20.red = current_par.palette[i & 31].vidc20.red;
pal.vidc20.green = current_par.palette[(i >> 1) & 31].vidc20.green;
pal.vidc20.blue = current_par.palette[(i >> 2) & 31].vidc20.blue;
vidc_writel(pal.p);
@ -1043,8 +1043,7 @@ static int acornfb_probe(struct platform_device *dev)
base = dma_alloc_wc(current_par.dev, size, &handle,
GFP_KERNEL);
if (base == NULL) {
printk(KERN_ERR "acornfb: unable to allocate screen "
"memory\n");
printk(KERN_ERR "acornfb: unable to allocate screen memory\n");
return -ENOMEM;
}
@ -1103,8 +1102,7 @@ static int acornfb_probe(struct platform_device *dev)
v_sync = h_sync / (fb_info.var.yres + fb_info.var.upper_margin +
fb_info.var.lower_margin + fb_info.var.vsync_len);
printk(KERN_INFO "Acornfb: %dkB %cRAM, %s, using %dx%d, "
"%d.%03dkHz, %dHz\n",
printk(KERN_INFO "Acornfb: %dkB %cRAM, %s, using %dx%d, %d.%03dkHz, %dHz\n",
fb_info.fix.smem_len / 1024,
current_par.using_vram ? 'V' : 'D',
VIDC_NAME, fb_info.var.xres, fb_info.var.yres,

View File

@ -881,8 +881,8 @@ static int clcdfb_of_dma_setup(struct clcd_fb *fb)
if (err)
return err;
framesize = fb->panel->mode.xres * fb->panel->mode.yres *
fb->panel->bpp / 8;
framesize = PAGE_ALIGN(fb->panel->mode.xres * fb->panel->mode.yres *
fb->panel->bpp / 8);
fb->fb.screen_base = dma_alloc_coherent(&fb->dev->dev, framesize,
&dma, GFP_KERNEL);
if (!fb->fb.screen_base)

View File

@ -2453,8 +2453,8 @@ static int radeonfb_pci_register(struct pci_dev *pdev,
err |= sysfs_create_bin_file(&rinfo->pdev->dev.kobj,
&edid2_attr);
if (err)
pr_warning("%s() Creating sysfs files failed, continuing\n",
__func__);
pr_warn("%s() Creating sysfs files failed, continuing\n",
__func__);
/* save current mode regs before we switch into the new one
* so we can restore this upon __exit

View File

@ -1073,9 +1073,9 @@ void fb_edid_add_monspecs(unsigned char *edid, struct fb_monspecs *specs)
for (i = specs->modedb_len + num; i < specs->modedb_len + num + svd_n; i++) {
int idx = svd[i - specs->modedb_len - num];
if (!idx || idx >= ARRAY_SIZE(cea_modes)) {
pr_warning("Reserved SVD code %d\n", idx);
pr_warn("Reserved SVD code %d\n", idx);
} else if (!cea_modes[idx].xres) {
pr_warning("Unimplemented SVD code %d\n", idx);
pr_warn("Unimplemented SVD code %d\n", idx);
} else {
memcpy(&m[i], cea_modes + idx, sizeof(m[i]));
pr_debug("Adding SVD #%d: %ux%u@%u\n", idx,

View File

@ -81,7 +81,7 @@ static u32 voffset;
static int i810fb_cursor(struct fb_info *info, struct fb_cursor *cursor);
static int i810fb_init_pci(struct pci_dev *dev,
const struct pci_device_id *entry);
static void __exit i810fb_remove_pci(struct pci_dev *dev);
static void i810fb_remove_pci(struct pci_dev *dev);
static int i810fb_resume(struct pci_dev *dev);
static int i810fb_suspend(struct pci_dev *dev, pm_message_t state);
@ -128,7 +128,7 @@ static struct pci_driver i810fb_driver = {
.name = "i810fb",
.id_table = i810fb_pci_tbl,
.probe = i810fb_init_pci,
.remove = __exit_p(i810fb_remove_pci),
.remove = i810fb_remove_pci,
.suspend = i810fb_suspend,
.resume = i810fb_resume,
};
@ -2123,7 +2123,7 @@ static void i810fb_release_resource(struct fb_info *info,
}
static void __exit i810fb_remove_pci(struct pci_dev *dev)
static void i810fb_remove_pci(struct pci_dev *dev)
{
struct fb_info *info = pci_get_drvdata(dev);
struct i810fb_par *par = info->par;

View File

@ -117,6 +117,9 @@
#define IMXFB_LSCR1_DEFAULT 0x00120300
#define LCDC_LAUSCR 0x80
#define LAUSCR_AUS_MODE (1<<31)
/* Used fb-mode. Can be set on kernel command line, therefore file-static. */
static const char *fb_mode;
@ -158,6 +161,7 @@ struct imxfb_info {
dma_addr_t dbar2;
u_int pcr;
u_int lauscr;
u_int pwmr;
u_int lscr1;
u_int dmacr;
@ -422,6 +426,11 @@ static int imxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
pcr |= imxfb_mode->pcr & ~(0x3f | (7 << 25));
fbi->pcr = pcr;
/*
* The LCDC AUS Mode Control Register does not exist on imx1.
*/
if (!is_imx1_fb(fbi) && imxfb_mode->aus_mode)
fbi->lauscr = LAUSCR_AUS_MODE;
/*
* 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
if (fbi->dmacr)
writel(fbi->dmacr, fbi->regs + LCDC_DMACR);
if (fbi->lauscr)
writel(fbi->lauscr, fbi->regs + LCDC_LAUSCR);
return 0;
}
@ -734,6 +746,11 @@ static int imxfb_of_read_mode(struct device *dev, struct device_node *np,
imxfb_mode->bpp = bpp;
imxfb_mode->pcr = pcr;
/*
* fsl,aus-mode is optional
*/
imxfb_mode->aus_mode = of_property_read_bool(np, "fsl,aus-mode");
return 0;
}

View File

@ -174,7 +174,7 @@ static void hw_guard_wait(struct mipid_device *md)
{
unsigned long wait = md->hw_guard_end - jiffies;
if ((long)wait > 0 && wait <= md->hw_guard_wait) {
if ((long)wait > 0 && time_before_eq(wait, md->hw_guard_wait)) {
set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(wait);
}

View File

@ -941,11 +941,13 @@ static int dss_init_features(struct platform_device *pdev)
return 0;
}
static void dss_uninit_ports(struct platform_device *pdev);
static int dss_init_ports(struct platform_device *pdev)
{
struct device_node *parent = pdev->dev.of_node;
struct device_node *port;
int r;
int r, ret = 0;
if (parent == NULL)
return 0;
@ -972,17 +974,21 @@ static int dss_init_ports(struct platform_device *pdev)
switch (port_type) {
case OMAP_DISPLAY_TYPE_DPI:
dpi_init_port(pdev, port);
ret = dpi_init_port(pdev, port);
break;
case OMAP_DISPLAY_TYPE_SDI:
sdi_init_port(pdev, port);
ret = sdi_init_port(pdev, port);
break;
default:
break;
}
} while ((port = omapdss_of_get_next_port(parent, port)) != NULL);
} while (!ret &&
(port = omapdss_of_get_next_port(parent, port)) != NULL);
return 0;
if (ret)
dss_uninit_ports(pdev);
return ret;
}
static void dss_uninit_ports(struct platform_device *pdev)

View File

@ -247,7 +247,7 @@ static int pmagaafb_probe(struct device *dev)
return err;
}
static int __exit pmagaafb_remove(struct device *dev)
static int pmagaafb_remove(struct device *dev)
{
struct tc_dev *tdev = to_tc_dev(dev);
struct fb_info *info = dev_get_drvdata(dev);
@ -280,7 +280,7 @@ static struct tc_driver pmagaafb_driver = {
.name = "pmagaafb",
.bus = &tc_bus_type,
.probe = pmagaafb_probe,
.remove = __exit_p(pmagaafb_remove),
.remove = pmagaafb_remove,
},
};

View File

@ -235,7 +235,7 @@ static int pmagbafb_probe(struct device *dev)
return err;
}
static int __exit pmagbafb_remove(struct device *dev)
static int pmagbafb_remove(struct device *dev)
{
struct tc_dev *tdev = to_tc_dev(dev);
struct fb_info *info = dev_get_drvdata(dev);
@ -270,7 +270,7 @@ static struct tc_driver pmagbafb_driver = {
.name = "pmagbafb",
.bus = &tc_bus_type,
.probe = pmagbafb_probe,
.remove = __exit_p(pmagbafb_remove),
.remove = pmagbafb_remove,
},
};

View File

@ -353,7 +353,7 @@ static int pmagbbfb_probe(struct device *dev)
return err;
}
static int __exit pmagbbfb_remove(struct device *dev)
static int pmagbbfb_remove(struct device *dev)
{
struct tc_dev *tdev = to_tc_dev(dev);
struct fb_info *info = dev_get_drvdata(dev);
@ -388,7 +388,7 @@ static struct tc_driver pmagbbfb_driver = {
.name = "pmagbbfb",
.bus = &tc_bus_type,
.probe = pmagbbfb_probe,
.remove = __exit_p(pmagbbfb_remove),
.remove = pmagbbfb_remove,
},
};

View File

@ -645,7 +645,7 @@ static void overlay1fb_disable(struct pxafb_layer *ofb)
lcd_writel(ofb->fbi, FBR1, ofb->fbi->fdadr[DMA_OV1] | 0x3);
if (wait_for_completion_timeout(&ofb->branch_done, 1 * HZ) == 0)
pr_warning("%s: timeout disabling overlay1\n", __func__);
pr_warn("%s: timeout disabling overlay1\n", __func__);
lcd_writel(ofb->fbi, LCCR5, lccr5);
}
@ -710,7 +710,7 @@ static void overlay2fb_disable(struct pxafb_layer *ofb)
lcd_writel(ofb->fbi, FBR4, ofb->fbi->fdadr[DMA_OV2_Cr] | 0x3);
if (wait_for_completion_timeout(&ofb->branch_done, 1 * HZ) == 0)
pr_warning("%s: timeout disabling overlay2\n", __func__);
pr_warn("%s: timeout disabling overlay2\n", __func__);
}
static struct pxafb_layer_ops ofb_ops[] = {
@ -1187,8 +1187,7 @@ int pxafb_smart_flush(struct fb_info *info)
lcd_writel(fbi, LCCR0, fbi->reg_lccr0 | LCCR0_ENB);
if (wait_for_completion_timeout(&fbi->command_done, HZ/2) == 0) {
pr_warning("%s: timeout waiting for command done\n",
__func__);
pr_warn("%s: timeout waiting for command done\n", __func__);
ret = -ETIMEDOUT;
}

View File

@ -1600,6 +1600,7 @@ static int sm501fb_start(struct sm501fb_info *info,
info->fbmem = ioremap(res->start, resource_size(res));
if (info->fbmem == NULL) {
dev_err(dev, "cannot remap framebuffer\n");
ret = -ENXIO;
goto err_mem_res;
}

View File

@ -1487,15 +1487,25 @@ static struct device_attribute fb_device_attrs[] = {
static int dlfb_select_std_channel(struct dlfb_data *dev)
{
int ret;
u8 set_def_chn[] = { 0x57, 0xCD, 0xDC, 0xA7,
void *buf;
static const u8 set_def_chn[] = {
0x57, 0xCD, 0xDC, 0xA7,
0x1C, 0x88, 0x5E, 0x15,
0x60, 0xFE, 0xC6, 0x97,
0x16, 0x3D, 0x47, 0xF2 };
buf = kmemdup(set_def_chn, sizeof(set_def_chn), GFP_KERNEL);
if (!buf)
return -ENOMEM;
ret = usb_control_msg(dev->udev, usb_sndctrlpipe(dev->udev, 0),
NR_USB_REQUEST_CHANNEL,
(USB_DIR_OUT | USB_TYPE_VENDOR), 0, 0,
set_def_chn, sizeof(set_def_chn), USB_CTRL_SET_TIMEOUT);
buf, sizeof(set_def_chn), USB_CTRL_SET_TIMEOUT);
kfree(buf);
return ret;
}

View File

@ -18,6 +18,8 @@
* frame buffer.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/console.h>
#include <linux/kernel.h>
#include <linux/errno.h>
@ -380,10 +382,18 @@ static int xenfb_probe(struct xenbus_device *dev,
video[KPARAM_MEM] = val;
}
video[KPARAM_WIDTH] = xenbus_read_unsigned(dev->otherend, "width",
video[KPARAM_WIDTH]);
video[KPARAM_HEIGHT] = xenbus_read_unsigned(dev->otherend, "height",
video[KPARAM_HEIGHT]);
/* If requested res does not fit in available memory, use default */
fb_size = video[KPARAM_MEM] * 1024 * 1024;
if (video[KPARAM_WIDTH] * video[KPARAM_HEIGHT] * XENFB_DEPTH / 8
> fb_size) {
pr_warn("display parameters %d,%d,%d invalid, use defaults\n",
video[KPARAM_MEM], video[KPARAM_WIDTH],
video[KPARAM_HEIGHT]);
video[KPARAM_WIDTH] = XENFB_WIDTH;
video[KPARAM_HEIGHT] = XENFB_HEIGHT;
fb_size = XENFB_DEFAULT_FB_LEN;

View File

@ -34,7 +34,7 @@ static int __init fb_logo_late_init(void)
return 0;
}
late_initcall(fb_logo_late_init);
late_initcall_sync(fb_logo_late_init);
/* logo's are marked __initdata. Use __ref to tell
* modpost that it is intended that this function uses data

View File

@ -50,6 +50,7 @@
struct imx_fb_videomode {
struct fb_videomode mode;
u32 pcr;
bool aus_mode;
unsigned char bpp;
};