mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-28 20:02:17 +00:00
Merge branch 'fbdev-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-3.x
* 'fbdev-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-3.x: fbdev: sh_mobile_hdmi: fix regression: statically enable RTPM fbdev/atyfb: Fix 2 defined-but-not-used warnings efifb: Fix call to wrong unregister function video: s3c-fb: move enabling channel for window video: s3c-fb: fix virtual resolution checking video: s3c-fb: fix misleading kfree in remove function
This commit is contained in:
commit
f4ef084226
4 changed files with 20 additions and 32 deletions
|
@ -248,10 +248,6 @@ static int atyfb_sync(struct fb_info *info);
|
||||||
|
|
||||||
static int aty_init(struct fb_info *info);
|
static int aty_init(struct fb_info *info);
|
||||||
|
|
||||||
#ifdef CONFIG_ATARI
|
|
||||||
static int store_video_par(char *videopar, unsigned char m64_num);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static void aty_get_crtc(const struct atyfb_par *par, struct crtc *crtc);
|
static void aty_get_crtc(const struct atyfb_par *par, struct crtc *crtc);
|
||||||
|
|
||||||
static void aty_set_crtc(const struct atyfb_par *par, const struct crtc *crtc);
|
static void aty_set_crtc(const struct atyfb_par *par, const struct crtc *crtc);
|
||||||
|
@ -2268,11 +2264,13 @@ static void aty_bl_init(struct atyfb_par *par)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_PCI
|
||||||
static void aty_bl_exit(struct backlight_device *bd)
|
static void aty_bl_exit(struct backlight_device *bd)
|
||||||
{
|
{
|
||||||
backlight_device_unregister(bd);
|
backlight_device_unregister(bd);
|
||||||
printk("aty: Backlight unloaded\n");
|
printk("aty: Backlight unloaded\n");
|
||||||
}
|
}
|
||||||
|
#endif /* CONFIG_PCI */
|
||||||
|
|
||||||
#endif /* CONFIG_FB_ATY_BACKLIGHT */
|
#endif /* CONFIG_FB_ATY_BACKLIGHT */
|
||||||
|
|
||||||
|
@ -2789,7 +2787,7 @@ static int __devinit aty_init(struct fb_info *info)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ATARI
|
#if defined(CONFIG_ATARI) && !defined(MODULE)
|
||||||
static int __devinit store_video_par(char *video_str, unsigned char m64_num)
|
static int __devinit store_video_par(char *video_str, unsigned char m64_num)
|
||||||
{
|
{
|
||||||
char *p;
|
char *p;
|
||||||
|
@ -2818,7 +2816,7 @@ static int __devinit store_video_par(char *video_str, unsigned char m64_num)
|
||||||
phys_vmembase[m64_num] = 0;
|
phys_vmembase[m64_num] = 0;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_ATARI */
|
#endif /* CONFIG_ATARI && !MODULE */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Blank the display.
|
* Blank the display.
|
||||||
|
|
|
@ -541,7 +541,7 @@ static int __init efifb_init(void)
|
||||||
*/
|
*/
|
||||||
ret = platform_driver_probe(&efifb_driver, efifb_probe);
|
ret = platform_driver_probe(&efifb_driver, efifb_probe);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
platform_device_unregister(&efifb_driver);
|
platform_device_unregister(&efifb_device);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -235,13 +235,12 @@ static int s3c_fb_check_var(struct fb_var_screeninfo *var,
|
||||||
struct fb_info *info)
|
struct fb_info *info)
|
||||||
{
|
{
|
||||||
struct s3c_fb_win *win = info->par;
|
struct s3c_fb_win *win = info->par;
|
||||||
struct s3c_fb_pd_win *windata = win->windata;
|
|
||||||
struct s3c_fb *sfb = win->parent;
|
struct s3c_fb *sfb = win->parent;
|
||||||
|
|
||||||
dev_dbg(sfb->dev, "checking parameters\n");
|
dev_dbg(sfb->dev, "checking parameters\n");
|
||||||
|
|
||||||
var->xres_virtual = max((unsigned int)windata->virtual_x, var->xres);
|
var->xres_virtual = max(var->xres_virtual, var->xres);
|
||||||
var->yres_virtual = max((unsigned int)windata->virtual_y, var->yres);
|
var->yres_virtual = max(var->yres_virtual, var->yres);
|
||||||
|
|
||||||
if (!s3c_fb_validate_win_bpp(win, var->bits_per_pixel)) {
|
if (!s3c_fb_validate_win_bpp(win, var->bits_per_pixel)) {
|
||||||
dev_dbg(sfb->dev, "win %d: unsupported bpp %d\n",
|
dev_dbg(sfb->dev, "win %d: unsupported bpp %d\n",
|
||||||
|
@ -558,6 +557,13 @@ static int s3c_fb_set_par(struct fb_info *info)
|
||||||
vidosd_set_alpha(win, alpha);
|
vidosd_set_alpha(win, alpha);
|
||||||
vidosd_set_size(win, data);
|
vidosd_set_size(win, data);
|
||||||
|
|
||||||
|
/* Enable DMA channel for this window */
|
||||||
|
if (sfb->variant.has_shadowcon) {
|
||||||
|
data = readl(sfb->regs + SHADOWCON);
|
||||||
|
data |= SHADOWCON_CHx_ENABLE(win_no);
|
||||||
|
writel(data, sfb->regs + SHADOWCON);
|
||||||
|
}
|
||||||
|
|
||||||
data = WINCONx_ENWIN;
|
data = WINCONx_ENWIN;
|
||||||
|
|
||||||
/* note, since we have to round up the bits-per-pixel, we end up
|
/* note, since we have to round up the bits-per-pixel, we end up
|
||||||
|
@ -637,13 +643,6 @@ static int s3c_fb_set_par(struct fb_info *info)
|
||||||
writel(data, regs + sfb->variant.wincon + (win_no * 4));
|
writel(data, regs + sfb->variant.wincon + (win_no * 4));
|
||||||
writel(0x0, regs + sfb->variant.winmap + (win_no * 4));
|
writel(0x0, regs + sfb->variant.winmap + (win_no * 4));
|
||||||
|
|
||||||
/* Enable DMA channel for this window */
|
|
||||||
if (sfb->variant.has_shadowcon) {
|
|
||||||
data = readl(sfb->regs + SHADOWCON);
|
|
||||||
data |= SHADOWCON_CHx_ENABLE(win_no);
|
|
||||||
writel(data, sfb->regs + SHADOWCON);
|
|
||||||
}
|
|
||||||
|
|
||||||
shadow_protect_win(win, 0);
|
shadow_protect_win(win, 0);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1487,11 +1486,10 @@ static int __devexit s3c_fb_remove(struct platform_device *pdev)
|
||||||
|
|
||||||
release_mem_region(sfb->regs_res->start, resource_size(sfb->regs_res));
|
release_mem_region(sfb->regs_res->start, resource_size(sfb->regs_res));
|
||||||
|
|
||||||
kfree(sfb);
|
|
||||||
|
|
||||||
pm_runtime_put_sync(sfb->dev);
|
pm_runtime_put_sync(sfb->dev);
|
||||||
pm_runtime_disable(sfb->dev);
|
pm_runtime_disable(sfb->dev);
|
||||||
|
|
||||||
|
kfree(sfb);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1127,23 +1127,16 @@ static void sh_hdmi_edid_work_fn(struct work_struct *work)
|
||||||
struct fb_info *info = hdmi->info;
|
struct fb_info *info = hdmi->info;
|
||||||
unsigned long parent_rate = 0, hdmi_rate;
|
unsigned long parent_rate = 0, hdmi_rate;
|
||||||
|
|
||||||
/* A device has been plugged in */
|
|
||||||
pm_runtime_get_sync(hdmi->dev);
|
|
||||||
|
|
||||||
ret = sh_hdmi_read_edid(hdmi, &hdmi_rate, &parent_rate);
|
ret = sh_hdmi_read_edid(hdmi, &hdmi_rate, &parent_rate);
|
||||||
if (ret < 0) {
|
if (ret < 0)
|
||||||
pm_runtime_put(hdmi->dev);
|
|
||||||
goto out;
|
goto out;
|
||||||
}
|
|
||||||
|
|
||||||
hdmi->hp_state = HDMI_HOTPLUG_EDID_DONE;
|
hdmi->hp_state = HDMI_HOTPLUG_EDID_DONE;
|
||||||
|
|
||||||
/* Reconfigure the clock */
|
/* Reconfigure the clock */
|
||||||
ret = sh_hdmi_clk_configure(hdmi, hdmi_rate, parent_rate);
|
ret = sh_hdmi_clk_configure(hdmi, hdmi_rate, parent_rate);
|
||||||
if (ret < 0) {
|
if (ret < 0)
|
||||||
pm_runtime_put(hdmi->dev);
|
|
||||||
goto out;
|
goto out;
|
||||||
}
|
|
||||||
|
|
||||||
msleep(10);
|
msleep(10);
|
||||||
sh_hdmi_configure(hdmi);
|
sh_hdmi_configure(hdmi);
|
||||||
|
@ -1191,7 +1184,6 @@ static void sh_hdmi_edid_work_fn(struct work_struct *work)
|
||||||
fb_set_suspend(hdmi->info, 1);
|
fb_set_suspend(hdmi->info, 1);
|
||||||
|
|
||||||
console_unlock();
|
console_unlock();
|
||||||
pm_runtime_put(hdmi->dev);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
|
@ -1312,7 +1304,7 @@ static int __init sh_hdmi_probe(struct platform_device *pdev)
|
||||||
INIT_DELAYED_WORK(&hdmi->edid_work, sh_hdmi_edid_work_fn);
|
INIT_DELAYED_WORK(&hdmi->edid_work, sh_hdmi_edid_work_fn);
|
||||||
|
|
||||||
pm_runtime_enable(&pdev->dev);
|
pm_runtime_enable(&pdev->dev);
|
||||||
pm_runtime_resume(&pdev->dev);
|
pm_runtime_get_sync(&pdev->dev);
|
||||||
|
|
||||||
/* Product and revision IDs are 0 in sh-mobile version */
|
/* Product and revision IDs are 0 in sh-mobile version */
|
||||||
dev_info(&pdev->dev, "Detected HDMI controller 0x%x:0x%x\n",
|
dev_info(&pdev->dev, "Detected HDMI controller 0x%x:0x%x\n",
|
||||||
|
@ -1340,7 +1332,7 @@ static int __init sh_hdmi_probe(struct platform_device *pdev)
|
||||||
ecodec:
|
ecodec:
|
||||||
free_irq(irq, hdmi);
|
free_irq(irq, hdmi);
|
||||||
ereqirq:
|
ereqirq:
|
||||||
pm_runtime_suspend(&pdev->dev);
|
pm_runtime_put(&pdev->dev);
|
||||||
pm_runtime_disable(&pdev->dev);
|
pm_runtime_disable(&pdev->dev);
|
||||||
iounmap(hdmi->base);
|
iounmap(hdmi->base);
|
||||||
emap:
|
emap:
|
||||||
|
@ -1377,7 +1369,7 @@ static int __exit sh_hdmi_remove(struct platform_device *pdev)
|
||||||
free_irq(irq, hdmi);
|
free_irq(irq, hdmi);
|
||||||
/* Wait for already scheduled work */
|
/* Wait for already scheduled work */
|
||||||
cancel_delayed_work_sync(&hdmi->edid_work);
|
cancel_delayed_work_sync(&hdmi->edid_work);
|
||||||
pm_runtime_suspend(&pdev->dev);
|
pm_runtime_put(&pdev->dev);
|
||||||
pm_runtime_disable(&pdev->dev);
|
pm_runtime_disable(&pdev->dev);
|
||||||
clk_disable(hdmi->hdmi_clk);
|
clk_disable(hdmi->hdmi_clk);
|
||||||
clk_put(hdmi->hdmi_clk);
|
clk_put(hdmi->hdmi_clk);
|
||||||
|
|
Loading…
Reference in a new issue