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

Merge tag 'fbdev-fixes-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux

Pull fbdev fixes from Tomi Valkeinen:

- fix fb console option parsing

- fixes for OMAPDSS/OMAPFB crashes related to module unloading and
device/driver binding & unbinding.

- fix for OMAP HDMI PLL locking failing in certain cases

- misc minor fixes for atmel lcdfb and OMAP

* tag 'fbdev-fixes-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux:
omap: dss: connector-analog-tv: Add missing module device table
OMAPDSS: DSI: Fix PLL_SELFEQDCO field width
OMAPDSS: fix dispc register dump for preload & mflag
OMAPDSS: DISPC: fix mflag offset
OMAPDSS: HDMI: fix regsd write
OMAPDSS: HDMI: fix PLL GO bit handling
OMAPFB: fix releasing overlays
OMAPFB: fix overlay disable when freeing resources.
OMAPDSS: apply: wait pending updates on manager disable
OMAPFB: remove __exit annotation
OMAPDSS: set suppress_bind_attrs
OMAPFB: add missing MODULE_ALIAS()
drivers: video: fbdev: atmel_lcdfb.c: remove unnecessary header
video/console: Resolve several shadow warnings
fbcon: Fix option parsing control flow in fb_console_setup

+67 -46
+9 -10
drivers/video/console/fbcon.c
··· 448 448 return 1; 449 449 450 450 while ((options = strsep(&this_opt, ",")) != NULL) { 451 - if (!strncmp(options, "font:", 5)) 451 + if (!strncmp(options, "font:", 5)) { 452 452 strlcpy(fontname, options + 5, sizeof(fontname)); 453 + continue; 454 + } 453 455 454 456 if (!strncmp(options, "scrollback:", 11)) { 455 457 options += 11; ··· 459 457 fbcon_softback_size = simple_strtoul(options, &options, 0); 460 458 if (*options == 'k' || *options == 'K') { 461 459 fbcon_softback_size *= 1024; 462 - options++; 463 460 } 464 - if (*options != ',') 465 - return 1; 466 - options++; 467 - } else 468 - return 1; 461 + } 462 + continue; 469 463 } 470 464 471 465 if (!strncmp(options, "map:", 4)) { ··· 476 478 477 479 fbcon_map_override(); 478 480 } 479 - 480 - return 1; 481 + continue; 481 482 } 482 483 483 484 if (!strncmp(options, "vc:", 3)) { ··· 488 491 if (*options++ == '-') 489 492 last_fb_vc = simple_strtoul(options, &options, 10) - 1; 490 493 fbcon_is_default = 0; 491 - } 494 + continue; 495 + } 492 496 493 497 if (!strncmp(options, "rotate:", 7)) { 494 498 options += 7; ··· 497 499 initial_rotation = simple_strtoul(options, &options, 0); 498 500 if (initial_rotation > 3) 499 501 initial_rotation = 0; 502 + continue; 500 503 } 501 504 } 502 505 return 1;
+12 -12
drivers/video/console/vgacon.c
··· 56 56 static int cursor_size_lastto; 57 57 static u32 vgacon_xres; 58 58 static u32 vgacon_yres; 59 - static struct vgastate state; 59 + static struct vgastate vgastate; 60 60 61 61 #define BLANK 0x0020 62 62 ··· 400 400 401 401 vga_video_num_lines = screen_info.orig_video_lines; 402 402 vga_video_num_columns = screen_info.orig_video_cols; 403 - state.vgabase = NULL; 403 + vgastate.vgabase = NULL; 404 404 405 405 if (screen_info.orig_video_mode == 7) { 406 406 /* Monochrome display */ ··· 851 851 { 852 852 int i, j; 853 853 854 - vga_w(state.vgabase, VGA_PEL_MSK, 0xff); 854 + vga_w(vgastate.vgabase, VGA_PEL_MSK, 0xff); 855 855 for (i = j = 0; i < 16; i++) { 856 - vga_w(state.vgabase, VGA_PEL_IW, table[i]); 857 - vga_w(state.vgabase, VGA_PEL_D, vc->vc_palette[j++] >> 2); 858 - vga_w(state.vgabase, VGA_PEL_D, vc->vc_palette[j++] >> 2); 859 - vga_w(state.vgabase, VGA_PEL_D, vc->vc_palette[j++] >> 2); 856 + vga_w(vgastate.vgabase, VGA_PEL_IW, table[i]); 857 + vga_w(vgastate.vgabase, VGA_PEL_D, vc->vc_palette[j++] >> 2); 858 + vga_w(vgastate.vgabase, VGA_PEL_D, vc->vc_palette[j++] >> 2); 859 + vga_w(vgastate.vgabase, VGA_PEL_D, vc->vc_palette[j++] >> 2); 860 860 } 861 861 } 862 862 ··· 1008 1008 switch (blank) { 1009 1009 case 0: /* Unblank */ 1010 1010 if (vga_vesa_blanked) { 1011 - vga_vesa_unblank(&state); 1011 + vga_vesa_unblank(&vgastate); 1012 1012 vga_vesa_blanked = 0; 1013 1013 } 1014 1014 if (vga_palette_blanked) { ··· 1022 1022 case 1: /* Normal blanking */ 1023 1023 case -1: /* Obsolete */ 1024 1024 if (!mode_switch && vga_video_type == VIDEO_TYPE_VGAC) { 1025 - vga_pal_blank(&state); 1025 + vga_pal_blank(&vgastate); 1026 1026 vga_palette_blanked = 1; 1027 1027 return 0; 1028 1028 } ··· 1034 1034 return 1; 1035 1035 default: /* VESA blanking */ 1036 1036 if (vga_video_type == VIDEO_TYPE_VGAC) { 1037 - vga_vesa_blank(&state, blank - 1); 1037 + vga_vesa_blank(&vgastate, blank - 1); 1038 1038 vga_vesa_blanked = blank; 1039 1039 } 1040 1040 return 0; ··· 1280 1280 (charcount != 256 && charcount != 512)) 1281 1281 return -EINVAL; 1282 1282 1283 - rc = vgacon_do_font_op(&state, font->data, 1, charcount == 512); 1283 + rc = vgacon_do_font_op(&vgastate, font->data, 1, charcount == 512); 1284 1284 if (rc) 1285 1285 return rc; 1286 1286 ··· 1299 1299 font->charcount = vga_512_chars ? 512 : 256; 1300 1300 if (!font->data) 1301 1301 return 0; 1302 - return vgacon_do_font_op(&state, font->data, 0, vga_512_chars); 1302 + return vgacon_do_font_op(&vgastate, font->data, 0, vga_512_chars); 1303 1303 } 1304 1304 1305 1305 #else
-1
drivers/video/fbdev/atmel_lcdfb.c
··· 27 27 #include <linux/regulator/consumer.h> 28 28 #include <video/videomode.h> 29 29 30 - #include <mach/cpu.h> 31 30 #include <asm/gpio.h> 32 31 33 32 #include <video/atmel_lcdc.h>
+3
drivers/video/fbdev/omap2/displays-new/connector-analog-tv.c
··· 301 301 {}, 302 302 }; 303 303 304 + MODULE_DEVICE_TABLE(of, tvc_of_match); 305 + 304 306 static struct platform_driver tvc_connector_driver = { 305 307 .probe = tvc_probe, 306 308 .remove = __exit_p(tvc_remove), ··· 310 308 .name = "connector-analog-tv", 311 309 .owner = THIS_MODULE, 312 310 .of_match_table = tvc_of_match, 311 + .suppress_bind_attrs = true, 313 312 }, 314 313 }; 315 314
+1
drivers/video/fbdev/omap2/displays-new/connector-dvi.c
··· 391 391 .name = "connector-dvi", 392 392 .owner = THIS_MODULE, 393 393 .of_match_table = dvic_of_match, 394 + .suppress_bind_attrs = true, 394 395 }, 395 396 }; 396 397
+1
drivers/video/fbdev/omap2/displays-new/connector-hdmi.c
··· 437 437 .name = "connector-hdmi", 438 438 .owner = THIS_MODULE, 439 439 .of_match_table = hdmic_of_match, 440 + .suppress_bind_attrs = true, 440 441 }, 441 442 }; 442 443
+1
drivers/video/fbdev/omap2/displays-new/encoder-tfp410.c
··· 298 298 .name = "tfp410", 299 299 .owner = THIS_MODULE, 300 300 .of_match_table = tfp410_of_match, 301 + .suppress_bind_attrs = true, 301 302 }, 302 303 }; 303 304
+1
drivers/video/fbdev/omap2/displays-new/encoder-tpd12s015.c
··· 461 461 .name = "tpd12s015", 462 462 .owner = THIS_MODULE, 463 463 .of_match_table = tpd_of_match, 464 + .suppress_bind_attrs = true, 464 465 }, 465 466 }; 466 467
+1
drivers/video/fbdev/omap2/displays-new/panel-dpi.c
··· 327 327 .name = "panel-dpi", 328 328 .owner = THIS_MODULE, 329 329 .of_match_table = panel_dpi_of_match, 330 + .suppress_bind_attrs = true, 330 331 }, 331 332 }; 332 333
+1
drivers/video/fbdev/omap2/displays-new/panel-dsi-cm.c
··· 1378 1378 .name = "panel-dsi-cm", 1379 1379 .owner = THIS_MODULE, 1380 1380 .of_match_table = dsicm_of_match, 1381 + .suppress_bind_attrs = true, 1381 1382 }, 1382 1383 }; 1383 1384
+1
drivers/video/fbdev/omap2/displays-new/panel-lgphilips-lb035q02.c
··· 394 394 .name = "panel_lgphilips_lb035q02", 395 395 .owner = THIS_MODULE, 396 396 .of_match_table = lb035q02_of_match, 397 + .suppress_bind_attrs = true, 397 398 }, 398 399 }; 399 400
+1
drivers/video/fbdev/omap2/displays-new/panel-nec-nl8048hl11.c
··· 424 424 .owner = THIS_MODULE, 425 425 .pm = NEC_8048_PM_OPS, 426 426 .of_match_table = nec_8048_of_match, 427 + .suppress_bind_attrs = true, 427 428 }, 428 429 .probe = nec_8048_probe, 429 430 .remove = nec_8048_remove,
+1
drivers/video/fbdev/omap2/displays-new/panel-sharp-ls037v7dw01.c
··· 410 410 .name = "panel-sharp-ls037v7dw01", 411 411 .owner = THIS_MODULE, 412 412 .of_match_table = sharp_ls_of_match, 413 + .suppress_bind_attrs = true, 413 414 }, 414 415 }; 415 416
+1
drivers/video/fbdev/omap2/displays-new/panel-sony-acx565akm.c
··· 904 904 .name = "acx565akm", 905 905 .owner = THIS_MODULE, 906 906 .of_match_table = acx565akm_of_match, 907 + .suppress_bind_attrs = true, 907 908 }, 908 909 .probe = acx565akm_probe, 909 910 .remove = acx565akm_remove,
+1
drivers/video/fbdev/omap2/displays-new/panel-tpo-td028ttec1.c
··· 500 500 .name = "panel-tpo-td028ttec1", 501 501 .owner = THIS_MODULE, 502 502 .of_match_table = td028ttec1_of_match, 503 + .suppress_bind_attrs = true, 503 504 }, 504 505 }; 505 506
+1
drivers/video/fbdev/omap2/displays-new/panel-tpo-td043mtea1.c
··· 673 673 .owner = THIS_MODULE, 674 674 .pm = &tpo_td043_spi_pm, 675 675 .of_match_table = tpo_td043_of_match, 676 + .suppress_bind_attrs = true, 676 677 }, 677 678 .probe = tpo_td043_probe, 678 679 .remove = tpo_td043_remove,
+2
drivers/video/fbdev/omap2/dss/apply.c
··· 1132 1132 if (!mp->enabled) 1133 1133 goto out; 1134 1134 1135 + wait_pending_extra_info_updates(); 1136 + 1135 1137 if (!mgr_manual_update(mgr)) 1136 1138 dispc_mgr_disable_sync(mgr->id); 1137 1139
+4 -4
drivers/video/fbdev/omap2/dss/dispc.c
··· 3290 3290 DUMPREG(i, DISPC_OVL_FIFO_SIZE_STATUS); 3291 3291 DUMPREG(i, DISPC_OVL_ROW_INC); 3292 3292 DUMPREG(i, DISPC_OVL_PIXEL_INC); 3293 + 3293 3294 if (dss_has_feature(FEAT_PRELOAD)) 3294 3295 DUMPREG(i, DISPC_OVL_PRELOAD); 3296 + if (dss_has_feature(FEAT_MFLAG)) 3297 + DUMPREG(i, DISPC_OVL_MFLAG_THRESHOLD); 3295 3298 3296 3299 if (i == OMAP_DSS_GFX) { 3297 3300 DUMPREG(i, DISPC_OVL_WINDOW_SKIP); ··· 3315 3312 } 3316 3313 if (dss_has_feature(FEAT_ATTR2)) 3317 3314 DUMPREG(i, DISPC_OVL_ATTRIBUTES2); 3318 - if (dss_has_feature(FEAT_PRELOAD)) 3319 - DUMPREG(i, DISPC_OVL_PRELOAD); 3320 - if (dss_has_feature(FEAT_MFLAG)) 3321 - DUMPREG(i, DISPC_OVL_MFLAG_THRESHOLD); 3322 3315 } 3323 3316 3324 3317 #undef DISPC_REG ··· 3842 3843 .owner = THIS_MODULE, 3843 3844 .pm = &dispc_pm_ops, 3844 3845 .of_match_table = dispc_of_match, 3846 + .suppress_bind_attrs = true, 3845 3847 }, 3846 3848 }; 3847 3849
+1 -2
drivers/video/fbdev/omap2/dss/dispc.h
··· 101 101 DISPC_FIR_COEF_V2_OFFSET(n, i)) 102 102 #define DISPC_OVL_PRELOAD(n) (DISPC_OVL_BASE(n) + \ 103 103 DISPC_PRELOAD_OFFSET(n)) 104 - #define DISPC_OVL_MFLAG_THRESHOLD(n) (DISPC_OVL_BASE(n) + \ 105 - DISPC_MFLAG_THRESHOLD_OFFSET(n)) 104 + #define DISPC_OVL_MFLAG_THRESHOLD(n) DISPC_MFLAG_THRESHOLD_OFFSET(n) 106 105 107 106 /* DISPC up/downsampling FIR filter coefficient structure */ 108 107 struct dispc_coef {
+1
drivers/video/fbdev/omap2/dss/dpi.c
··· 720 720 .driver = { 721 721 .name = "omapdss_dpi", 722 722 .owner = THIS_MODULE, 723 + .suppress_bind_attrs = true, 723 724 }, 724 725 }; 725 726
+2 -1
drivers/video/fbdev/omap2/dss/dsi.c
··· 1603 1603 } else if (dss_has_feature(FEAT_DSI_PLL_SELFREQDCO)) { 1604 1604 f = cinfo->clkin4ddr < 1000000000 ? 0x2 : 0x4; 1605 1605 1606 - l = FLD_MOD(l, f, 4, 1); /* PLL_SELFREQDCO */ 1606 + l = FLD_MOD(l, f, 3, 1); /* PLL_SELFREQDCO */ 1607 1607 } 1608 1608 1609 1609 l = FLD_MOD(l, 1, 13, 13); /* DSI_PLL_REFEN */ ··· 5754 5754 .owner = THIS_MODULE, 5755 5755 .pm = &dsi_pm_ops, 5756 5756 .of_match_table = dsi_of_match, 5757 + .suppress_bind_attrs = true, 5757 5758 }, 5758 5759 }; 5759 5760
+1
drivers/video/fbdev/omap2/dss/dss.c
··· 966 966 .owner = THIS_MODULE, 967 967 .pm = &dss_pm_ops, 968 968 .of_match_table = dss_of_match, 969 + .suppress_bind_attrs = true, 969 970 }, 970 971 }; 971 972
+1
drivers/video/fbdev/omap2/dss/hdmi4.c
··· 781 781 .owner = THIS_MODULE, 782 782 .pm = &hdmi_pm_ops, 783 783 .of_match_table = hdmi_of_match, 784 + .suppress_bind_attrs = true, 784 785 }, 785 786 }; 786 787
+1
drivers/video/fbdev/omap2/dss/hdmi5.c
··· 806 806 .owner = THIS_MODULE, 807 807 .pm = &hdmi_pm_ops, 808 808 .of_match_table = hdmi_of_match, 809 + .suppress_bind_attrs = true, 809 810 }, 810 811 }; 811 812
+6 -7
drivers/video/fbdev/omap2/dss/hdmi_pll.c
··· 124 124 r = FLD_MOD(r, 0x0, 14, 14); /* PHY_CLKINEN de-assert during locking */ 125 125 r = FLD_MOD(r, fmt->refsel, 22, 21); /* REFSEL */ 126 126 127 - if (fmt->dcofreq) { 128 - /* divider programming for frequency beyond 1000Mhz */ 129 - REG_FLD_MOD(pll->base, PLLCTRL_CFG3, fmt->regsd, 17, 10); 127 + if (fmt->dcofreq) 130 128 r = FLD_MOD(r, 0x4, 3, 1); /* 1000MHz and 2000MHz */ 131 - } else { 129 + else 132 130 r = FLD_MOD(r, 0x2, 3, 1); /* 500MHz and 1000MHz */ 133 - } 134 131 135 132 hdmi_write_reg(pll->base, PLLCTRL_CFG2, r); 133 + 134 + REG_FLD_MOD(pll->base, PLLCTRL_CFG3, fmt->regsd, 17, 10); 136 135 137 136 r = hdmi_read_reg(pll->base, PLLCTRL_CFG4); 138 137 r = FLD_MOD(r, fmt->regm2, 24, 18); ··· 143 144 144 145 /* wait for bit change */ 145 146 if (hdmi_wait_for_bit_change(pll->base, PLLCTRL_PLL_GO, 146 - 0, 0, 1) != 1) { 147 - DSSERR("PLL GO bit not set\n"); 147 + 0, 0, 0) != 0) { 148 + DSSERR("PLL GO bit not clearing\n"); 148 149 return -ETIMEDOUT; 149 150 } 150 151
+1
drivers/video/fbdev/omap2/dss/rfbi.c
··· 1044 1044 .name = "omapdss_rfbi", 1045 1045 .owner = THIS_MODULE, 1046 1046 .pm = &rfbi_pm_ops, 1047 + .suppress_bind_attrs = true, 1047 1048 }, 1048 1049 }; 1049 1050
+1
drivers/video/fbdev/omap2/dss/sdi.c
··· 377 377 .driver = { 378 378 .name = "omapdss_sdi", 379 379 .owner = THIS_MODULE, 380 + .suppress_bind_attrs = true, 380 381 }, 381 382 }; 382 383
+1
drivers/video/fbdev/omap2/dss/venc.c
··· 966 966 .owner = THIS_MODULE, 967 967 .pm = &venc_pm_ops, 968 968 .of_match_table = venc_of_match, 969 + .suppress_bind_attrs = true, 969 970 }, 970 971 }; 971 972
+9 -9
drivers/video/fbdev/omap2/omapfb/omapfb-main.c
··· 1833 1833 if (fbdev == NULL) 1834 1834 return; 1835 1835 1836 - for (i = 0; i < fbdev->num_fbs; i++) { 1837 - struct omapfb_info *ofbi = FB2OFB(fbdev->fbs[i]); 1838 - int j; 1836 + for (i = 0; i < fbdev->num_overlays; i++) { 1837 + struct omap_overlay *ovl = fbdev->overlays[i]; 1839 1838 1840 - for (j = 0; j < ofbi->num_overlays; j++) { 1841 - struct omap_overlay *ovl = ofbi->overlays[j]; 1842 - ovl->disable(ovl); 1843 - } 1839 + ovl->disable(ovl); 1840 + 1841 + if (ovl->manager) 1842 + ovl->unset_manager(ovl); 1844 1843 } 1845 1844 1846 1845 for (i = 0; i < fbdev->num_fbs; i++) ··· 2618 2619 return r; 2619 2620 } 2620 2621 2621 - static int __exit omapfb_remove(struct platform_device *pdev) 2622 + static int omapfb_remove(struct platform_device *pdev) 2622 2623 { 2623 2624 struct omapfb2_device *fbdev = platform_get_drvdata(pdev); 2624 2625 ··· 2635 2636 2636 2637 static struct platform_driver omapfb_driver = { 2637 2638 .probe = omapfb_probe, 2638 - .remove = __exit_p(omapfb_remove), 2639 + .remove = omapfb_remove, 2639 2640 .driver = { 2640 2641 .name = "omapfb", 2641 2642 .owner = THIS_MODULE, ··· 2650 2651 2651 2652 module_platform_driver(omapfb_driver); 2652 2653 2654 + MODULE_ALIAS("platform:omapfb"); 2653 2655 MODULE_AUTHOR("Tomi Valkeinen <tomi.valkeinen@nokia.com>"); 2654 2656 MODULE_DESCRIPTION("OMAP2/3 Framebuffer"); 2655 2657 MODULE_LICENSE("GPL v2");