Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

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