fbdev fixes for 3.6
- a fix by Paul Cercueil to prevent a possible buffer overflow - a fix by Bruno Prémont to prevent a rare sleep in invalid context - a fix by Julia Lawall for a double free in auo_k190x - a fix by Dan Carpenter to prevent a division by zero in mb862xxfb - a regression fix by Tomi Valkeinen for the SDI output in OMAP - a fix by Grazvydas Ignotas to fix the console colors in OMAP -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (GNU/Linux) iQIcBAABAgAGBQJQRdW3AAoJECSVL5KnPj1PKpcQAJn9tS3BeTi9zcV5sk31U1Jy kc72y318bg5jpJPDgWOfM+9CY3yhezVi2q9odiTUtuhx5WzWbOJh7/TuUGoWGKaY dUvTqen83hFGKfTs+eujTbAgAH3+PGIGo5VmTyx1TVj5Vnb1m3wsU6jwDzalfox8 MChhoOyrCpn6wxiqSuF6eoqZ01jASsNDW1rQaxi6AdaKKxJXrG22phMpwmfZz9Mt naIx1aI8aowkZ5gEBlOsnX6O0kjPVyQWlXqljGuZxRJZD+x9MKj/8nU1PITi0Pz2 DNAQz3ZU/apAooLCFsBF7oGtMUJ6e/v61LdIcMZZzw569tCtnmidwdU0ss2JJhAP aDhdtWESbxFbpggOEWD36Wq6Z5ekCW5xfTR+ZASiknSMAT6rmqfX4NPJ3750jjVb Aa9Ds37KQgfUrQIEhKCoZPyPTtCK98fQUHhxlf2I0TbuCGBvbZEAnRpuc1eelNo9 G9IJKG1vnea2x+DmsR1OEqFpHU3fn82T7RYm3SYc6ZDJwU58GxEvTzytGBs5YxLe bTTM2mTT3m23l8BBp6UPZjESJoBv2bd+cY70MCxhVIKHXbQYdzet0DDEDA6t2UQK isIOLXMGqxTXNZq7bM+q9UuYUuAkTUv1VmwGy5YJOD1JtOhFGQtxBe59OMmrC1H5 aU+GP6btV/biv8cTs/JG =8eFG -----END PGP SIGNATURE----- Merge tag 'fbdev-fixes-for-3.6-1' of git://github.com/schandinat/linux-2.6 Pull fbdev fixes from Florian Tobias Schandinat: - a fix by Paul Cercueil to prevent a possible buffer overflow - a fix by Bruno Prémont to prevent a rare sleep in invalid context - a fix by Julia Lawall for a double free in auo_k190x - a fix by Dan Carpenter to prevent a division by zero in mb862xxfb - a regression fix by Tomi Valkeinen for the SDI output in OMAP - a fix by Grazvydas Ignotas to fix the console colors in OMAP * tag 'fbdev-fixes-for-3.6-1' of git://github.com/schandinat/linux-2.6: OMAPFB: fix framebuffer console colors OMAPDSS: Fix SDI PLL locking video: mb862xxfb: prevent divide by zero bug drivers/video/auo_k190x.c: drop kfree of devm_kzalloc's data fbcon: Fix bit_putcs() call to kmalloc(s, GFP_KERNEL) fbcon: prevent possible buffer overflow.
This commit is contained in:
commit
6d1a05033b
|
@ -987,7 +987,6 @@ err_regfb:
|
|||
fb_dealloc_cmap(&info->cmap);
|
||||
err_cmap:
|
||||
fb_deferred_io_cleanup(info);
|
||||
kfree(info->fbdefio);
|
||||
err_defio:
|
||||
vfree((void *)info->screen_base);
|
||||
err_irq:
|
||||
|
@ -1022,7 +1021,6 @@ int __devexit auok190x_common_remove(struct platform_device *pdev)
|
|||
fb_dealloc_cmap(&info->cmap);
|
||||
|
||||
fb_deferred_io_cleanup(info);
|
||||
kfree(info->fbdefio);
|
||||
|
||||
vfree((void *)info->screen_base);
|
||||
|
||||
|
|
|
@ -162,7 +162,7 @@ static void bit_putcs(struct vc_data *vc, struct fb_info *info,
|
|||
image.depth = 1;
|
||||
|
||||
if (attribute) {
|
||||
buf = kmalloc(cellsize, GFP_KERNEL);
|
||||
buf = kmalloc(cellsize, GFP_ATOMIC);
|
||||
if (!buf)
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -449,7 +449,7 @@ static int __init fb_console_setup(char *this_opt)
|
|||
|
||||
while ((options = strsep(&this_opt, ",")) != NULL) {
|
||||
if (!strncmp(options, "font:", 5))
|
||||
strcpy(fontname, options + 5);
|
||||
strlcpy(fontname, options + 5, sizeof(fontname));
|
||||
|
||||
if (!strncmp(options, "scrollback:", 11)) {
|
||||
options += 11;
|
||||
|
|
|
@ -328,6 +328,8 @@ static int mb862xxfb_ioctl(struct fb_info *fbi, unsigned int cmd,
|
|||
case MB862XX_L1_SET_CFG:
|
||||
if (copy_from_user(l1_cfg, argp, sizeof(*l1_cfg)))
|
||||
return -EFAULT;
|
||||
if (l1_cfg->dh == 0 || l1_cfg->dw == 0)
|
||||
return -EINVAL;
|
||||
if ((l1_cfg->sw >= l1_cfg->dw) && (l1_cfg->sh >= l1_cfg->dh)) {
|
||||
/* downscaling */
|
||||
outreg(cap, GC_CAP_CSC,
|
||||
|
|
|
@ -105,6 +105,20 @@ int omapdss_sdi_display_enable(struct omap_dss_device *dssdev)
|
|||
|
||||
sdi_config_lcd_manager(dssdev);
|
||||
|
||||
/*
|
||||
* LCLK and PCLK divisors are located in shadow registers, and we
|
||||
* normally write them to DISPC registers when enabling the output.
|
||||
* However, SDI uses pck-free as source clock for its PLL, and pck-free
|
||||
* is affected by the divisors. And as we need the PLL before enabling
|
||||
* the output, we need to write the divisors early.
|
||||
*
|
||||
* It seems just writing to the DISPC register is enough, and we don't
|
||||
* need to care about the shadow register mechanism for pck-free. The
|
||||
* exact reason for this is unknown.
|
||||
*/
|
||||
dispc_mgr_set_clock_div(dssdev->manager->id,
|
||||
&sdi.mgr_config.clock_info);
|
||||
|
||||
dss_sdi_init(dssdev->phy.sdi.datapairs);
|
||||
r = dss_sdi_enable();
|
||||
if (r)
|
||||
|
|
|
@ -1192,7 +1192,7 @@ static int _setcolreg(struct fb_info *fbi, u_int regno, u_int red, u_int green,
|
|||
break;
|
||||
|
||||
if (regno < 16) {
|
||||
u16 pal;
|
||||
u32 pal;
|
||||
pal = ((red >> (16 - var->red.length)) <<
|
||||
var->red.offset) |
|
||||
((green >> (16 - var->green.length)) <<
|
||||
|
|
Loading…
Reference in New Issue