diff options
author | Paul Mundt <lethal@linux-sh.org> | 2008-10-19 22:17:52 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-10-19 22:17:52 -0400 |
commit | 4cb40f795af36b3deb743f6ccf6c3fd542c61c8d (patch) | |
tree | db3d7519932549bf528f5b8e4cb8350356cd544d /drivers/video/console/fbcon.c | |
parent | 79ed2a9216dd3cc35c4f2c5dbaddadb195af83ac (diff) | |
parent | 0cfd81031a26717fe14380d18275f8e217571615 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
Documentation/kernel-parameters.txt
arch/sh/include/asm/elf.h
Diffstat (limited to 'drivers/video/console/fbcon.c')
-rw-r--r-- | drivers/video/console/fbcon.c | 53 |
1 files changed, 19 insertions, 34 deletions
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index c6299e8a041d..64b3d30027b8 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c | |||
@@ -1855,8 +1855,6 @@ static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir, | |||
1855 | struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; | 1855 | struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; |
1856 | struct display *p = &fb_display[vc->vc_num]; | 1856 | struct display *p = &fb_display[vc->vc_num]; |
1857 | int scroll_partial = info->flags & FBINFO_PARTIAL_PAN_OK; | 1857 | int scroll_partial = info->flags & FBINFO_PARTIAL_PAN_OK; |
1858 | unsigned short saved_ec; | ||
1859 | int ret; | ||
1860 | 1858 | ||
1861 | if (fbcon_is_inactive(vc, info)) | 1859 | if (fbcon_is_inactive(vc, info)) |
1862 | return -EINVAL; | 1860 | return -EINVAL; |
@@ -1869,11 +1867,6 @@ static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir, | |||
1869 | * whole screen (prevents flicker). | 1867 | * whole screen (prevents flicker). |
1870 | */ | 1868 | */ |
1871 | 1869 | ||
1872 | saved_ec = vc->vc_video_erase_char; | ||
1873 | vc->vc_video_erase_char = vc->vc_scrl_erase_char; | ||
1874 | |||
1875 | ret = 0; | ||
1876 | |||
1877 | switch (dir) { | 1870 | switch (dir) { |
1878 | case SM_UP: | 1871 | case SM_UP: |
1879 | if (count > vc->vc_rows) /* Maximum realistic size */ | 1872 | if (count > vc->vc_rows) /* Maximum realistic size */ |
@@ -1890,9 +1883,9 @@ static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir, | |||
1890 | scr_memsetw((unsigned short *) (vc->vc_origin + | 1883 | scr_memsetw((unsigned short *) (vc->vc_origin + |
1891 | vc->vc_size_row * | 1884 | vc->vc_size_row * |
1892 | (b - count)), | 1885 | (b - count)), |
1893 | vc->vc_scrl_erase_char, | 1886 | vc->vc_video_erase_char, |
1894 | vc->vc_size_row * count); | 1887 | vc->vc_size_row * count); |
1895 | ret = 1; | 1888 | return 1; |
1896 | break; | 1889 | break; |
1897 | 1890 | ||
1898 | case SCROLL_WRAP_MOVE: | 1891 | case SCROLL_WRAP_MOVE: |
@@ -1962,10 +1955,9 @@ static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir, | |||
1962 | scr_memsetw((unsigned short *) (vc->vc_origin + | 1955 | scr_memsetw((unsigned short *) (vc->vc_origin + |
1963 | vc->vc_size_row * | 1956 | vc->vc_size_row * |
1964 | (b - count)), | 1957 | (b - count)), |
1965 | vc->vc_scrl_erase_char, | 1958 | vc->vc_video_erase_char, |
1966 | vc->vc_size_row * count); | 1959 | vc->vc_size_row * count); |
1967 | ret = 1; | 1960 | return 1; |
1968 | break; | ||
1969 | } | 1961 | } |
1970 | break; | 1962 | break; |
1971 | 1963 | ||
@@ -1982,9 +1974,9 @@ static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir, | |||
1982 | scr_memsetw((unsigned short *) (vc->vc_origin + | 1974 | scr_memsetw((unsigned short *) (vc->vc_origin + |
1983 | vc->vc_size_row * | 1975 | vc->vc_size_row * |
1984 | t), | 1976 | t), |
1985 | vc->vc_scrl_erase_char, | 1977 | vc->vc_video_erase_char, |
1986 | vc->vc_size_row * count); | 1978 | vc->vc_size_row * count); |
1987 | ret = 1; | 1979 | return 1; |
1988 | break; | 1980 | break; |
1989 | 1981 | ||
1990 | case SCROLL_WRAP_MOVE: | 1982 | case SCROLL_WRAP_MOVE: |
@@ -2052,15 +2044,12 @@ static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir, | |||
2052 | scr_memsetw((unsigned short *) (vc->vc_origin + | 2044 | scr_memsetw((unsigned short *) (vc->vc_origin + |
2053 | vc->vc_size_row * | 2045 | vc->vc_size_row * |
2054 | t), | 2046 | t), |
2055 | vc->vc_scrl_erase_char, | 2047 | vc->vc_video_erase_char, |
2056 | vc->vc_size_row * count); | 2048 | vc->vc_size_row * count); |
2057 | ret = 1; | 2049 | return 1; |
2058 | break; | ||
2059 | } | 2050 | } |
2060 | break; | ||
2061 | } | 2051 | } |
2062 | vc->vc_video_erase_char = saved_ec; | 2052 | return 0; |
2063 | return ret; | ||
2064 | } | 2053 | } |
2065 | 2054 | ||
2066 | 2055 | ||
@@ -2400,11 +2389,15 @@ static int fbcon_blank(struct vc_data *vc, int blank, int mode_switch) | |||
2400 | 2389 | ||
2401 | if (!fbcon_is_inactive(vc, info)) { | 2390 | if (!fbcon_is_inactive(vc, info)) { |
2402 | if (ops->blank_state != blank) { | 2391 | if (ops->blank_state != blank) { |
2392 | int ret = 1; | ||
2393 | |||
2403 | ops->blank_state = blank; | 2394 | ops->blank_state = blank; |
2404 | fbcon_cursor(vc, blank ? CM_ERASE : CM_DRAW); | 2395 | fbcon_cursor(vc, blank ? CM_ERASE : CM_DRAW); |
2405 | ops->cursor_flash = (!blank); | 2396 | ops->cursor_flash = (!blank); |
2406 | 2397 | ||
2407 | if (fb_blank(info, blank)) | 2398 | if (info->fbops->fb_blank) |
2399 | ret = info->fbops->fb_blank(blank, info); | ||
2400 | if (ret) | ||
2408 | fbcon_generic_blank(vc, info, blank); | 2401 | fbcon_generic_blank(vc, info, blank); |
2409 | } | 2402 | } |
2410 | 2403 | ||
@@ -2518,9 +2511,6 @@ static int fbcon_do_set_font(struct vc_data *vc, int w, int h, | |||
2518 | c = vc->vc_video_erase_char; | 2511 | c = vc->vc_video_erase_char; |
2519 | vc->vc_video_erase_char = | 2512 | vc->vc_video_erase_char = |
2520 | ((c & 0xfe00) >> 1) | (c & 0xff); | 2513 | ((c & 0xfe00) >> 1) | (c & 0xff); |
2521 | c = vc->vc_scrl_erase_char; | ||
2522 | vc->vc_scrl_erase_char = | ||
2523 | ((c & 0xFE00) >> 1) | (c & 0xFF); | ||
2524 | vc->vc_attr >>= 1; | 2514 | vc->vc_attr >>= 1; |
2525 | } | 2515 | } |
2526 | } else if (!vc->vc_hi_font_mask && cnt == 512) { | 2516 | } else if (!vc->vc_hi_font_mask && cnt == 512) { |
@@ -2551,14 +2541,9 @@ static int fbcon_do_set_font(struct vc_data *vc, int w, int h, | |||
2551 | if (vc->vc_can_do_color) { | 2541 | if (vc->vc_can_do_color) { |
2552 | vc->vc_video_erase_char = | 2542 | vc->vc_video_erase_char = |
2553 | ((c & 0xff00) << 1) | (c & 0xff); | 2543 | ((c & 0xff00) << 1) | (c & 0xff); |
2554 | c = vc->vc_scrl_erase_char; | ||
2555 | vc->vc_scrl_erase_char = | ||
2556 | ((c & 0xFF00) << 1) | (c & 0xFF); | ||
2557 | vc->vc_attr <<= 1; | 2544 | vc->vc_attr <<= 1; |
2558 | } else { | 2545 | } else |
2559 | vc->vc_video_erase_char = c & ~0x100; | 2546 | vc->vc_video_erase_char = c & ~0x100; |
2560 | vc->vc_scrl_erase_char = c & ~0x100; | ||
2561 | } | ||
2562 | } | 2547 | } |
2563 | 2548 | ||
2564 | } | 2549 | } |
@@ -2992,8 +2977,8 @@ static void fbcon_set_all_vcs(struct fb_info *info) | |||
2992 | p = &fb_display[vc->vc_num]; | 2977 | p = &fb_display[vc->vc_num]; |
2993 | set_blitting_type(vc, info); | 2978 | set_blitting_type(vc, info); |
2994 | var_to_display(p, &info->var, info); | 2979 | var_to_display(p, &info->var, info); |
2995 | cols = FBCON_SWAP(p->rotate, info->var.xres, info->var.yres); | 2980 | cols = FBCON_SWAP(ops->rotate, info->var.xres, info->var.yres); |
2996 | rows = FBCON_SWAP(p->rotate, info->var.yres, info->var.xres); | 2981 | rows = FBCON_SWAP(ops->rotate, info->var.yres, info->var.xres); |
2997 | cols /= vc->vc_font.width; | 2982 | cols /= vc->vc_font.width; |
2998 | rows /= vc->vc_font.height; | 2983 | rows /= vc->vc_font.height; |
2999 | vc_resize(vc, cols, rows); | 2984 | vc_resize(vc, cols, rows); |
@@ -3588,8 +3573,8 @@ static int __init fb_console_init(void) | |||
3588 | 3573 | ||
3589 | acquire_console_sem(); | 3574 | acquire_console_sem(); |
3590 | fb_register_client(&fbcon_event_notifier); | 3575 | fb_register_client(&fbcon_event_notifier); |
3591 | fbcon_device = device_create_drvdata(fb_class, NULL, MKDEV(0, 0), | 3576 | fbcon_device = device_create(fb_class, NULL, MKDEV(0, 0), NULL, |
3592 | NULL, "fbcon"); | 3577 | "fbcon"); |
3593 | 3578 | ||
3594 | if (IS_ERR(fbcon_device)) { | 3579 | if (IS_ERR(fbcon_device)) { |
3595 | printk(KERN_WARNING "Unable to create device " | 3580 | printk(KERN_WARNING "Unable to create device " |