diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-06-16 12:45:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-06-16 12:45:47 -0400 |
commit | f4ef084226f82ca923bf0a2658bb2876bd215ec1 (patch) | |
tree | 5097279680df51891f70f8afe0d52555b772e7a8 | |
parent | df9d030c1324e9b75a425903f9f66bbc960bf713 (diff) | |
parent | d521dd944e461371cb309c7c3568483cd2b6f5f2 (diff) |
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
-rw-r--r-- | drivers/video/aty/atyfb_base.c | 10 | ||||
-rw-r--r-- | drivers/video/efifb.c | 2 | ||||
-rw-r--r-- | drivers/video/s3c-fb.c | 22 | ||||
-rw-r--r-- | drivers/video/sh_mobile_hdmi.c | 18 |
4 files changed, 20 insertions, 32 deletions
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c index ebb893c49e90..d7aaec5667bf 100644 --- a/drivers/video/aty/atyfb_base.c +++ b/drivers/video/aty/atyfb_base.c | |||
@@ -248,10 +248,6 @@ static int atyfb_sync(struct fb_info *info); | |||
248 | 248 | ||
249 | static int aty_init(struct fb_info *info); | 249 | static int aty_init(struct fb_info *info); |
250 | 250 | ||
251 | #ifdef CONFIG_ATARI | ||
252 | static int store_video_par(char *videopar, unsigned char m64_num); | ||
253 | #endif | ||
254 | |||
255 | static void aty_get_crtc(const struct atyfb_par *par, struct crtc *crtc); | 251 | static void aty_get_crtc(const struct atyfb_par *par, struct crtc *crtc); |
256 | 252 | ||
257 | static void aty_set_crtc(const struct atyfb_par *par, const struct crtc *crtc); | 253 | static void aty_set_crtc(const struct atyfb_par *par, const struct crtc *crtc); |
@@ -2268,11 +2264,13 @@ error: | |||
2268 | return; | 2264 | return; |
2269 | } | 2265 | } |
2270 | 2266 | ||
2267 | #ifdef CONFIG_PCI | ||
2271 | static void aty_bl_exit(struct backlight_device *bd) | 2268 | static void aty_bl_exit(struct backlight_device *bd) |
2272 | { | 2269 | { |
2273 | backlight_device_unregister(bd); | 2270 | backlight_device_unregister(bd); |
2274 | printk("aty: Backlight unloaded\n"); | 2271 | printk("aty: Backlight unloaded\n"); |
2275 | } | 2272 | } |
2273 | #endif /* CONFIG_PCI */ | ||
2276 | 2274 | ||
2277 | #endif /* CONFIG_FB_ATY_BACKLIGHT */ | 2275 | #endif /* CONFIG_FB_ATY_BACKLIGHT */ |
2278 | 2276 | ||
@@ -2789,7 +2787,7 @@ aty_init_exit: | |||
2789 | return ret; | 2787 | return ret; |
2790 | } | 2788 | } |
2791 | 2789 | ||
2792 | #ifdef CONFIG_ATARI | 2790 | #if defined(CONFIG_ATARI) && !defined(MODULE) |
2793 | static int __devinit store_video_par(char *video_str, unsigned char m64_num) | 2791 | static int __devinit store_video_par(char *video_str, unsigned char m64_num) |
2794 | { | 2792 | { |
2795 | char *p; | 2793 | char *p; |
@@ -2818,7 +2816,7 @@ static int __devinit store_video_par(char *video_str, unsigned char m64_num) | |||
2818 | phys_vmembase[m64_num] = 0; | 2816 | phys_vmembase[m64_num] = 0; |
2819 | return -1; | 2817 | return -1; |
2820 | } | 2818 | } |
2821 | #endif /* CONFIG_ATARI */ | 2819 | #endif /* CONFIG_ATARI && !MODULE */ |
2822 | 2820 | ||
2823 | /* | 2821 | /* |
2824 | * Blank the display. | 2822 | * Blank the display. |
diff --git a/drivers/video/efifb.c b/drivers/video/efifb.c index 69c49dfce9cf..784139aed079 100644 --- a/drivers/video/efifb.c +++ b/drivers/video/efifb.c | |||
@@ -541,7 +541,7 @@ static int __init efifb_init(void) | |||
541 | */ | 541 | */ |
542 | ret = platform_driver_probe(&efifb_driver, efifb_probe); | 542 | ret = platform_driver_probe(&efifb_driver, efifb_probe); |
543 | if (ret) { | 543 | if (ret) { |
544 | platform_device_unregister(&efifb_driver); | 544 | platform_device_unregister(&efifb_device); |
545 | return ret; | 545 | return ret; |
546 | } | 546 | } |
547 | 547 | ||
diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c index 0352afa49a39..4aecf213c9be 100644 --- a/drivers/video/s3c-fb.c +++ b/drivers/video/s3c-fb.c | |||
@@ -235,13 +235,12 @@ static int s3c_fb_check_var(struct fb_var_screeninfo *var, | |||
235 | struct fb_info *info) | 235 | struct fb_info *info) |
236 | { | 236 | { |
237 | struct s3c_fb_win *win = info->par; | 237 | struct s3c_fb_win *win = info->par; |
238 | struct s3c_fb_pd_win *windata = win->windata; | ||
239 | struct s3c_fb *sfb = win->parent; | 238 | struct s3c_fb *sfb = win->parent; |
240 | 239 | ||
241 | dev_dbg(sfb->dev, "checking parameters\n"); | 240 | dev_dbg(sfb->dev, "checking parameters\n"); |
242 | 241 | ||
243 | var->xres_virtual = max((unsigned int)windata->virtual_x, var->xres); | 242 | var->xres_virtual = max(var->xres_virtual, var->xres); |
244 | var->yres_virtual = max((unsigned int)windata->virtual_y, var->yres); | 243 | var->yres_virtual = max(var->yres_virtual, var->yres); |
245 | 244 | ||
246 | if (!s3c_fb_validate_win_bpp(win, var->bits_per_pixel)) { | 245 | if (!s3c_fb_validate_win_bpp(win, var->bits_per_pixel)) { |
247 | dev_dbg(sfb->dev, "win %d: unsupported bpp %d\n", | 246 | dev_dbg(sfb->dev, "win %d: unsupported bpp %d\n", |
@@ -558,6 +557,13 @@ static int s3c_fb_set_par(struct fb_info *info) | |||
558 | vidosd_set_alpha(win, alpha); | 557 | vidosd_set_alpha(win, alpha); |
559 | vidosd_set_size(win, data); | 558 | vidosd_set_size(win, data); |
560 | 559 | ||
560 | /* Enable DMA channel for this window */ | ||
561 | if (sfb->variant.has_shadowcon) { | ||
562 | data = readl(sfb->regs + SHADOWCON); | ||
563 | data |= SHADOWCON_CHx_ENABLE(win_no); | ||
564 | writel(data, sfb->regs + SHADOWCON); | ||
565 | } | ||
566 | |||
561 | data = WINCONx_ENWIN; | 567 | data = WINCONx_ENWIN; |
562 | 568 | ||
563 | /* note, since we have to round up the bits-per-pixel, we end up | 569 | /* 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) | |||
637 | writel(data, regs + sfb->variant.wincon + (win_no * 4)); | 643 | writel(data, regs + sfb->variant.wincon + (win_no * 4)); |
638 | writel(0x0, regs + sfb->variant.winmap + (win_no * 4)); | 644 | writel(0x0, regs + sfb->variant.winmap + (win_no * 4)); |
639 | 645 | ||
640 | /* Enable DMA channel for this window */ | ||
641 | if (sfb->variant.has_shadowcon) { | ||
642 | data = readl(sfb->regs + SHADOWCON); | ||
643 | data |= SHADOWCON_CHx_ENABLE(win_no); | ||
644 | writel(data, sfb->regs + SHADOWCON); | ||
645 | } | ||
646 | |||
647 | shadow_protect_win(win, 0); | 646 | shadow_protect_win(win, 0); |
648 | 647 | ||
649 | return 0; | 648 | return 0; |
@@ -1487,11 +1486,10 @@ static int __devexit s3c_fb_remove(struct platform_device *pdev) | |||
1487 | 1486 | ||
1488 | release_mem_region(sfb->regs_res->start, resource_size(sfb->regs_res)); | 1487 | release_mem_region(sfb->regs_res->start, resource_size(sfb->regs_res)); |
1489 | 1488 | ||
1490 | kfree(sfb); | ||
1491 | |||
1492 | pm_runtime_put_sync(sfb->dev); | 1489 | pm_runtime_put_sync(sfb->dev); |
1493 | pm_runtime_disable(sfb->dev); | 1490 | pm_runtime_disable(sfb->dev); |
1494 | 1491 | ||
1492 | kfree(sfb); | ||
1495 | return 0; | 1493 | return 0; |
1496 | } | 1494 | } |
1497 | 1495 | ||
diff --git a/drivers/video/sh_mobile_hdmi.c b/drivers/video/sh_mobile_hdmi.c index 6ae40b630dc9..7d54e2c612f7 100644 --- a/drivers/video/sh_mobile_hdmi.c +++ b/drivers/video/sh_mobile_hdmi.c | |||
@@ -1127,23 +1127,16 @@ static void sh_hdmi_edid_work_fn(struct work_struct *work) | |||
1127 | struct fb_info *info = hdmi->info; | 1127 | struct fb_info *info = hdmi->info; |
1128 | unsigned long parent_rate = 0, hdmi_rate; | 1128 | unsigned long parent_rate = 0, hdmi_rate; |
1129 | 1129 | ||
1130 | /* A device has been plugged in */ | ||
1131 | pm_runtime_get_sync(hdmi->dev); | ||
1132 | |||
1133 | ret = sh_hdmi_read_edid(hdmi, &hdmi_rate, &parent_rate); | 1130 | ret = sh_hdmi_read_edid(hdmi, &hdmi_rate, &parent_rate); |
1134 | if (ret < 0) { | 1131 | if (ret < 0) |
1135 | pm_runtime_put(hdmi->dev); | ||
1136 | goto out; | 1132 | goto out; |
1137 | } | ||
1138 | 1133 | ||
1139 | hdmi->hp_state = HDMI_HOTPLUG_EDID_DONE; | 1134 | hdmi->hp_state = HDMI_HOTPLUG_EDID_DONE; |
1140 | 1135 | ||
1141 | /* Reconfigure the clock */ | 1136 | /* Reconfigure the clock */ |
1142 | ret = sh_hdmi_clk_configure(hdmi, hdmi_rate, parent_rate); | 1137 | ret = sh_hdmi_clk_configure(hdmi, hdmi_rate, parent_rate); |
1143 | if (ret < 0) { | 1138 | if (ret < 0) |
1144 | pm_runtime_put(hdmi->dev); | ||
1145 | goto out; | 1139 | goto out; |
1146 | } | ||
1147 | 1140 | ||
1148 | msleep(10); | 1141 | msleep(10); |
1149 | sh_hdmi_configure(hdmi); | 1142 | sh_hdmi_configure(hdmi); |
@@ -1191,7 +1184,6 @@ static void sh_hdmi_edid_work_fn(struct work_struct *work) | |||
1191 | fb_set_suspend(hdmi->info, 1); | 1184 | fb_set_suspend(hdmi->info, 1); |
1192 | 1185 | ||
1193 | console_unlock(); | 1186 | console_unlock(); |
1194 | pm_runtime_put(hdmi->dev); | ||
1195 | } | 1187 | } |
1196 | 1188 | ||
1197 | out: | 1189 | out: |
@@ -1312,7 +1304,7 @@ static int __init sh_hdmi_probe(struct platform_device *pdev) | |||
1312 | INIT_DELAYED_WORK(&hdmi->edid_work, sh_hdmi_edid_work_fn); | 1304 | INIT_DELAYED_WORK(&hdmi->edid_work, sh_hdmi_edid_work_fn); |
1313 | 1305 | ||
1314 | pm_runtime_enable(&pdev->dev); | 1306 | pm_runtime_enable(&pdev->dev); |
1315 | pm_runtime_resume(&pdev->dev); | 1307 | pm_runtime_get_sync(&pdev->dev); |
1316 | 1308 | ||
1317 | /* Product and revision IDs are 0 in sh-mobile version */ | 1309 | /* Product and revision IDs are 0 in sh-mobile version */ |
1318 | dev_info(&pdev->dev, "Detected HDMI controller 0x%x:0x%x\n", | 1310 | 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) | |||
1340 | ecodec: | 1332 | ecodec: |
1341 | free_irq(irq, hdmi); | 1333 | free_irq(irq, hdmi); |
1342 | ereqirq: | 1334 | ereqirq: |
1343 | pm_runtime_suspend(&pdev->dev); | 1335 | pm_runtime_put(&pdev->dev); |
1344 | pm_runtime_disable(&pdev->dev); | 1336 | pm_runtime_disable(&pdev->dev); |
1345 | iounmap(hdmi->base); | 1337 | iounmap(hdmi->base); |
1346 | emap: | 1338 | emap: |
@@ -1377,7 +1369,7 @@ static int __exit sh_hdmi_remove(struct platform_device *pdev) | |||
1377 | free_irq(irq, hdmi); | 1369 | free_irq(irq, hdmi); |
1378 | /* Wait for already scheduled work */ | 1370 | /* Wait for already scheduled work */ |
1379 | cancel_delayed_work_sync(&hdmi->edid_work); | 1371 | cancel_delayed_work_sync(&hdmi->edid_work); |
1380 | pm_runtime_suspend(&pdev->dev); | 1372 | pm_runtime_put(&pdev->dev); |
1381 | pm_runtime_disable(&pdev->dev); | 1373 | pm_runtime_disable(&pdev->dev); |
1382 | clk_disable(hdmi->hdmi_clk); | 1374 | clk_disable(hdmi->hdmi_clk); |
1383 | clk_put(hdmi->hdmi_clk); | 1375 | clk_put(hdmi->hdmi_clk); |