fbdev: fixes for 3.10-rc4
This contains some small fixes Atmel LCDC: fix blank the backlight on remove ps3fb: fix compile warning OMAPDSS: Fix crash with DT boot Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIbBAABAgAGBQJRqPk4AAoJEOrjwV5ZMRf2N10P+NXJl0gllH/aVmLv46/nkOKi lO5PPxmswJzxYJZe/fl6nodbDIUlPisjl5y5KSBNzsXoKMyCxGvWdUvNt3DgcDqs n+VunNAcbh9/8kcUe9cIRbFYIX15XtxKCJbXUoXqwLnnfFwXbXfy/AnnlkdIOeNO 0qyK+M0bJ3Y5s4dWYrfhU+yPxek2908agEamhAROn0rgzZD54h3mUrNPp15Hmc0a JFrUrKzrjX8TY804bw873Y7RmLpERXU8yXaZdW01MxDE2r2RfJrp90eEzCfjdjJD OpC4liPO87+vPwtremSzj2b/LojWdbZ+a08s4SZ+798J+Gbg/YCRIm3JrFXJsHvJ kMGMVEciew+gVnGYdrs2CAeiN1xPZpF1NRv8tMLFhTieFHKw7NupIHG5o4MX7/9n Bv64+SYt6ox3U1dZlRdQOzjlt3yo1hT8qyQBvKgz0icEnW/ZV0d4oYFfDG7WyHgi 4pxOw8r96KtxpS/ZN//cu4oygGRf1EL3hHiaguJI4V4fSiEwaEL6uUgK9RFINLnJ 5RhyoQeRATKXlgadzbOHFssJsECSTtszgsWmY/xe2F9uDdDSucTo9bRo+4re7QG0 6l986FHJou22nolAGisjpLei11ESlba4VvCv8H6ej3MaKGRjJEYQ4s/uguJ2pMti wuhoEB0/UjOs5ZzCI+0= =tjLq -----END PGP SIGNATURE----- Merge tag 'fbdev-for-3.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/plagnioj/linux-fbdev Pull fbdev fixes from Jean-Christophe PLAGNIOL-VILLARD: "This contains some small fixes - Atmel LCDC: fix blank the backlight on remove - ps3fb: fix compile warning - OMAPDSS: Fix crash with DT boot" * tag 'fbdev-for-3.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/plagnioj/linux-fbdev: atmel_lcdfb: blank the backlight on remove trivial: atmel_lcdfb: add missing error message OMAPDSS: Fix crash with DT boot fbdev/ps3fb: fix compile warning
This commit is contained in:
commit
c361cb59ac
|
@ -649,6 +649,9 @@ static void pdev_shutdown(struct platform_device *device)
|
||||||
|
|
||||||
static int pdev_probe(struct platform_device *device)
|
static int pdev_probe(struct platform_device *device)
|
||||||
{
|
{
|
||||||
|
if (omapdss_is_initialized() == false)
|
||||||
|
return -EPROBE_DEFER;
|
||||||
|
|
||||||
DBG("%s", device->name);
|
DBG("%s", device->name);
|
||||||
return drm_platform_init(&omap_drm_driver, device);
|
return drm_platform_init(&omap_drm_driver, device);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2150,6 +2150,9 @@ static int __init omap_vout_probe(struct platform_device *pdev)
|
||||||
struct omap_dss_device *def_display;
|
struct omap_dss_device *def_display;
|
||||||
struct omap2video_device *vid_dev = NULL;
|
struct omap2video_device *vid_dev = NULL;
|
||||||
|
|
||||||
|
if (omapdss_is_initialized() == false)
|
||||||
|
return -EPROBE_DEFER;
|
||||||
|
|
||||||
ret = omapdss_compat_init();
|
ret = omapdss_compat_init();
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(&pdev->dev, "failed to init dss\n");
|
dev_err(&pdev->dev, "failed to init dss\n");
|
||||||
|
|
|
@ -223,8 +223,14 @@ static void init_backlight(struct atmel_lcdfb_info *sinfo)
|
||||||
|
|
||||||
static void exit_backlight(struct atmel_lcdfb_info *sinfo)
|
static void exit_backlight(struct atmel_lcdfb_info *sinfo)
|
||||||
{
|
{
|
||||||
if (sinfo->backlight)
|
if (!sinfo->backlight)
|
||||||
backlight_device_unregister(sinfo->backlight);
|
return;
|
||||||
|
|
||||||
|
if (sinfo->backlight->ops) {
|
||||||
|
sinfo->backlight->props.power = FB_BLANK_POWERDOWN;
|
||||||
|
sinfo->backlight->ops->update_status(sinfo->backlight);
|
||||||
|
}
|
||||||
|
backlight_device_unregister(sinfo->backlight);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
@ -461,8 +467,11 @@ static int atmel_lcdfb_check_var(struct fb_var_screeninfo *var,
|
||||||
if (info->fix.smem_len) {
|
if (info->fix.smem_len) {
|
||||||
unsigned int smem_len = (var->xres_virtual * var->yres_virtual
|
unsigned int smem_len = (var->xres_virtual * var->yres_virtual
|
||||||
* ((var->bits_per_pixel + 7) / 8));
|
* ((var->bits_per_pixel + 7) / 8));
|
||||||
if (smem_len > info->fix.smem_len)
|
if (smem_len > info->fix.smem_len) {
|
||||||
|
dev_err(dev, "Frame buffer is too small (%u) for screen size (need at least %u)\n",
|
||||||
|
info->fix.smem_len, smem_len);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Saturate vertical and horizontal timings at maximum values */
|
/* Saturate vertical and horizontal timings at maximum values */
|
||||||
|
|
|
@ -53,6 +53,8 @@ static char *def_disp_name;
|
||||||
module_param_named(def_disp, def_disp_name, charp, 0);
|
module_param_named(def_disp, def_disp_name, charp, 0);
|
||||||
MODULE_PARM_DESC(def_disp, "default display name");
|
MODULE_PARM_DESC(def_disp, "default display name");
|
||||||
|
|
||||||
|
static bool dss_initialized;
|
||||||
|
|
||||||
const char *omapdss_get_default_display_name(void)
|
const char *omapdss_get_default_display_name(void)
|
||||||
{
|
{
|
||||||
return core.default_display_name;
|
return core.default_display_name;
|
||||||
|
@ -66,6 +68,12 @@ enum omapdss_version omapdss_get_version(void)
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(omapdss_get_version);
|
EXPORT_SYMBOL(omapdss_get_version);
|
||||||
|
|
||||||
|
bool omapdss_is_initialized(void)
|
||||||
|
{
|
||||||
|
return dss_initialized;
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(omapdss_is_initialized);
|
||||||
|
|
||||||
struct platform_device *dss_get_core_pdev(void)
|
struct platform_device *dss_get_core_pdev(void)
|
||||||
{
|
{
|
||||||
return core.pdev;
|
return core.pdev;
|
||||||
|
@ -603,6 +611,8 @@ static int __init omap_dss_init(void)
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dss_initialized = true;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -633,7 +643,15 @@ static int __init omap_dss_init(void)
|
||||||
|
|
||||||
static int __init omap_dss_init2(void)
|
static int __init omap_dss_init2(void)
|
||||||
{
|
{
|
||||||
return omap_dss_register_drivers();
|
int r;
|
||||||
|
|
||||||
|
r = omap_dss_register_drivers();
|
||||||
|
if (r)
|
||||||
|
return r;
|
||||||
|
|
||||||
|
dss_initialized = true;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
core_initcall(omap_dss_init);
|
core_initcall(omap_dss_init);
|
||||||
|
|
|
@ -2416,6 +2416,9 @@ static int omapfb_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
DBG("omapfb_probe\n");
|
DBG("omapfb_probe\n");
|
||||||
|
|
||||||
|
if (omapdss_is_initialized() == false)
|
||||||
|
return -EPROBE_DEFER;
|
||||||
|
|
||||||
if (pdev->num_resources != 0) {
|
if (pdev->num_resources != 0) {
|
||||||
dev_err(&pdev->dev, "probed for an unknown device\n");
|
dev_err(&pdev->dev, "probed for an unknown device\n");
|
||||||
r = -ENODEV;
|
r = -ENODEV;
|
||||||
|
|
|
@ -710,7 +710,7 @@ static int ps3fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
|
||||||
r = vm_iomap_memory(vma, info->fix.smem_start, info->fix.smem_len);
|
r = vm_iomap_memory(vma, info->fix.smem_start, info->fix.smem_len);
|
||||||
|
|
||||||
dev_dbg(info->device, "ps3fb: mmap framebuffer P(%lx)->V(%lx)\n",
|
dev_dbg(info->device, "ps3fb: mmap framebuffer P(%lx)->V(%lx)\n",
|
||||||
info->fix.smem_start + vma->vm_pgoff << PAGE_SHIFT,
|
info->fix.smem_start + (vma->vm_pgoff << PAGE_SHIFT),
|
||||||
vma->vm_start);
|
vma->vm_start);
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
|
|
|
@ -748,6 +748,7 @@ struct omap_dss_driver {
|
||||||
};
|
};
|
||||||
|
|
||||||
enum omapdss_version omapdss_get_version(void);
|
enum omapdss_version omapdss_get_version(void);
|
||||||
|
bool omapdss_is_initialized(void);
|
||||||
|
|
||||||
int omap_dss_register_driver(struct omap_dss_driver *);
|
int omap_dss_register_driver(struct omap_dss_driver *);
|
||||||
void omap_dss_unregister_driver(struct omap_dss_driver *);
|
void omap_dss_unregister_driver(struct omap_dss_driver *);
|
||||||
|
|
Loading…
Reference in New Issue