Merge tag 'fbdev-v4.14' of git://github.com/bzolnier/linux

Pull fbdev updates from Bartlomiej Zolnierkiewicz:

- make fbcon a built-time depency for fbdev (fbcon was tristate option
before, now it is a bool) - this is a first step in preparations for
making console_lock usage saner (currently it acts like the BKL for
all things fbdev/fbcon) (Daniel Vetter)

- add fbcon=margin:<color> command line option to select the fbcon
margin color (David Lechner)

- add DMI quirk table for x86 systems which need fbcon rotation
(devices like Asus T100HA, GPD Pocket, the GPD win and the I.T.Works
TW891) (Hans de Goede)

- fix 1bpp logo support for unusual width (needed by LEGO MINDSTORMS
EV3) (David Lechner)

- enable Xilinx FB driver for ARM ZynqMP platform (Michal Simek)

- fix use after free in the error path of udlfb driver (Anton Vasilyev)

- fix error return code handling in pxa3xx_gcu driver (Gustavo A. R.
Silva)

- fix bootparams.screeninfo arguments checking in vgacon (Jan H.
Schönherr)

- do not leak uninitialized padding in clk to userspace in the debug
code of atyfb driver (Vladis Dronov)

- fix compiler warnings in fbcon code and matroxfb driver (Arnd
Bergmann)

- convert fbdev susbsytem to using %pOF instead of full_name (Rob
Herring)

- structures constifications (Arvind Yadav, Bhumika Goyal, Gustavo A.
R. Silva, Julia Lawall)

- misc cleanups (Gustavo A. R. Silva, Hyun Kwon, Julia Lawall, Kuninori
Morimoto, Lynn Lei)

* tag 'fbdev-v4.14' of git://github.com/bzolnier/linux: (75 commits)
video/console: Update BIOS dates list for GPD win console rotation DMI quirk
video/console: Add rotated LCD-panel DMI quirk for the VIOS LTH17
video: fbdev: sis: fix duplicated code for different branches
video: fbdev: make fb_var_screeninfo const
video: fbdev: aty: do not leak uninitialized padding in clk to userspace
vgacon: Prevent faulty bootparams.screeninfo from causing harm
video: fbdev: make fb_videomode const
video/console: Add new BIOS date for GPD pocket to dmi quirk table
fbcon: remove restriction on margin color
video: ARM CLCD: constify amba_id
video: fm2fb: constify zorro_device_id
video: fbdev: annotate fb_fix_screeninfo with const and __initconst
omapfb: constify omap_video_timings structures
video: fbdev: udlfb: Fix use after free on dlfb_usb_probe error path
fbdev: i810: make fb_ops const
fbdev: matrox: make fb_ops const
video: fbdev: pxa3xx_gcu: fix error return code in pxa3xx_gcu_probe()
video: fbdev: Enable Xilinx FB for ZynqMP
video: fbdev: Fix multiple style issues in xilinxfb
video: fbdev: udlfb: constify usb_device_id.
...

+641 -512
+7
Documentation/fb/fbcon.txt
··· 148 148 Actually, the underlying fb driver is totally ignorant of console 149 149 rotation. 150 150 151 + 5. fbcon=margin:<color> 152 + 153 + This option specifies the color of the margins. The margins are the 154 + leftover area at the right and the bottom of the screen that are not 155 + used by text. By default, this area will be black. The 'color' value 156 + is an integer number that depends on the framebuffer driver being used. 157 + 151 158 C. Attaching, Detaching and Unloading 152 159 153 160 Before going on how to attach, detach and unload the framebuffer console, an
+1 -1
drivers/video/console/Kconfig
··· 117 117 Select 25 if you use a 640x480 resolution by default. 118 118 119 119 config FRAMEBUFFER_CONSOLE 120 - tristate "Framebuffer Console support" 120 + bool "Framebuffer Console support" 121 121 depends on FB && !UML 122 122 select VT_HW_CONSOLE_BINDING 123 123 select CRC32
-8
drivers/video/console/Makefile
··· 7 7 obj-$(CONFIG_STI_CONSOLE) += sticon.o sticore.o 8 8 obj-$(CONFIG_VGA_CONSOLE) += vgacon.o 9 9 obj-$(CONFIG_MDA_CONSOLE) += mdacon.o 10 - obj-$(CONFIG_FRAMEBUFFER_CONSOLE) += fbcon.o bitblit.o softcursor.o 11 - ifeq ($(CONFIG_FB_TILEBLITTING),y) 12 - obj-$(CONFIG_FRAMEBUFFER_CONSOLE) += tileblit.o 13 - endif 14 - ifeq ($(CONFIG_FRAMEBUFFER_CONSOLE_ROTATION),y) 15 - obj-$(CONFIG_FRAMEBUFFER_CONSOLE) += fbcon_rotate.o fbcon_cw.o fbcon_ud.o \ 16 - fbcon_ccw.o 17 - endif 18 10 19 11 obj-$(CONFIG_FB_STI) += sticore.o
+2 -6
drivers/video/console/bitblit.c drivers/video/fbdev/core/bitblit.c
··· 203 203 } 204 204 205 205 static void bit_clear_margins(struct vc_data *vc, struct fb_info *info, 206 - int bottom_only) 206 + int color, int bottom_only) 207 207 { 208 208 unsigned int cw = vc->vc_font.width; 209 209 unsigned int ch = vc->vc_font.height; ··· 213 213 unsigned int bs = info->var.yres - bh; 214 214 struct fb_fillrect region; 215 215 216 - region.color = 0; 216 + region.color = color; 217 217 region.rop = ROP_COPY; 218 218 219 219 if (rw && !bottom_only) { ··· 415 415 } 416 416 417 417 EXPORT_SYMBOL(fbcon_set_bitops); 418 - 419 - MODULE_AUTHOR("Antonino Daplas <adaplas@pol.net>"); 420 - MODULE_DESCRIPTION("Bit Blitting Operation"); 421 - MODULE_LICENSE("GPL"); 422 418
+22 -15
drivers/video/console/fbcon.c drivers/video/fbdev/core/fbcon.c
··· 68 68 #include <linux/kd.h> 69 69 #include <linux/slab.h> 70 70 #include <linux/fb.h> 71 + #include <linux/fbcon.h> 71 72 #include <linux/vt_kern.h> 72 73 #include <linux/selection.h> 73 74 #include <linux/font.h> ··· 136 135 static int info_idx = -1; 137 136 138 137 /* console rotation */ 139 - static int initial_rotation; 138 + static int initial_rotation = -1; 140 139 static int fbcon_has_sysfs; 140 + static int margin_color; 141 141 142 142 static const struct consw fb_con; 143 143 ··· 493 491 initial_rotation = 0; 494 492 continue; 495 493 } 494 + 495 + if (!strncmp(options, "margin:", 7)) { 496 + options += 7; 497 + if (*options) 498 + margin_color = simple_strtoul(options, &options, 0); 499 + continue; 500 + } 496 501 } 497 502 return 1; 498 503 } ··· 572 563 unsigned short *save = NULL, *r, *q; 573 564 int logo_height; 574 565 575 - if (info->flags & FBINFO_MODULE) { 566 + if (info->fbops->owner) { 576 567 logo_shown = FBCON_LOGO_DONTSHOW; 577 568 return; 578 569 } ··· 963 954 ops->cur_rotate = -1; 964 955 ops->cur_blink_jiffies = HZ / 5; 965 956 info->fbcon_par = ops; 966 - p->con_rotate = initial_rotation; 957 + if (initial_rotation != -1) 958 + p->con_rotate = initial_rotation; 959 + else 960 + p->con_rotate = fbcon_platform_get_rotate(info); 967 961 set_blitting_type(vc, info); 968 962 969 963 if (info->fix.type != FB_TYPE_TEXT) { ··· 1103 1091 1104 1092 ops = info->fbcon_par; 1105 1093 ops->cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms); 1106 - p->con_rotate = initial_rotation; 1094 + if (initial_rotation != -1) 1095 + p->con_rotate = initial_rotation; 1096 + else 1097 + p->con_rotate = fbcon_platform_get_rotate(info); 1107 1098 set_blitting_type(vc, info); 1108 1099 1109 1100 cols = vc->vc_cols; ··· 1314 1299 struct fbcon_ops *ops = info->fbcon_par; 1315 1300 1316 1301 if (!fbcon_is_inactive(vc, info)) 1317 - ops->clear_margins(vc, info, bottom_only); 1302 + ops->clear_margins(vc, info, margin_color, bottom_only); 1318 1303 } 1319 1304 1320 1305 static void fbcon_cursor(struct vc_data *vc, int mode) ··· 3621 3606 fbcon_has_exited = 1; 3622 3607 } 3623 3608 3624 - static int __init fb_console_init(void) 3609 + void __init fb_console_init(void) 3625 3610 { 3626 3611 int i; 3627 3612 ··· 3643 3628 3644 3629 console_unlock(); 3645 3630 fbcon_start(); 3646 - return 0; 3647 3631 } 3648 - 3649 - fs_initcall(fb_console_init); 3650 3632 3651 3633 #ifdef MODULE 3652 3634 ··· 3659 3647 } 3660 3648 } 3661 3649 3662 - static void __exit fb_console_exit(void) 3650 + void __exit fb_console_exit(void) 3663 3651 { 3664 3652 console_lock(); 3665 3653 fb_unregister_client(&fbcon_event_notifier); ··· 3669 3657 do_unregister_con_driver(&fb_con); 3670 3658 console_unlock(); 3671 3659 } 3672 - 3673 - module_exit(fb_console_exit); 3674 - 3675 3660 #endif 3676 - 3677 - MODULE_LICENSE("GPL");
+7 -2
drivers/video/console/fbcon.h drivers/video/fbdev/core/fbcon.h
··· 60 60 const unsigned short *s, int count, int yy, int xx, 61 61 int fg, int bg); 62 62 void (*clear_margins)(struct vc_data *vc, struct fb_info *info, 63 - int bottom_only); 63 + int color, int bottom_only); 64 64 void (*cursor)(struct vc_data *vc, struct fb_info *info, int mode, 65 65 int softback_lines, int fg, int bg); 66 66 int (*update_start)(struct fb_info *info); ··· 261 261 #define fbcon_set_rotate(x) do {} while(0) 262 262 #endif /* CONFIG_FRAMEBUFFER_CONSOLE_ROTATION */ 263 263 264 - #endif /* _VIDEO_FBCON_H */ 264 + #ifdef CONFIG_DMI 265 + int fbcon_platform_get_rotate(struct fb_info *info); 266 + #else 267 + #define fbcon_platform_get_rotate(i) FB_ROTATE_UR 268 + #endif /* CONFIG_DMI */ 265 269 270 + #endif /* _VIDEO_FBCON_H */
+2 -6
drivers/video/console/fbcon_ccw.c drivers/video/fbdev/core/fbcon_ccw.c
··· 189 189 } 190 190 191 191 static void ccw_clear_margins(struct vc_data *vc, struct fb_info *info, 192 - int bottom_only) 192 + int color, int bottom_only) 193 193 { 194 194 unsigned int cw = vc->vc_font.width; 195 195 unsigned int ch = vc->vc_font.height; ··· 198 198 unsigned int bs = vc->vc_rows*ch; 199 199 struct fb_fillrect region; 200 200 201 - region.color = 0; 201 + region.color = color; 202 202 region.rop = ROP_COPY; 203 203 204 204 if (rw && !bottom_only) { ··· 418 418 ops->update_start = ccw_update_start; 419 419 } 420 420 EXPORT_SYMBOL(fbcon_rotate_ccw); 421 - 422 - MODULE_AUTHOR("Antonino Daplas <adaplas@pol.net>"); 423 - MODULE_DESCRIPTION("Console Rotation (270 degrees) Support"); 424 - MODULE_LICENSE("GPL");
+146 -105
drivers/video/console/fbcon_cw.c drivers/video/fbdev/core/fbcon_ud.c
··· 1 1 /* 2 - * linux/drivers/video/console/fbcon_ud.c -- Software Rotation - 90 degrees 2 + * linux/drivers/video/console/fbcon_ud.c -- Software Rotation - 180 degrees 3 3 * 4 4 * Copyright (C) 2005 Antonino Daplas <adaplas @pol.net> 5 5 * ··· 19 19 #include "fbcon_rotate.h" 20 20 21 21 /* 22 - * Rotation 90 degrees 22 + * Rotation 180 degrees 23 23 */ 24 24 25 - static void cw_update_attr(u8 *dst, u8 *src, int attribute, 25 + static void ud_update_attr(u8 *dst, u8 *src, int attribute, 26 26 struct vc_data *vc) 27 27 { 28 - int i, j, offset = (vc->vc_font.height < 10) ? 1 : 2; 29 - int width = (vc->vc_font.height + 7) >> 3; 30 - u8 c, msk = ~(0xff >> offset); 28 + int i, offset = (vc->vc_font.height < 10) ? 1 : 2; 29 + int width = (vc->vc_font.width + 7) >> 3; 30 + unsigned int cellsize = vc->vc_font.height * width; 31 + u8 c; 31 32 32 - for (i = 0; i < vc->vc_font.width; i++) { 33 - for (j = 0; j < width; j++) { 34 - c = *src; 35 - if (attribute & FBCON_ATTRIBUTE_UNDERLINE && !j) 36 - c |= msk; 37 - if (attribute & FBCON_ATTRIBUTE_BOLD && i) 38 - c |= *(src-width); 39 - if (attribute & FBCON_ATTRIBUTE_REVERSE) 40 - c = ~c; 41 - src++; 42 - *dst++ = c; 43 - } 33 + offset = offset * width; 34 + 35 + for (i = 0; i < cellsize; i++) { 36 + c = src[i]; 37 + if (attribute & FBCON_ATTRIBUTE_UNDERLINE && i < offset) 38 + c = 0xff; 39 + if (attribute & FBCON_ATTRIBUTE_BOLD) 40 + c |= c << 1; 41 + if (attribute & FBCON_ATTRIBUTE_REVERSE) 42 + c = ~c; 43 + dst[i] = c; 44 44 } 45 45 } 46 46 47 47 48 - static void cw_bmove(struct vc_data *vc, struct fb_info *info, int sy, 48 + static void ud_bmove(struct vc_data *vc, struct fb_info *info, int sy, 49 49 int sx, int dy, int dx, int height, int width) 50 50 { 51 51 struct fbcon_ops *ops = info->fbcon_par; 52 52 struct fb_copyarea area; 53 + u32 vyres = GETVYRES(ops->p->scrollmode, info); 53 54 u32 vxres = GETVXRES(ops->p->scrollmode, info); 54 55 55 - area.sx = vxres - ((sy + height) * vc->vc_font.height); 56 - area.sy = sx * vc->vc_font.width; 57 - area.dx = vxres - ((dy + height) * vc->vc_font.height); 58 - area.dy = dx * vc->vc_font.width; 59 - area.width = height * vc->vc_font.height; 60 - area.height = width * vc->vc_font.width; 56 + area.sy = vyres - ((sy + height) * vc->vc_font.height); 57 + area.sx = vxres - ((sx + width) * vc->vc_font.width); 58 + area.dy = vyres - ((dy + height) * vc->vc_font.height); 59 + area.dx = vxres - ((dx + width) * vc->vc_font.width); 60 + area.height = height * vc->vc_font.height; 61 + area.width = width * vc->vc_font.width; 61 62 62 63 info->fbops->fb_copyarea(info, &area); 63 64 } 64 65 65 - static void cw_clear(struct vc_data *vc, struct fb_info *info, int sy, 66 + static void ud_clear(struct vc_data *vc, struct fb_info *info, int sy, 66 67 int sx, int height, int width) 67 68 { 68 69 struct fbcon_ops *ops = info->fbcon_par; 69 70 struct fb_fillrect region; 70 71 int bgshift = (vc->vc_hi_font_mask) ? 13 : 12; 72 + u32 vyres = GETVYRES(ops->p->scrollmode, info); 71 73 u32 vxres = GETVXRES(ops->p->scrollmode, info); 72 74 73 75 region.color = attr_bgcol_ec(bgshift,vc,info); 74 - region.dx = vxres - ((sy + height) * vc->vc_font.height); 75 - region.dy = sx * vc->vc_font.width; 76 - region.height = width * vc->vc_font.width; 77 - region.width = height * vc->vc_font.height; 76 + region.dy = vyres - ((sy + height) * vc->vc_font.height); 77 + region.dx = vxres - ((sx + width) * vc->vc_font.width); 78 + region.width = width * vc->vc_font.width; 79 + region.height = height * vc->vc_font.height; 78 80 region.rop = ROP_COPY; 79 81 80 82 info->fbops->fb_fillrect(info, &region); 81 83 } 82 84 83 - static inline void cw_putcs_aligned(struct vc_data *vc, struct fb_info *info, 85 + static inline void ud_putcs_aligned(struct vc_data *vc, struct fb_info *info, 84 86 const u16 *s, u32 attr, u32 cnt, 85 87 u32 d_pitch, u32 s_pitch, u32 cellsize, 86 88 struct fb_image *image, u8 *buf, u8 *dst) 87 89 { 88 90 struct fbcon_ops *ops = info->fbcon_par; 89 91 u16 charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff; 90 - u32 idx = (vc->vc_font.height + 7) >> 3; 92 + u32 idx = vc->vc_font.width >> 3; 91 93 u8 *src; 92 94 93 95 while (cnt--) { 94 - src = ops->fontbuffer + (scr_readw(s++) & charmask)*cellsize; 96 + src = ops->fontbuffer + (scr_readw(s--) & charmask)*cellsize; 95 97 96 98 if (attr) { 97 - cw_update_attr(buf, src, attr, vc); 99 + ud_update_attr(buf, src, attr, vc); 98 100 src = buf; 99 101 } 100 102 101 103 if (likely(idx == 1)) 102 104 __fb_pad_aligned_buffer(dst, d_pitch, src, idx, 103 - vc->vc_font.width); 105 + image->height); 104 106 else 105 107 fb_pad_aligned_buffer(dst, d_pitch, src, idx, 106 - vc->vc_font.width); 108 + image->height); 107 109 108 - dst += d_pitch * vc->vc_font.width; 110 + dst += s_pitch; 109 111 } 110 112 111 113 info->fbops->fb_imageblit(info, image); 112 114 } 113 115 114 - static void cw_putcs(struct vc_data *vc, struct fb_info *info, 116 + static inline void ud_putcs_unaligned(struct vc_data *vc, 117 + struct fb_info *info, const u16 *s, 118 + u32 attr, u32 cnt, u32 d_pitch, 119 + u32 s_pitch, u32 cellsize, 120 + struct fb_image *image, u8 *buf, 121 + u8 *dst) 122 + { 123 + struct fbcon_ops *ops = info->fbcon_par; 124 + u16 charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff; 125 + u32 shift_low = 0, mod = vc->vc_font.width % 8; 126 + u32 shift_high = 8; 127 + u32 idx = vc->vc_font.width >> 3; 128 + u8 *src; 129 + 130 + while (cnt--) { 131 + src = ops->fontbuffer + (scr_readw(s--) & charmask)*cellsize; 132 + 133 + if (attr) { 134 + ud_update_attr(buf, src, attr, vc); 135 + src = buf; 136 + } 137 + 138 + fb_pad_unaligned_buffer(dst, d_pitch, src, idx, 139 + image->height, shift_high, 140 + shift_low, mod); 141 + shift_low += mod; 142 + dst += (shift_low >= 8) ? s_pitch : s_pitch - 1; 143 + shift_low &= 7; 144 + shift_high = 8 - shift_low; 145 + } 146 + 147 + info->fbops->fb_imageblit(info, image); 148 + 149 + } 150 + 151 + static void ud_putcs(struct vc_data *vc, struct fb_info *info, 115 152 const unsigned short *s, int count, int yy, int xx, 116 153 int fg, int bg) 117 154 { 118 155 struct fb_image image; 119 156 struct fbcon_ops *ops = info->fbcon_par; 120 - u32 width = (vc->vc_font.height + 7)/8; 121 - u32 cellsize = width * vc->vc_font.width; 157 + u32 width = (vc->vc_font.width + 7)/8; 158 + u32 cellsize = width * vc->vc_font.height; 122 159 u32 maxcnt = info->pixmap.size/cellsize; 123 160 u32 scan_align = info->pixmap.scan_align - 1; 124 161 u32 buf_align = info->pixmap.buf_align - 1; 125 - u32 cnt, pitch, size; 162 + u32 mod = vc->vc_font.width % 8, cnt, pitch, size; 126 163 u32 attribute = get_attribute(info, scr_readw(s)); 127 164 u8 *dst, *buf = NULL; 165 + u32 vyres = GETVYRES(ops->p->scrollmode, info); 128 166 u32 vxres = GETVXRES(ops->p->scrollmode, info); 129 167 130 168 if (!ops->fontbuffer) ··· 170 132 171 133 image.fg_color = fg; 172 134 image.bg_color = bg; 173 - image.dx = vxres - ((yy + 1) * vc->vc_font.height); 174 - image.dy = xx * vc->vc_font.width; 175 - image.width = vc->vc_font.height; 135 + image.dy = vyres - ((yy * vc->vc_font.height) + vc->vc_font.height); 136 + image.dx = vxres - ((xx + count) * vc->vc_font.width); 137 + image.height = vc->vc_font.height; 176 138 image.depth = 1; 177 139 178 140 if (attribute) { ··· 181 143 return; 182 144 } 183 145 146 + s += count - 1; 147 + 184 148 while (count) { 185 149 if (count > maxcnt) 186 150 cnt = maxcnt; 187 151 else 188 152 cnt = count; 189 153 190 - image.height = vc->vc_font.width * cnt; 154 + image.width = vc->vc_font.width * cnt; 191 155 pitch = ((image.width + 7) >> 3) + scan_align; 192 156 pitch &= ~scan_align; 193 157 size = pitch * image.height + buf_align; 194 158 size &= ~buf_align; 195 159 dst = fb_get_buffer_offset(info, &info->pixmap, size); 196 160 image.data = dst; 197 - cw_putcs_aligned(vc, info, s, attribute, cnt, pitch, 198 - width, cellsize, &image, buf, dst); 199 - image.dy += image.height; 161 + 162 + if (!mod) 163 + ud_putcs_aligned(vc, info, s, attribute, cnt, pitch, 164 + width, cellsize, &image, buf, dst); 165 + else 166 + ud_putcs_unaligned(vc, info, s, attribute, cnt, pitch, 167 + width, cellsize, &image, 168 + buf, dst); 169 + 170 + image.dx += image.width; 200 171 count -= cnt; 201 - s += cnt; 172 + s -= cnt; 173 + xx += cnt; 202 174 } 203 175 204 176 /* buf is always NULL except when in monochrome mode, so in this case ··· 219 171 220 172 } 221 173 222 - static void cw_clear_margins(struct vc_data *vc, struct fb_info *info, 223 - int bottom_only) 174 + static void ud_clear_margins(struct vc_data *vc, struct fb_info *info, 175 + int color, int bottom_only) 224 176 { 225 177 unsigned int cw = vc->vc_font.width; 226 178 unsigned int ch = vc->vc_font.height; 227 - unsigned int rw = info->var.yres - (vc->vc_cols*cw); 228 - unsigned int bh = info->var.xres - (vc->vc_rows*ch); 229 - unsigned int rs = info->var.yres - rw; 179 + unsigned int rw = info->var.xres - (vc->vc_cols*cw); 180 + unsigned int bh = info->var.yres - (vc->vc_rows*ch); 230 181 struct fb_fillrect region; 231 182 232 - region.color = 0; 183 + region.color = color; 233 184 region.rop = ROP_COPY; 234 185 235 186 if (rw && !bottom_only) { 236 - region.dx = 0; 237 - region.dy = info->var.yoffset + rs; 238 - region.height = rw; 239 - region.width = info->var.xres_virtual; 187 + region.dy = 0; 188 + region.dx = info->var.xoffset; 189 + region.width = rw; 190 + region.height = info->var.yres_virtual; 240 191 info->fbops->fb_fillrect(info, &region); 241 192 } 242 193 243 194 if (bh) { 244 - region.dx = info->var.xoffset; 245 195 region.dy = info->var.yoffset; 246 - region.height = info->var.yres; 247 - region.width = bh; 196 + region.dx = info->var.xoffset; 197 + region.height = bh; 198 + region.width = info->var.xres; 248 199 info->fbops->fb_fillrect(info, &region); 249 200 } 250 201 } 251 202 252 - static void cw_cursor(struct vc_data *vc, struct fb_info *info, int mode, 203 + static void ud_cursor(struct vc_data *vc, struct fb_info *info, int mode, 253 204 int softback_lines, int fg, int bg) 254 205 { 255 206 struct fb_cursor cursor; 256 207 struct fbcon_ops *ops = info->fbcon_par; 257 208 unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff; 258 - int w = (vc->vc_font.height + 7) >> 3, c; 209 + int w = (vc->vc_font.width + 7) >> 3, c; 259 210 int y = real_y(ops->p, vc->vc_y); 260 211 int attribute, use_sw = (vc->vc_cursor_type & 0x10); 261 212 int err = 1, dx, dy; 262 213 char *src; 214 + u32 vyres = GETVYRES(ops->p->scrollmode, info); 263 215 u32 vxres = GETVXRES(ops->p->scrollmode, info); 264 216 265 217 if (!ops->fontbuffer) ··· 278 230 279 231 c = scr_readw((u16 *) vc->vc_pos); 280 232 attribute = get_attribute(info, c); 281 - src = ops->fontbuffer + ((c & charmask) * (w * vc->vc_font.width)); 233 + src = ops->fontbuffer + ((c & charmask) * (w * vc->vc_font.height)); 282 234 283 235 if (ops->cursor_state.image.data != src || 284 236 ops->cursor_reset) { ··· 289 241 if (attribute) { 290 242 u8 *dst; 291 243 292 - dst = kmalloc(w * vc->vc_font.width, GFP_ATOMIC); 244 + dst = kmalloc(w * vc->vc_font.height, GFP_ATOMIC); 293 245 if (!dst) 294 246 return; 295 247 kfree(ops->cursor_data); 296 248 ops->cursor_data = dst; 297 - cw_update_attr(dst, src, attribute, vc); 249 + ud_update_attr(dst, src, attribute, vc); 298 250 src = dst; 299 251 } 300 252 ··· 306 258 cursor.set |= FB_CUR_SETCMAP; 307 259 } 308 260 309 - if (ops->cursor_state.image.height != vc->vc_font.width || 310 - ops->cursor_state.image.width != vc->vc_font.height || 261 + if (ops->cursor_state.image.height != vc->vc_font.height || 262 + ops->cursor_state.image.width != vc->vc_font.width || 311 263 ops->cursor_reset) { 312 - ops->cursor_state.image.height = vc->vc_font.width; 313 - ops->cursor_state.image.width = vc->vc_font.height; 264 + ops->cursor_state.image.height = vc->vc_font.height; 265 + ops->cursor_state.image.width = vc->vc_font.width; 314 266 cursor.set |= FB_CUR_SETSIZE; 315 267 } 316 268 317 - dx = vxres - ((y * vc->vc_font.height) + vc->vc_font.height); 318 - dy = vc->vc_x * vc->vc_font.width; 269 + dy = vyres - ((y * vc->vc_font.height) + vc->vc_font.height); 270 + dx = vxres - ((vc->vc_x * vc->vc_font.width) + vc->vc_font.width); 319 271 320 272 if (ops->cursor_state.image.dx != dx || 321 273 ops->cursor_state.image.dy != dy || ··· 335 287 vc->vc_cursor_type != ops->p->cursor_shape || 336 288 ops->cursor_state.mask == NULL || 337 289 ops->cursor_reset) { 338 - char *tmp, *mask = kmalloc(w*vc->vc_font.width, GFP_ATOMIC); 290 + char *mask = kmalloc(w*vc->vc_font.height, GFP_ATOMIC); 339 291 int cur_height, size, i = 0; 340 - int width = (vc->vc_font.width + 7)/8; 292 + u8 msk = 0xff; 341 293 342 294 if (!mask) 343 295 return; 344 - 345 - tmp = kmalloc(width * vc->vc_font.height, GFP_ATOMIC); 346 - 347 - if (!tmp) { 348 - kfree(mask); 349 - return; 350 - } 351 296 352 297 kfree(ops->cursor_state.mask); 353 298 ops->cursor_state.mask = mask; ··· 370 329 break; 371 330 } 372 331 373 - size = (vc->vc_font.height - cur_height) * width; 332 + size = cur_height * w; 333 + 374 334 while (size--) 375 - tmp[i++] = 0; 376 - size = cur_height * width; 335 + mask[i++] = msk; 336 + 337 + size = (vc->vc_font.height - cur_height) * w; 338 + 377 339 while (size--) 378 - tmp[i++] = 0xff; 379 - memset(mask, 0, w * vc->vc_font.width); 380 - rotate_cw(tmp, mask, vc->vc_font.width, vc->vc_font.height); 381 - kfree(tmp); 340 + mask[i++] = ~msk; 382 341 } 383 342 384 343 switch (mode) { ··· 415 374 ops->cursor_reset = 0; 416 375 } 417 376 418 - static int cw_update_start(struct fb_info *info) 377 + static int ud_update_start(struct fb_info *info) 419 378 { 420 379 struct fbcon_ops *ops = info->fbcon_par; 380 + int xoffset, yoffset; 381 + u32 vyres = GETVYRES(ops->p->scrollmode, info); 421 382 u32 vxres = GETVXRES(ops->p->scrollmode, info); 422 - u32 xoffset; 423 383 int err; 424 384 425 - xoffset = vxres - (info->var.xres + ops->var.yoffset); 426 - ops->var.yoffset = ops->var.xoffset; 385 + xoffset = vxres - info->var.xres - ops->var.xoffset; 386 + yoffset = vyres - info->var.yres - ops->var.yoffset; 387 + if (yoffset < 0) 388 + yoffset += vyres; 427 389 ops->var.xoffset = xoffset; 390 + ops->var.yoffset = yoffset; 428 391 err = fb_pan_display(info, &ops->var); 429 392 ops->var.xoffset = info->var.xoffset; 430 393 ops->var.yoffset = info->var.yoffset; ··· 436 391 return err; 437 392 } 438 393 439 - void fbcon_rotate_cw(struct fbcon_ops *ops) 394 + void fbcon_rotate_ud(struct fbcon_ops *ops) 440 395 { 441 - ops->bmove = cw_bmove; 442 - ops->clear = cw_clear; 443 - ops->putcs = cw_putcs; 444 - ops->clear_margins = cw_clear_margins; 445 - ops->cursor = cw_cursor; 446 - ops->update_start = cw_update_start; 396 + ops->bmove = ud_bmove; 397 + ops->clear = ud_clear; 398 + ops->putcs = ud_putcs; 399 + ops->clear_margins = ud_clear_margins; 400 + ops->cursor = ud_cursor; 401 + ops->update_start = ud_update_start; 447 402 } 448 - EXPORT_SYMBOL(fbcon_rotate_cw); 449 - 450 - MODULE_AUTHOR("Antonino Daplas <adaplas@pol.net>"); 451 - MODULE_DESCRIPTION("Console Rotation (90 degrees) Support"); 452 - MODULE_LICENSE("GPL"); 403 + EXPORT_SYMBOL(fbcon_rotate_ud);
-4
drivers/video/console/fbcon_rotate.c drivers/video/fbdev/core/fbcon_rotate.c
··· 110 110 } 111 111 } 112 112 EXPORT_SYMBOL(fbcon_set_rotate); 113 - 114 - MODULE_AUTHOR("Antonino Daplas <adaplas@pol.net>"); 115 - MODULE_DESCRIPTION("Console Rotation Support"); 116 - MODULE_LICENSE("GPL");
drivers/video/console/fbcon_rotate.h drivers/video/fbdev/core/fbcon_rotate.h
+101 -150
drivers/video/console/fbcon_ud.c drivers/video/fbdev/core/fbcon_cw.c
··· 1 1 /* 2 - * linux/drivers/video/console/fbcon_ud.c -- Software Rotation - 180 degrees 2 + * linux/drivers/video/console/fbcon_ud.c -- Software Rotation - 90 degrees 3 3 * 4 4 * Copyright (C) 2005 Antonino Daplas <adaplas @pol.net> 5 5 * ··· 19 19 #include "fbcon_rotate.h" 20 20 21 21 /* 22 - * Rotation 180 degrees 22 + * Rotation 90 degrees 23 23 */ 24 24 25 - static void ud_update_attr(u8 *dst, u8 *src, int attribute, 25 + static void cw_update_attr(u8 *dst, u8 *src, int attribute, 26 26 struct vc_data *vc) 27 27 { 28 - int i, offset = (vc->vc_font.height < 10) ? 1 : 2; 29 - int width = (vc->vc_font.width + 7) >> 3; 30 - unsigned int cellsize = vc->vc_font.height * width; 31 - u8 c; 28 + int i, j, offset = (vc->vc_font.height < 10) ? 1 : 2; 29 + int width = (vc->vc_font.height + 7) >> 3; 30 + u8 c, msk = ~(0xff >> offset); 32 31 33 - offset = offset * width; 34 - 35 - for (i = 0; i < cellsize; i++) { 36 - c = src[i]; 37 - if (attribute & FBCON_ATTRIBUTE_UNDERLINE && i < offset) 38 - c = 0xff; 39 - if (attribute & FBCON_ATTRIBUTE_BOLD) 40 - c |= c << 1; 41 - if (attribute & FBCON_ATTRIBUTE_REVERSE) 42 - c = ~c; 43 - dst[i] = c; 32 + for (i = 0; i < vc->vc_font.width; i++) { 33 + for (j = 0; j < width; j++) { 34 + c = *src; 35 + if (attribute & FBCON_ATTRIBUTE_UNDERLINE && !j) 36 + c |= msk; 37 + if (attribute & FBCON_ATTRIBUTE_BOLD && i) 38 + c |= *(src-width); 39 + if (attribute & FBCON_ATTRIBUTE_REVERSE) 40 + c = ~c; 41 + src++; 42 + *dst++ = c; 43 + } 44 44 } 45 45 } 46 46 47 47 48 - static void ud_bmove(struct vc_data *vc, struct fb_info *info, int sy, 48 + static void cw_bmove(struct vc_data *vc, struct fb_info *info, int sy, 49 49 int sx, int dy, int dx, int height, int width) 50 50 { 51 51 struct fbcon_ops *ops = info->fbcon_par; 52 52 struct fb_copyarea area; 53 - u32 vyres = GETVYRES(ops->p->scrollmode, info); 54 53 u32 vxres = GETVXRES(ops->p->scrollmode, info); 55 54 56 - area.sy = vyres - ((sy + height) * vc->vc_font.height); 57 - area.sx = vxres - ((sx + width) * vc->vc_font.width); 58 - area.dy = vyres - ((dy + height) * vc->vc_font.height); 59 - area.dx = vxres - ((dx + width) * vc->vc_font.width); 60 - area.height = height * vc->vc_font.height; 61 - area.width = width * vc->vc_font.width; 55 + area.sx = vxres - ((sy + height) * vc->vc_font.height); 56 + area.sy = sx * vc->vc_font.width; 57 + area.dx = vxres - ((dy + height) * vc->vc_font.height); 58 + area.dy = dx * vc->vc_font.width; 59 + area.width = height * vc->vc_font.height; 60 + area.height = width * vc->vc_font.width; 62 61 63 62 info->fbops->fb_copyarea(info, &area); 64 63 } 65 64 66 - static void ud_clear(struct vc_data *vc, struct fb_info *info, int sy, 65 + static void cw_clear(struct vc_data *vc, struct fb_info *info, int sy, 67 66 int sx, int height, int width) 68 67 { 69 68 struct fbcon_ops *ops = info->fbcon_par; 70 69 struct fb_fillrect region; 71 70 int bgshift = (vc->vc_hi_font_mask) ? 13 : 12; 72 - u32 vyres = GETVYRES(ops->p->scrollmode, info); 73 71 u32 vxres = GETVXRES(ops->p->scrollmode, info); 74 72 75 73 region.color = attr_bgcol_ec(bgshift,vc,info); 76 - region.dy = vyres - ((sy + height) * vc->vc_font.height); 77 - region.dx = vxres - ((sx + width) * vc->vc_font.width); 78 - region.width = width * vc->vc_font.width; 79 - region.height = height * vc->vc_font.height; 74 + region.dx = vxres - ((sy + height) * vc->vc_font.height); 75 + region.dy = sx * vc->vc_font.width; 76 + region.height = width * vc->vc_font.width; 77 + region.width = height * vc->vc_font.height; 80 78 region.rop = ROP_COPY; 81 79 82 80 info->fbops->fb_fillrect(info, &region); 83 81 } 84 82 85 - static inline void ud_putcs_aligned(struct vc_data *vc, struct fb_info *info, 83 + static inline void cw_putcs_aligned(struct vc_data *vc, struct fb_info *info, 86 84 const u16 *s, u32 attr, u32 cnt, 87 85 u32 d_pitch, u32 s_pitch, u32 cellsize, 88 86 struct fb_image *image, u8 *buf, u8 *dst) 89 87 { 90 88 struct fbcon_ops *ops = info->fbcon_par; 91 89 u16 charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff; 92 - u32 idx = vc->vc_font.width >> 3; 90 + u32 idx = (vc->vc_font.height + 7) >> 3; 93 91 u8 *src; 94 92 95 93 while (cnt--) { 96 - src = ops->fontbuffer + (scr_readw(s--) & charmask)*cellsize; 94 + src = ops->fontbuffer + (scr_readw(s++) & charmask)*cellsize; 97 95 98 96 if (attr) { 99 - ud_update_attr(buf, src, attr, vc); 97 + cw_update_attr(buf, src, attr, vc); 100 98 src = buf; 101 99 } 102 100 103 101 if (likely(idx == 1)) 104 102 __fb_pad_aligned_buffer(dst, d_pitch, src, idx, 105 - image->height); 103 + vc->vc_font.width); 106 104 else 107 105 fb_pad_aligned_buffer(dst, d_pitch, src, idx, 108 - image->height); 106 + vc->vc_font.width); 109 107 110 - dst += s_pitch; 108 + dst += d_pitch * vc->vc_font.width; 111 109 } 112 110 113 111 info->fbops->fb_imageblit(info, image); 114 112 } 115 113 116 - static inline void ud_putcs_unaligned(struct vc_data *vc, 117 - struct fb_info *info, const u16 *s, 118 - u32 attr, u32 cnt, u32 d_pitch, 119 - u32 s_pitch, u32 cellsize, 120 - struct fb_image *image, u8 *buf, 121 - u8 *dst) 122 - { 123 - struct fbcon_ops *ops = info->fbcon_par; 124 - u16 charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff; 125 - u32 shift_low = 0, mod = vc->vc_font.width % 8; 126 - u32 shift_high = 8; 127 - u32 idx = vc->vc_font.width >> 3; 128 - u8 *src; 129 - 130 - while (cnt--) { 131 - src = ops->fontbuffer + (scr_readw(s--) & charmask)*cellsize; 132 - 133 - if (attr) { 134 - ud_update_attr(buf, src, attr, vc); 135 - src = buf; 136 - } 137 - 138 - fb_pad_unaligned_buffer(dst, d_pitch, src, idx, 139 - image->height, shift_high, 140 - shift_low, mod); 141 - shift_low += mod; 142 - dst += (shift_low >= 8) ? s_pitch : s_pitch - 1; 143 - shift_low &= 7; 144 - shift_high = 8 - shift_low; 145 - } 146 - 147 - info->fbops->fb_imageblit(info, image); 148 - 149 - } 150 - 151 - static void ud_putcs(struct vc_data *vc, struct fb_info *info, 114 + static void cw_putcs(struct vc_data *vc, struct fb_info *info, 152 115 const unsigned short *s, int count, int yy, int xx, 153 116 int fg, int bg) 154 117 { 155 118 struct fb_image image; 156 119 struct fbcon_ops *ops = info->fbcon_par; 157 - u32 width = (vc->vc_font.width + 7)/8; 158 - u32 cellsize = width * vc->vc_font.height; 120 + u32 width = (vc->vc_font.height + 7)/8; 121 + u32 cellsize = width * vc->vc_font.width; 159 122 u32 maxcnt = info->pixmap.size/cellsize; 160 123 u32 scan_align = info->pixmap.scan_align - 1; 161 124 u32 buf_align = info->pixmap.buf_align - 1; 162 - u32 mod = vc->vc_font.width % 8, cnt, pitch, size; 125 + u32 cnt, pitch, size; 163 126 u32 attribute = get_attribute(info, scr_readw(s)); 164 127 u8 *dst, *buf = NULL; 165 - u32 vyres = GETVYRES(ops->p->scrollmode, info); 166 128 u32 vxres = GETVXRES(ops->p->scrollmode, info); 167 129 168 130 if (!ops->fontbuffer) ··· 132 170 133 171 image.fg_color = fg; 134 172 image.bg_color = bg; 135 - image.dy = vyres - ((yy * vc->vc_font.height) + vc->vc_font.height); 136 - image.dx = vxres - ((xx + count) * vc->vc_font.width); 137 - image.height = vc->vc_font.height; 173 + image.dx = vxres - ((yy + 1) * vc->vc_font.height); 174 + image.dy = xx * vc->vc_font.width; 175 + image.width = vc->vc_font.height; 138 176 image.depth = 1; 139 177 140 178 if (attribute) { ··· 143 181 return; 144 182 } 145 183 146 - s += count - 1; 147 - 148 184 while (count) { 149 185 if (count > maxcnt) 150 186 cnt = maxcnt; 151 187 else 152 188 cnt = count; 153 189 154 - image.width = vc->vc_font.width * cnt; 190 + image.height = vc->vc_font.width * cnt; 155 191 pitch = ((image.width + 7) >> 3) + scan_align; 156 192 pitch &= ~scan_align; 157 193 size = pitch * image.height + buf_align; 158 194 size &= ~buf_align; 159 195 dst = fb_get_buffer_offset(info, &info->pixmap, size); 160 196 image.data = dst; 161 - 162 - if (!mod) 163 - ud_putcs_aligned(vc, info, s, attribute, cnt, pitch, 164 - width, cellsize, &image, buf, dst); 165 - else 166 - ud_putcs_unaligned(vc, info, s, attribute, cnt, pitch, 167 - width, cellsize, &image, 168 - buf, dst); 169 - 170 - image.dx += image.width; 197 + cw_putcs_aligned(vc, info, s, attribute, cnt, pitch, 198 + width, cellsize, &image, buf, dst); 199 + image.dy += image.height; 171 200 count -= cnt; 172 - s -= cnt; 173 - xx += cnt; 201 + s += cnt; 174 202 } 175 203 176 204 /* buf is always NULL except when in monochrome mode, so in this case ··· 171 219 172 220 } 173 221 174 - static void ud_clear_margins(struct vc_data *vc, struct fb_info *info, 175 - int bottom_only) 222 + static void cw_clear_margins(struct vc_data *vc, struct fb_info *info, 223 + int color, int bottom_only) 176 224 { 177 225 unsigned int cw = vc->vc_font.width; 178 226 unsigned int ch = vc->vc_font.height; 179 - unsigned int rw = info->var.xres - (vc->vc_cols*cw); 180 - unsigned int bh = info->var.yres - (vc->vc_rows*ch); 227 + unsigned int rw = info->var.yres - (vc->vc_cols*cw); 228 + unsigned int bh = info->var.xres - (vc->vc_rows*ch); 229 + unsigned int rs = info->var.yres - rw; 181 230 struct fb_fillrect region; 182 231 183 - region.color = 0; 232 + region.color = color; 184 233 region.rop = ROP_COPY; 185 234 186 235 if (rw && !bottom_only) { 187 - region.dy = 0; 188 - region.dx = info->var.xoffset; 189 - region.width = rw; 190 - region.height = info->var.yres_virtual; 236 + region.dx = 0; 237 + region.dy = info->var.yoffset + rs; 238 + region.height = rw; 239 + region.width = info->var.xres_virtual; 191 240 info->fbops->fb_fillrect(info, &region); 192 241 } 193 242 194 243 if (bh) { 195 - region.dy = info->var.yoffset; 196 244 region.dx = info->var.xoffset; 197 - region.height = bh; 198 - region.width = info->var.xres; 245 + region.dy = info->var.yoffset; 246 + region.height = info->var.yres; 247 + region.width = bh; 199 248 info->fbops->fb_fillrect(info, &region); 200 249 } 201 250 } 202 251 203 - static void ud_cursor(struct vc_data *vc, struct fb_info *info, int mode, 252 + static void cw_cursor(struct vc_data *vc, struct fb_info *info, int mode, 204 253 int softback_lines, int fg, int bg) 205 254 { 206 255 struct fb_cursor cursor; 207 256 struct fbcon_ops *ops = info->fbcon_par; 208 257 unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff; 209 - int w = (vc->vc_font.width + 7) >> 3, c; 258 + int w = (vc->vc_font.height + 7) >> 3, c; 210 259 int y = real_y(ops->p, vc->vc_y); 211 260 int attribute, use_sw = (vc->vc_cursor_type & 0x10); 212 261 int err = 1, dx, dy; 213 262 char *src; 214 - u32 vyres = GETVYRES(ops->p->scrollmode, info); 215 263 u32 vxres = GETVXRES(ops->p->scrollmode, info); 216 264 217 265 if (!ops->fontbuffer) ··· 230 278 231 279 c = scr_readw((u16 *) vc->vc_pos); 232 280 attribute = get_attribute(info, c); 233 - src = ops->fontbuffer + ((c & charmask) * (w * vc->vc_font.height)); 281 + src = ops->fontbuffer + ((c & charmask) * (w * vc->vc_font.width)); 234 282 235 283 if (ops->cursor_state.image.data != src || 236 284 ops->cursor_reset) { ··· 241 289 if (attribute) { 242 290 u8 *dst; 243 291 244 - dst = kmalloc(w * vc->vc_font.height, GFP_ATOMIC); 292 + dst = kmalloc(w * vc->vc_font.width, GFP_ATOMIC); 245 293 if (!dst) 246 294 return; 247 295 kfree(ops->cursor_data); 248 296 ops->cursor_data = dst; 249 - ud_update_attr(dst, src, attribute, vc); 297 + cw_update_attr(dst, src, attribute, vc); 250 298 src = dst; 251 299 } 252 300 ··· 258 306 cursor.set |= FB_CUR_SETCMAP; 259 307 } 260 308 261 - if (ops->cursor_state.image.height != vc->vc_font.height || 262 - ops->cursor_state.image.width != vc->vc_font.width || 309 + if (ops->cursor_state.image.height != vc->vc_font.width || 310 + ops->cursor_state.image.width != vc->vc_font.height || 263 311 ops->cursor_reset) { 264 - ops->cursor_state.image.height = vc->vc_font.height; 265 - ops->cursor_state.image.width = vc->vc_font.width; 312 + ops->cursor_state.image.height = vc->vc_font.width; 313 + ops->cursor_state.image.width = vc->vc_font.height; 266 314 cursor.set |= FB_CUR_SETSIZE; 267 315 } 268 316 269 - dy = vyres - ((y * vc->vc_font.height) + vc->vc_font.height); 270 - dx = vxres - ((vc->vc_x * vc->vc_font.width) + vc->vc_font.width); 317 + dx = vxres - ((y * vc->vc_font.height) + vc->vc_font.height); 318 + dy = vc->vc_x * vc->vc_font.width; 271 319 272 320 if (ops->cursor_state.image.dx != dx || 273 321 ops->cursor_state.image.dy != dy || ··· 287 335 vc->vc_cursor_type != ops->p->cursor_shape || 288 336 ops->cursor_state.mask == NULL || 289 337 ops->cursor_reset) { 290 - char *mask = kmalloc(w*vc->vc_font.height, GFP_ATOMIC); 338 + char *tmp, *mask = kmalloc(w*vc->vc_font.width, GFP_ATOMIC); 291 339 int cur_height, size, i = 0; 292 - u8 msk = 0xff; 340 + int width = (vc->vc_font.width + 7)/8; 293 341 294 342 if (!mask) 295 343 return; 344 + 345 + tmp = kmalloc(width * vc->vc_font.height, GFP_ATOMIC); 346 + 347 + if (!tmp) { 348 + kfree(mask); 349 + return; 350 + } 296 351 297 352 kfree(ops->cursor_state.mask); 298 353 ops->cursor_state.mask = mask; ··· 329 370 break; 330 371 } 331 372 332 - size = cur_height * w; 333 - 373 + size = (vc->vc_font.height - cur_height) * width; 334 374 while (size--) 335 - mask[i++] = msk; 336 - 337 - size = (vc->vc_font.height - cur_height) * w; 338 - 375 + tmp[i++] = 0; 376 + size = cur_height * width; 339 377 while (size--) 340 - mask[i++] = ~msk; 378 + tmp[i++] = 0xff; 379 + memset(mask, 0, w * vc->vc_font.width); 380 + rotate_cw(tmp, mask, vc->vc_font.width, vc->vc_font.height); 381 + kfree(tmp); 341 382 } 342 383 343 384 switch (mode) { ··· 374 415 ops->cursor_reset = 0; 375 416 } 376 417 377 - static int ud_update_start(struct fb_info *info) 418 + static int cw_update_start(struct fb_info *info) 378 419 { 379 420 struct fbcon_ops *ops = info->fbcon_par; 380 - int xoffset, yoffset; 381 - u32 vyres = GETVYRES(ops->p->scrollmode, info); 382 421 u32 vxres = GETVXRES(ops->p->scrollmode, info); 422 + u32 xoffset; 383 423 int err; 384 424 385 - xoffset = vxres - info->var.xres - ops->var.xoffset; 386 - yoffset = vyres - info->var.yres - ops->var.yoffset; 387 - if (yoffset < 0) 388 - yoffset += vyres; 425 + xoffset = vxres - (info->var.xres + ops->var.yoffset); 426 + ops->var.yoffset = ops->var.xoffset; 389 427 ops->var.xoffset = xoffset; 390 - ops->var.yoffset = yoffset; 391 428 err = fb_pan_display(info, &ops->var); 392 429 ops->var.xoffset = info->var.xoffset; 393 430 ops->var.yoffset = info->var.yoffset; ··· 391 436 return err; 392 437 } 393 438 394 - void fbcon_rotate_ud(struct fbcon_ops *ops) 439 + void fbcon_rotate_cw(struct fbcon_ops *ops) 395 440 { 396 - ops->bmove = ud_bmove; 397 - ops->clear = ud_clear; 398 - ops->putcs = ud_putcs; 399 - ops->clear_margins = ud_clear_margins; 400 - ops->cursor = ud_cursor; 401 - ops->update_start = ud_update_start; 441 + ops->bmove = cw_bmove; 442 + ops->clear = cw_clear; 443 + ops->putcs = cw_putcs; 444 + ops->clear_margins = cw_clear_margins; 445 + ops->cursor = cw_cursor; 446 + ops->update_start = cw_update_start; 402 447 } 403 - EXPORT_SYMBOL(fbcon_rotate_ud); 404 - 405 - MODULE_AUTHOR("Antonino Daplas <adaplas@pol.net>"); 406 - MODULE_DESCRIPTION("Console Rotation (180 degrees) Support"); 407 - MODULE_LICENSE("GPL"); 448 + EXPORT_SYMBOL(fbcon_rotate_cw);
-4
drivers/video/console/softcursor.c drivers/video/fbdev/core/softcursor.c
··· 76 76 } 77 77 78 78 EXPORT_SYMBOL(soft_cursor); 79 - 80 - MODULE_AUTHOR("James Simmons <jsimmons@users.sf.net>"); 81 - MODULE_DESCRIPTION("Generic software cursor"); 82 - MODULE_LICENSE("GPL");
+1 -6
drivers/video/console/tileblit.c drivers/video/fbdev/core/tileblit.c
··· 74 74 } 75 75 76 76 static void tile_clear_margins(struct vc_data *vc, struct fb_info *info, 77 - int bottom_only) 77 + int color, int bottom_only) 78 78 { 79 79 return; 80 80 } ··· 152 152 } 153 153 154 154 EXPORT_SYMBOL(fbcon_set_tileops); 155 - 156 - MODULE_AUTHOR("Antonino Daplas <adaplas@pol.net>"); 157 - MODULE_DESCRIPTION("Tile Blitting Operation"); 158 - MODULE_LICENSE("GPL"); 159 -
+2 -3
drivers/video/console/vgacon.c
··· 398 398 #endif 399 399 } 400 400 401 - /* boot_params.screen_info initialized? */ 402 - if ((screen_info.orig_video_mode == 0) && 403 - (screen_info.orig_video_lines == 0) && 401 + /* boot_params.screen_info reasonably initialized? */ 402 + if ((screen_info.orig_video_lines == 0) || 404 403 (screen_info.orig_video_cols == 0)) 405 404 goto no_vga; 406 405
+1 -1
drivers/video/fbdev/68328fb.c
··· 72 72 .vmode = FB_VMODE_NONINTERLACED, 73 73 }; 74 74 75 - static struct fb_fix_screeninfo mc68x328fb_fix __initdata = { 75 + static const struct fb_fix_screeninfo mc68x328fb_fix __initconst = { 76 76 .id = "68328fb", 77 77 .type = FB_TYPE_PACKED_PIXELS, 78 78 .xpanstep = 1,
+1 -1
drivers/video/fbdev/Kconfig
··· 2173 2173 2174 2174 config FB_XILINX 2175 2175 tristate "Xilinx frame buffer support" 2176 - depends on FB && (XILINX_VIRTEX || MICROBLAZE || ARCH_ZYNQ) 2176 + depends on FB && (XILINX_VIRTEX || MICROBLAZE || ARCH_ZYNQ || ARCH_ZYNQMP) 2177 2177 select FB_CFB_FILLRECT 2178 2178 select FB_CFB_COPYAREA 2179 2179 select FB_CFB_IMAGEBLIT
+1 -1
drivers/video/fbdev/amba-clcd.c
··· 1035 1035 .init_panel = nomadik_clcd_init_panel, 1036 1036 }; 1037 1037 1038 - static struct amba_id clcdfb_id_table[] = { 1038 + static const struct amba_id clcdfb_id_table[] = { 1039 1039 { 1040 1040 .id = 0x00041110, 1041 1041 .mask = 0x000ffffe,
+1 -1
drivers/video/fbdev/arkfb.c
··· 1157 1157 1158 1158 /* List of boards that we are trying to support */ 1159 1159 1160 - static struct pci_device_id ark_devices[] = { 1160 + static const struct pci_device_id ark_devices[] = { 1161 1161 {PCI_DEVICE(0xEDD8, 0xA099)}, 1162 1162 {0, 0, 0, 0, 0, 0, 0} 1163 1163 };
+1 -1
drivers/video/fbdev/asiliantfb.c
··· 592 592 framebuffer_release(p); 593 593 } 594 594 595 - static struct pci_device_id asiliantfb_pci_tbl[] = { 595 + static const struct pci_device_id asiliantfb_pci_tbl[] = { 596 596 { PCI_VENDOR_ID_CT, PCI_DEVICE_ID_CT_69000, PCI_ANY_ID, PCI_ANY_ID }, 597 597 { 0 } 598 598 };
+1 -1
drivers/video/fbdev/atmel_lcdfb.c
··· 320 320 } 321 321 } 322 322 323 - static struct fb_fix_screeninfo atmel_lcdfb_fix __initdata = { 323 + static const struct fb_fix_screeninfo atmel_lcdfb_fix __initconst = { 324 324 .type = FB_TYPE_PACKED_PIXELS, 325 325 .visual = FB_VISUAL_TRUECOLOR, 326 326 .xpanstep = 0,
+2 -2
drivers/video/fbdev/aty/aty128fb.c
··· 116 116 117 117 /* default modedb mode */ 118 118 /* 640x480, 60 Hz, Non-Interlaced (25.172 MHz dotclock) */ 119 - static struct fb_videomode defaultmode = { 119 + static const struct fb_videomode defaultmode = { 120 120 .refresh = 60, 121 121 .xres = 640, 122 122 .yres = 480, ··· 166 166 static int aty128_do_resume(struct pci_dev *pdev); 167 167 168 168 /* supported Rage128 chipsets */ 169 - static struct pci_device_id aty128_pci_tbl[] = { 169 + static const struct pci_device_id aty128_pci_tbl[] = { 170 170 { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_LE, 171 171 PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_M3_pci }, 172 172 { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_LF,
+3 -3
drivers/video/fbdev/aty/atyfb_base.c
··· 274 274 0, FB_VMODE_NONINTERLACED 275 275 }; 276 276 277 - static struct fb_videomode defmode = { 277 + static const struct fb_videomode defmode = { 278 278 /* 640x480 @ 60 Hz, 31.5 kHz hsync */ 279 279 NULL, 60, 640, 480, 39721, 40, 24, 32, 11, 96, 2, 280 280 0, FB_VMODE_NONINTERLACED ··· 1855 1855 #if defined(DEBUG) && defined(CONFIG_FB_ATY_CT) 1856 1856 case ATYIO_CLKR: 1857 1857 if (M64_HAS(INTEGRATED)) { 1858 - struct atyclk clk; 1858 + struct atyclk clk = { 0 }; 1859 1859 union aty_pll *pll = &par->pll; 1860 1860 u32 dsp_config = pll->ct.dsp_config; 1861 1861 u32 dsp_on_off = pll->ct.dsp_on_off; ··· 3756 3756 atyfb_remove(info); 3757 3757 } 3758 3758 3759 - static struct pci_device_id atyfb_pci_tbl[] = { 3759 + static const struct pci_device_id atyfb_pci_tbl[] = { 3760 3760 #ifdef CONFIG_FB_ATY_GX 3761 3761 { PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_CHIP_MACH64GX) }, 3762 3762 { PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_CHIP_MACH64CX) },
+3 -3
drivers/video/fbdev/aty/radeon_base.c
··· 96 96 #define CHIP_DEF(id, family, flags) \ 97 97 { PCI_VENDOR_ID_ATI, id, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (flags) | (CHIP_FAMILY_##family) } 98 98 99 - static struct pci_device_id radeonfb_pci_table[] = { 99 + static const struct pci_device_id radeonfb_pci_table[] = { 100 100 /* Radeon Xpress 200m */ 101 101 CHIP_DEF(PCI_CHIP_RS480_5955, RS480, CHIP_HAS_CRTC2 | CHIP_IS_IGP | CHIP_IS_MOBILITY), 102 102 CHIP_DEF(PCI_CHIP_RS482_5975, RS480, CHIP_HAS_CRTC2 | CHIP_IS_IGP | CHIP_IS_MOBILITY), ··· 2241 2241 return radeon_show_one_edid(buf, off, count, rinfo->mon2_EDID); 2242 2242 } 2243 2243 2244 - static struct bin_attribute edid1_attr = { 2244 + static const struct bin_attribute edid1_attr = { 2245 2245 .attr = { 2246 2246 .name = "edid1", 2247 2247 .mode = 0444, ··· 2250 2250 .read = radeon_show_edid1, 2251 2251 }; 2252 2252 2253 - static struct bin_attribute edid2_attr = { 2253 + static const struct bin_attribute edid2_attr = { 2254 2254 .attr = { 2255 2255 .name = "edid2", 2256 2256 .mode = 0444,
+1 -1
drivers/video/fbdev/bfin-lq035q1-fb.c
··· 841 841 return 0; 842 842 } 843 843 844 - static struct dev_pm_ops bfin_lq035q1_dev_pm_ops = { 844 + static const struct dev_pm_ops bfin_lq035q1_dev_pm_ops = { 845 845 .suspend = bfin_lq035q1_suspend, 846 846 .resume = bfin_lq035q1_resume, 847 847 };
+2 -2
drivers/video/fbdev/bw2.c
··· 333 333 334 334 dev_set_drvdata(&op->dev, info); 335 335 336 - printk(KERN_INFO "%s: bwtwo at %lx:%lx\n", 337 - dp->full_name, par->which_io, info->fix.smem_start); 336 + printk(KERN_INFO "%pOF: bwtwo at %lx:%lx\n", 337 + dp, par->which_io, info->fix.smem_start); 338 338 339 339 return 0; 340 340
+2 -2
drivers/video/fbdev/cg14.c
··· 553 553 554 554 dev_set_drvdata(&op->dev, info); 555 555 556 - printk(KERN_INFO "%s: cgfourteen at %lx:%lx, %dMB\n", 557 - dp->full_name, 556 + printk(KERN_INFO "%pOF: cgfourteen at %lx:%lx, %dMB\n", 557 + dp, 558 558 par->iospace, info->fix.smem_start, 559 559 par->ramsize >> 20); 560 560
+2 -2
drivers/video/fbdev/cg3.c
··· 412 412 413 413 dev_set_drvdata(&op->dev, info); 414 414 415 - printk(KERN_INFO "%s: cg3 at %lx:%lx\n", 416 - dp->full_name, par->which_io, info->fix.smem_start); 415 + printk(KERN_INFO "%pOF: cg3 at %lx:%lx\n", 416 + dp, par->which_io, info->fix.smem_start); 417 417 418 418 return 0; 419 419
+2 -2
drivers/video/fbdev/cg6.c
··· 810 810 811 811 dev_set_drvdata(&op->dev, info); 812 812 813 - printk(KERN_INFO "%s: CGsix [%s] at %lx:%lx\n", 814 - dp->full_name, info->fix.id, 813 + printk(KERN_INFO "%pOF: CGsix [%s] at %lx:%lx\n", 814 + dp, info->fix.id, 815 815 par->which_io, info->fix.smem_start); 816 816 817 817 return 0;
+2 -2
drivers/video/fbdev/chipsfb.c
··· 292 292 write_fr(chips_init_fr[i].addr, chips_init_fr[i].data); 293 293 } 294 294 295 - static struct fb_fix_screeninfo chipsfb_fix = { 295 + static const struct fb_fix_screeninfo chipsfb_fix = { 296 296 .id = "C&T 65550", 297 297 .type = FB_TYPE_PACKED_PIXELS, 298 298 .visual = FB_VISUAL_PSEUDOCOLOR, ··· 309 309 .smem_len = 0x100000, /* 1MB */ 310 310 }; 311 311 312 - static struct fb_var_screeninfo chipsfb_var = { 312 + static const struct fb_var_screeninfo chipsfb_var = { 313 313 .xres = 800, 314 314 .yres = 600, 315 315 .xres_virtual = 800,
+1 -1
drivers/video/fbdev/cobalt_lcdfb.c
··· 126 126 lcd_write_control(info, LCD_RESET); 127 127 } 128 128 129 - static struct fb_fix_screeninfo cobalt_lcdfb_fix = { 129 + static const struct fb_fix_screeninfo cobalt_lcdfb_fix = { 130 130 .id = "cobalt-lcd", 131 131 .type = FB_TYPE_TEXT, 132 132 .type_aux = FB_AUX_TEXT_MDA,
+14
drivers/video/fbdev/core/Makefile
··· 4 4 fb-y := fbmem.o fbmon.o fbcmap.o fbsysfs.o \ 5 5 modedb.o fbcvt.o 6 6 fb-$(CONFIG_FB_DEFERRED_IO) += fb_defio.o 7 + 8 + ifeq ($(CONFIG_FRAMEBUFFER_CONSOLE),y) 9 + fb-y += fbcon.o bitblit.o softcursor.o 10 + ifeq ($(CONFIG_FB_TILEBLITTING),y) 11 + fb-y += tileblit.o 12 + endif 13 + ifeq ($(CONFIG_FRAMEBUFFER_CONSOLE_ROTATION),y) 14 + fb-y += fbcon_rotate.o fbcon_cw.o fbcon_ud.o \ 15 + fbcon_ccw.o 16 + endif 17 + ifeq ($(CONFIG_DMI),y) 18 + fb-y += fbcon_dmi_quirks.o 19 + endif 20 + endif 7 21 fb-objs := $(fb-y) 8 22 9 23 obj-$(CONFIG_FB_CFB_FILLRECT) += cfbfillrect.o
+145
drivers/video/fbdev/core/fbcon_dmi_quirks.c
··· 1 + /* 2 + * fbcon_dmi_quirks.c -- DMI based quirk detection for fbcon 3 + * 4 + * Copyright (C) 2017 Hans de Goede <hdegoede@redhat.com> 5 + * 6 + * This file is subject to the terms and conditions of the GNU General Public 7 + * License. See the file COPYING in the main directory of this archive for 8 + * more details. 9 + */ 10 + 11 + #include <linux/dmi.h> 12 + #include <linux/fb.h> 13 + #include <linux/kernel.h> 14 + #include "fbcon.h" 15 + 16 + /* 17 + * Some x86 clamshell design devices use portrait tablet screens and a display 18 + * engine which cannot rotate in hardware, so we need to rotate the fbcon to 19 + * compensate. Unfortunately these (cheap) devices also typically have quite 20 + * generic DMI data, so we match on a combination of DMI data, screen resolution 21 + * and a list of known BIOS dates to avoid false positives. 22 + */ 23 + 24 + struct fbcon_dmi_rotate_data { 25 + int width; 26 + int height; 27 + const char * const *bios_dates; 28 + int rotate; 29 + }; 30 + 31 + static const struct fbcon_dmi_rotate_data rotate_data_asus_t100ha = { 32 + .width = 800, 33 + .height = 1280, 34 + .rotate = FB_ROTATE_CCW, 35 + }; 36 + 37 + static const struct fbcon_dmi_rotate_data rotate_data_gpd_pocket = { 38 + .width = 1200, 39 + .height = 1920, 40 + .bios_dates = (const char * const []){ "05/26/2017", "06/28/2017", 41 + "07/05/2017", "08/07/2017", NULL }, 42 + .rotate = FB_ROTATE_CW, 43 + }; 44 + 45 + static const struct fbcon_dmi_rotate_data rotate_data_gpd_win = { 46 + .width = 720, 47 + .height = 1280, 48 + .bios_dates = (const char * const []){ 49 + "10/25/2016", "11/18/2016", "12/23/2016", "12/26/2016", 50 + "02/21/2017", "03/20/2017", "05/25/2017", NULL }, 51 + .rotate = FB_ROTATE_CW, 52 + }; 53 + 54 + static const struct fbcon_dmi_rotate_data rotate_data_itworks_tw891 = { 55 + .width = 800, 56 + .height = 1280, 57 + .bios_dates = (const char * const []){ "10/16/2015", NULL }, 58 + .rotate = FB_ROTATE_CW, 59 + }; 60 + 61 + static const struct fbcon_dmi_rotate_data rotate_data_vios_lth17 = { 62 + .width = 800, 63 + .height = 1280, 64 + .rotate = FB_ROTATE_CW, 65 + }; 66 + 67 + static const struct dmi_system_id rotate_data[] = { 68 + { /* Asus T100HA */ 69 + .matches = { 70 + DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), 71 + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T100HAN"), 72 + }, 73 + .driver_data = (void *)&rotate_data_asus_t100ha, 74 + }, { /* 75 + * GPD Pocket, note that the the DMI data is less generic then 76 + * it seems, devices with a board-vendor of "AMI Corporation" 77 + * are quite rare, as are devices which have both board- *and* 78 + * product-id set to "Default String" 79 + */ 80 + .matches = { 81 + DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"), 82 + DMI_EXACT_MATCH(DMI_BOARD_NAME, "Default string"), 83 + DMI_EXACT_MATCH(DMI_BOARD_SERIAL, "Default string"), 84 + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Default string"), 85 + }, 86 + .driver_data = (void *)&rotate_data_gpd_pocket, 87 + }, { /* GPD Win (same note on DMI match as GPD Pocket) */ 88 + .matches = { 89 + DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"), 90 + DMI_EXACT_MATCH(DMI_BOARD_NAME, "Default string"), 91 + DMI_EXACT_MATCH(DMI_BOARD_SERIAL, "Default string"), 92 + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Default string"), 93 + }, 94 + .driver_data = (void *)&rotate_data_gpd_win, 95 + }, { /* I.T.Works TW891 */ 96 + .matches = { 97 + DMI_EXACT_MATCH(DMI_SYS_VENDOR, "To be filled by O.E.M."), 98 + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "TW891"), 99 + DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "To be filled by O.E.M."), 100 + DMI_EXACT_MATCH(DMI_BOARD_NAME, "TW891"), 101 + }, 102 + .driver_data = (void *)&rotate_data_itworks_tw891, 103 + }, { /* VIOS LTH17 */ 104 + .matches = { 105 + DMI_EXACT_MATCH(DMI_SYS_VENDOR, "VIOS"), 106 + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "LTH17"), 107 + DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "VIOS"), 108 + DMI_EXACT_MATCH(DMI_BOARD_NAME, "LTH17"), 109 + }, 110 + .driver_data = (void *)&rotate_data_vios_lth17, 111 + }, 112 + {} 113 + }; 114 + 115 + int fbcon_platform_get_rotate(struct fb_info *info) 116 + { 117 + const struct dmi_system_id *match; 118 + const struct fbcon_dmi_rotate_data *data; 119 + const char *bios_date; 120 + int i; 121 + 122 + for (match = dmi_first_match(rotate_data); 123 + match; 124 + match = dmi_first_match(match + 1)) { 125 + data = match->driver_data; 126 + 127 + if (data->width != info->var.xres || 128 + data->height != info->var.yres) 129 + continue; 130 + 131 + if (!data->bios_dates) 132 + return data->rotate; 133 + 134 + bios_date = dmi_get_system_info(DMI_BIOS_DATE); 135 + if (!bios_date) 136 + continue; 137 + 138 + for (i = 0; data->bios_dates[i]; i++) { 139 + if (!strcmp(data->bios_dates[i], bios_date)) 140 + return data->rotate; 141 + } 142 + } 143 + 144 + return FB_ROTATE_UR; 145 + }
+9 -3
drivers/video/fbdev/core/fbmem.c
··· 32 32 #include <linux/device.h> 33 33 #include <linux/efi.h> 34 34 #include <linux/fb.h> 35 + #include <linux/fbcon.h> 35 36 #include <linux/mem_encrypt.h> 36 37 37 38 #include <asm/fb.h> ··· 317 316 for (i = 0; i < logo->height; i++) { 318 317 for (j = 0; j < logo->width; src++) { 319 318 d = *src ^ xor; 320 - for (k = 7; k >= 0; k--) { 319 + for (k = 7; k >= 0 && j < logo->width; k--) { 321 320 *dst++ = ((d >> k) & 1) ? fg : 0; 322 321 j++; 323 322 } ··· 464 463 465 464 /* Return if the frame buffer is not mapped or suspended */ 466 465 if (logo == NULL || info->state != FBINFO_STATE_RUNNING || 467 - info->flags & FBINFO_MODULE) 466 + info->fbops->owner) 468 467 return 0; 469 468 470 469 image.depth = 8; ··· 602 601 memset(&fb_logo, 0, sizeof(struct logo_data)); 603 602 604 603 if (info->flags & FBINFO_MISC_TILEBLITTING || 605 - info->flags & FBINFO_MODULE) 604 + info->fbops->owner) 606 605 return 0; 607 606 608 607 if (info->fix.visual == FB_VISUAL_DIRECTCOLOR) { ··· 1893 1892 fb_class = NULL; 1894 1893 goto err_class; 1895 1894 } 1895 + 1896 + fb_console_init(); 1897 + 1896 1898 return 0; 1897 1899 1898 1900 err_class: ··· 1910 1906 static void __exit 1911 1907 fbmem_exit(void) 1912 1908 { 1909 + fb_console_exit(); 1910 + 1913 1911 remove_proc_entry("fb", NULL); 1914 1912 class_destroy(fb_class); 1915 1913 unregister_chrdev(FB_MAJOR, "fb");
+2 -2
drivers/video/fbdev/core/fbmon.c
··· 1479 1479 if (ret) 1480 1480 return ret; 1481 1481 1482 - pr_debug("%s: got %dx%d display mode from %s\n", 1483 - of_node_full_name(np), vm.hactive, vm.vactive, np->name); 1482 + pr_debug("%pOF: got %dx%d display mode from %s\n", 1483 + np, vm.hactive, vm.vactive, np->name); 1484 1484 dump_fb_videomode(fb); 1485 1485 1486 1486 return 0;
+1 -1
drivers/video/fbdev/cyber2000fb.c
··· 1336 1336 * These parameters give 1337 1337 * 640x480, hsync 31.5kHz, vsync 60Hz 1338 1338 */ 1339 - static struct fb_videomode cyber2000fb_default_mode = { 1339 + static const struct fb_videomode cyber2000fb_default_mode = { 1340 1340 .refresh = 60, 1341 1341 .xres = 640, 1342 1342 .yres = 480,
+1 -1
drivers/video/fbdev/da8xx-fb.c
··· 1341 1341 { 1342 1342 struct da8xx_lcdc_platform_data *fb_pdata = 1343 1343 dev_get_platdata(&device->dev); 1344 - static struct resource *lcdc_regs; 1344 + struct resource *lcdc_regs; 1345 1345 struct lcd_ctrl_config *lcd_cfg; 1346 1346 struct fb_videomode *lcdc_info; 1347 1347 struct fb_info *da8xx_fb_info;
+1 -1
drivers/video/fbdev/dnfb.c
··· 126 126 .vmode = FB_VMODE_NONINTERLACED, 127 127 }; 128 128 129 - static struct fb_fix_screeninfo dnfb_fix = { 129 + static const struct fb_fix_screeninfo dnfb_fix = { 130 130 .id = "Apollo Mono", 131 131 .smem_start = (FRAME_BUFFER_START + IO_BASE), 132 132 .smem_len = FRAME_BUFFER_LEN,
+1 -1
drivers/video/fbdev/fb-puv3.c
··· 69 69 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, 70 70 }; 71 71 72 - static struct fb_var_screeninfo unifb_default = { 72 + static const struct fb_var_screeninfo unifb_default = { 73 73 .xres = 640, 74 74 .yres = 480, 75 75 .xres_virtual = 640,
+2 -2
drivers/video/fbdev/ffb.c
··· 997 997 998 998 dev_set_drvdata(&op->dev, info); 999 999 1000 - printk(KERN_INFO "%s: %s at %016lx, type %d, " 1000 + printk(KERN_INFO "%pOF: %s at %016lx, type %d, " 1001 1001 "DAC pnum[%x] rev[%d] manuf_rev[%d]\n", 1002 - dp->full_name, 1002 + dp, 1003 1003 ((par->flags & FFB_FLAG_AFB) ? "AFB" : "FFB"), 1004 1004 par->physbase, par->board_type, 1005 1005 dac_pnum, dac_rev, dac_mrev);
+1 -1
drivers/video/fbdev/fm2fb.c
··· 213 213 214 214 static int fm2fb_probe(struct zorro_dev *z, const struct zorro_device_id *id); 215 215 216 - static struct zorro_device_id fm2fb_devices[] = { 216 + static const struct zorro_device_id fm2fb_devices[] = { 217 217 { ZORRO_PROD_BSC_FRAMEMASTER_II }, 218 218 { ZORRO_PROD_HELFRICH_RAINBOW_II }, 219 219 { 0 }
+1 -1
drivers/video/fbdev/geode/gxfb_core.c
··· 474 474 framebuffer_release(info); 475 475 } 476 476 477 - static struct pci_device_id gxfb_id_table[] = { 477 + static const struct pci_device_id gxfb_id_table[] = { 478 478 { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_GX_VIDEO) }, 479 479 { 0, } 480 480 };
+1 -1
drivers/video/fbdev/grvga.c
··· 70 70 } 71 71 }; 72 72 73 - static struct fb_fix_screeninfo grvga_fix = { 73 + static const struct fb_fix_screeninfo grvga_fix = { 74 74 .id = "AG SVGACTRL", 75 75 .type = FB_TYPE_PACKED_PIXELS, 76 76 .visual = FB_VISUAL_PSEUDOCOLOR,
+2 -2
drivers/video/fbdev/i810/i810_main.c
··· 107 107 "Intel(R) 815 (Internal Graphics with AGP) Framebuffer Device" 108 108 }; 109 109 110 - static struct pci_device_id i810fb_pci_tbl[] = { 110 + static const struct pci_device_id i810fb_pci_tbl[] = { 111 111 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82810_IG1, 112 112 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, 113 113 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82810_IG3, ··· 1542 1542 return 0; 1543 1543 } 1544 1544 1545 - static struct fb_ops i810fb_ops = { 1545 + static const struct fb_ops i810fb_ops = { 1546 1546 .owner = THIS_MODULE, 1547 1547 .fb_open = i810fb_open, 1548 1548 .fb_release = i810fb_release,
+1 -1
drivers/video/fbdev/imsttfb.c
··· 1318 1318 } 1319 1319 } 1320 1320 1321 - static struct pci_device_id imsttfb_pci_tbl[] = { 1321 + static const struct pci_device_id imsttfb_pci_tbl[] = { 1322 1322 { PCI_VENDOR_ID_IMS, PCI_DEVICE_ID_IMS_TT128, 1323 1323 PCI_ANY_ID, PCI_ANY_ID, 0, 0, IBM }, 1324 1324 { PCI_VENDOR_ID_IMS, PCI_DEVICE_ID_IMS_TT3D,
+1 -1
drivers/video/fbdev/intelfb/intelfbdrv.c
··· 173 173 #define INTELFB_CLASS_MASK 0 174 174 #endif 175 175 176 - static struct pci_device_id intelfb_pci_table[] = { 176 + static const struct pci_device_id intelfb_pci_table[] = { 177 177 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_830M, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_830M }, 178 178 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_845G, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_845G }, 179 179 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_85XGM, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_85XGM },
+1 -1
drivers/video/fbdev/kyro/fbdev.c
··· 633 633 return 0; 634 634 } 635 635 636 - static struct pci_device_id kyrofb_pci_tbl[] = { 636 + static const struct pci_device_id kyrofb_pci_tbl[] = { 637 637 { PCI_VENDOR_ID_ST, PCI_DEVICE_ID_STG4000, 638 638 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, 639 639 { 0, }
+2 -2
drivers/video/fbdev/leo.c
··· 619 619 620 620 dev_set_drvdata(&op->dev, info); 621 621 622 - printk(KERN_INFO "%s: leo at %lx:%lx\n", 623 - dp->full_name, 622 + printk(KERN_INFO "%pOF: leo at %lx:%lx\n", 623 + dp, 624 624 par->which_io, info->fix.smem_start); 625 625 626 626 return 0;
+6 -8
drivers/video/fbdev/matrox/matroxfb_base.c
··· 1198 1198 return 0; 1199 1199 } 1200 1200 1201 - static struct fb_ops matroxfb_ops = { 1201 + static const struct fb_ops matroxfb_ops = { 1202 1202 .owner = THIS_MODULE, 1203 1203 .fb_open = matroxfb_open, 1204 1204 .fb_release = matroxfb_release, ··· 1573 1573 NULL}}; 1574 1574 1575 1575 #ifndef MODULE 1576 - static struct fb_videomode defaultmode = { 1576 + static const struct fb_videomode defaultmode = { 1577 1577 /* 640x480 @ 60Hz, 31.5 kHz */ 1578 1578 NULL, 60, 640, 480, 39721, 40, 24, 32, 11, 96, 2, 1579 1579 0, FB_VMODE_NONINTERLACED 1580 1580 }; 1581 - #endif /* !MODULE */ 1582 1581 1583 1582 static int hotplug = 0; 1583 + #endif /* !MODULE */ 1584 1584 1585 1585 static void setDefaultOutputs(struct matrox_fb_info *minfo) 1586 1586 { ··· 1623 1623 unsigned int memsize; 1624 1624 int err; 1625 1625 1626 - static struct pci_device_id intel_82437[] = { 1626 + static const struct pci_device_id intel_82437[] = { 1627 1627 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82437) }, 1628 1628 { }, 1629 1629 }; ··· 1794 1794 minfo->fbops = matroxfb_ops; 1795 1795 minfo->fbcon.fbops = &minfo->fbops; 1796 1796 minfo->fbcon.pseudo_palette = minfo->cmap; 1797 - /* after __init time we are like module... no logo */ 1798 - minfo->fbcon.flags = hotplug ? FBINFO_FLAG_MODULE : FBINFO_FLAG_DEFAULT; 1799 - minfo->fbcon.flags |= FBINFO_PARTIAL_PAN_OK | /* Prefer panning for scroll under MC viewer/edit */ 1797 + minfo->fbcon.flags = FBINFO_PARTIAL_PAN_OK | /* Prefer panning for scroll under MC viewer/edit */ 1800 1798 FBINFO_HWACCEL_COPYAREA | /* We have hw-assisted bmove */ 1801 1799 FBINFO_HWACCEL_FILLRECT | /* And fillrect */ 1802 1800 FBINFO_HWACCEL_IMAGEBLIT | /* And imageblit */ ··· 2114 2116 matroxfb_remove(minfo, 1); 2115 2117 } 2116 2118 2117 - static struct pci_device_id matroxfb_devices[] = { 2119 + static const struct pci_device_id matroxfb_devices[] = { 2118 2120 #ifdef CONFIG_FB_MATROX_MILLENIUM 2119 2121 {PCI_VENDOR_ID_MATROX, PCI_DEVICE_ID_MATROX_MIL, 2120 2122 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+1 -1
drivers/video/fbdev/maxinefb.c
··· 39 39 40 40 static struct fb_info fb_info; 41 41 42 - static struct fb_var_screeninfo maxinefb_defined = { 42 + static const struct fb_var_screeninfo maxinefb_defined = { 43 43 .xres = 1024, 44 44 .yres = 768, 45 45 .xres_virtual = 1024,
+1 -1
drivers/video/fbdev/mb862xx/mb862xxfbdrv.c
··· 982 982 #define CHIP_ID(id) \ 983 983 { PCI_DEVICE(PCI_VENDOR_ID_FUJITSU_LIMITED, id) } 984 984 985 - static struct pci_device_id mb862xx_pci_tbl[] = { 985 + static const struct pci_device_id mb862xx_pci_tbl[] = { 986 986 /* MB86295/MB86296 */ 987 987 CHIP_ID(PCI_DEVICE_ID_FUJITSU_CORALP), 988 988 CHIP_ID(PCI_DEVICE_ID_FUJITSU_CORALPA),
+2 -2
drivers/video/fbdev/mbx/mbxfb.c
··· 79 79 80 80 }; 81 81 82 - static struct fb_var_screeninfo mbxfb_default = { 82 + static const struct fb_var_screeninfo mbxfb_default = { 83 83 .xres = 640, 84 84 .yres = 480, 85 85 .xres_virtual = 640, ··· 102 102 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, 103 103 }; 104 104 105 - static struct fb_fix_screeninfo mbxfb_fix = { 105 + static const struct fb_fix_screeninfo mbxfb_fix = { 106 106 .id = "MBX", 107 107 .type = FB_TYPE_PACKED_PIXELS, 108 108 .visual = FB_VISUAL_TRUECOLOR,
+1 -1
drivers/video/fbdev/neofb.c
··· 2138 2138 } 2139 2139 } 2140 2140 2141 - static struct pci_device_id neofb_devices[] = { 2141 + static const struct pci_device_id neofb_devices[] = { 2142 2142 {PCI_VENDOR_ID_NEOMAGIC, PCI_CHIP_NM2070, 2143 2143 PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_NEOMAGIC_NM2070}, 2144 2144
+1 -1
drivers/video/fbdev/nvidia/nvidia.c
··· 55 55 /* HW cursor parameters */ 56 56 #define MAX_CURS 32 57 57 58 - static struct pci_device_id nvidiafb_pci_tbl[] = { 58 + static const struct pci_device_id nvidiafb_pci_tbl[] = { 59 59 {PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 60 60 PCI_BASE_CLASS_DISPLAY << 16, 0xff0000, 0}, 61 61 { 0, }
+4 -6
drivers/video/fbdev/offb.c
··· 383 383 FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_STATIC_PSEUDOCOLOR; 384 384 } 385 385 386 - static void __init offb_init_fb(const char *name, const char *full_name, 386 + static void __init offb_init_fb(const char *name, 387 387 int width, int height, int depth, 388 388 int pitch, unsigned long address, 389 389 int foreign_endian, struct device_node *dp) ··· 402 402 "Using unsupported %dx%d %s at %lx, depth=%d, pitch=%d\n", 403 403 width, height, name, address, depth, pitch); 404 404 if (depth != 8 && depth != 15 && depth != 16 && depth != 32) { 405 - printk(KERN_ERR "%s: can't use depth = %d\n", full_name, 406 - depth); 405 + printk(KERN_ERR "%pOF: can't use depth = %d\n", dp, depth); 407 406 release_mem_region(res_start, res_size); 408 407 return; 409 408 } 410 409 411 410 info = framebuffer_alloc(sizeof(u32) * 16, NULL); 412 - 411 + 413 412 if (info == 0) { 414 413 release_mem_region(res_start, res_size); 415 414 return; ··· 514 515 if (register_framebuffer(info) < 0) 515 516 goto out_err; 516 517 517 - fb_info(info, "Open Firmware frame buffer device on %s\n", full_name); 518 + fb_info(info, "Open Firmware frame buffer device on %pOF\n", dp); 518 519 return; 519 520 520 521 out_err: ··· 643 644 if (strcmp(dp->name, "valkyrie") == 0) 644 645 address += 0x1000; 645 646 offb_init_fb(no_real_node ? "bootx" : dp->name, 646 - no_real_node ? "display" : dp->full_name, 647 647 width, height, depth, pitch, address, 648 648 foreign_endian, no_real_node ? NULL : dp); 649 649 }
+1 -1
drivers/video/fbdev/omap/lcd_mipid.c
··· 496 496 mipid_esd_stop_check(md); 497 497 } 498 498 499 - static struct lcd_panel mipid_panel = { 499 + static const struct lcd_panel mipid_panel = { 500 500 .config = OMAP_LCDC_PANEL_TFT, 501 501 502 502 .bpp = 16,
+1 -1
drivers/video/fbdev/omap2/omapfb/displays/panel-lgphilips-lb035q02.c
··· 18 18 19 19 #include <video/omapfb_dss.h> 20 20 21 - static struct omap_video_timings lb035q02_timings = { 21 + static const struct omap_video_timings lb035q02_timings = { 22 22 .x_res = 320, 23 23 .y_res = 240, 24 24
+1 -1
drivers/video/fbdev/omap2/omapfb/displays/panel-sony-acx565akm.c
··· 509 509 NULL, 510 510 }; 511 511 512 - static struct attribute_group bldev_attr_group = { 512 + static const struct attribute_group bldev_attr_group = { 513 513 .attrs = bldev_attrs, 514 514 }; 515 515
+1 -1
drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td028ttec1.c
··· 41 41 struct spi_device *spi_dev; 42 42 }; 43 43 44 - static struct omap_video_timings td028ttec1_panel_timings = { 44 + static const struct omap_video_timings td028ttec1_panel_timings = { 45 45 .x_res = 480, 46 46 .y_res = 640, 47 47 .pixelclock = 22153000,
+1 -1
drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c
··· 282 282 NULL, 283 283 }; 284 284 285 - static struct attribute_group tpo_td043_attr_group = { 285 + static const struct attribute_group tpo_td043_attr_group = { 286 286 .attrs = tpo_td043_attrs, 287 287 }; 288 288
+2 -1
drivers/video/fbdev/omap2/omapfb/dss/dss-of.c
··· 16 16 #include <linux/err.h> 17 17 #include <linux/module.h> 18 18 #include <linux/of.h> 19 + #include <linux/of_graph.h> 19 20 #include <linux/seq_file.h> 20 21 21 22 #include <video/omapfb_dss.h> ··· 129 128 { 130 129 struct device_node *np; 131 130 132 - np = of_parse_phandle(node, "remote-endpoint", 0); 131 + np = of_graph_get_remote_endpoint(node); 133 132 if (!np) 134 133 return NULL; 135 134
+2 -2
drivers/video/fbdev/p9100.c
··· 304 304 305 305 dev_set_drvdata(&op->dev, info); 306 306 307 - printk(KERN_INFO "%s: p9100 at %lx:%lx\n", 308 - dp->full_name, 307 + printk(KERN_INFO "%pOF: p9100 at %lx:%lx\n", 308 + dp, 309 309 par->which_io, info->fix.smem_start); 310 310 311 311 return 0;
+1 -1
drivers/video/fbdev/pm2fb.c
··· 1732 1732 framebuffer_release(info); 1733 1733 } 1734 1734 1735 - static struct pci_device_id pm2fb_id_table[] = { 1735 + static const struct pci_device_id pm2fb_id_table[] = { 1736 1736 { PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_TVP4020, 1737 1737 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, 1738 1738 { PCI_VENDOR_ID_3DLABS, PCI_DEVICE_ID_3DLABS_PERMEDIA2,
+1 -1
drivers/video/fbdev/pm3fb.c
··· 1479 1479 } 1480 1480 } 1481 1481 1482 - static struct pci_device_id pm3fb_id_table[] = { 1482 + static const struct pci_device_id pm3fb_id_table[] = { 1483 1483 { PCI_VENDOR_ID_3DLABS, 0x0a, 1484 1484 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, 1485 1485 { 0, }
+2 -2
drivers/video/fbdev/pmag-aa-fb.c
··· 67 67 struct bt431_regs __iomem *bt431; 68 68 }; 69 69 70 - static struct fb_var_screeninfo aafb_defined = { 70 + static const struct fb_var_screeninfo aafb_defined = { 71 71 .xres = 1280, 72 72 .yres = 1024, 73 73 .xres_virtual = 2048, ··· 90 90 .vmode = FB_VMODE_NONINTERLACED, 91 91 }; 92 92 93 - static struct fb_fix_screeninfo aafb_fix = { 93 + static const struct fb_fix_screeninfo aafb_fix = { 94 94 .id = "PMAG-AA", 95 95 .smem_len = (2048 * 1024), 96 96 .type = FB_TYPE_PACKED_PIXELS,
+2 -2
drivers/video/fbdev/pmag-ba-fb.c
··· 43 43 }; 44 44 45 45 46 - static struct fb_var_screeninfo pmagbafb_defined = { 46 + static const struct fb_var_screeninfo pmagbafb_defined = { 47 47 .xres = 1024, 48 48 .yres = 864, 49 49 .xres_virtual = 1024, ··· 67 67 .vmode = FB_VMODE_NONINTERLACED, 68 68 }; 69 69 70 - static struct fb_fix_screeninfo pmagbafb_fix = { 70 + static const struct fb_fix_screeninfo pmagbafb_fix = { 71 71 .id = "PMAG-BA", 72 72 .smem_len = (1024 * 1024), 73 73 .type = FB_TYPE_PACKED_PIXELS,
+2 -2
drivers/video/fbdev/pmagb-b-fb.c
··· 44 44 }; 45 45 46 46 47 - static struct fb_var_screeninfo pmagbbfb_defined = { 47 + static const struct fb_var_screeninfo pmagbbfb_defined = { 48 48 .bits_per_pixel = 8, 49 49 .red.length = 8, 50 50 .green.length = 8, ··· 57 57 .vmode = FB_VMODE_NONINTERLACED, 58 58 }; 59 59 60 - static struct fb_fix_screeninfo pmagbbfb_fix = { 60 + static const struct fb_fix_screeninfo pmagbbfb_fix = { 61 61 .id = "PMAGB-BA", 62 62 .smem_len = (2048 * 1024), 63 63 .type = FB_TYPE_PACKED_PIXELS,
+1 -1
drivers/video/fbdev/ps3fb.c
··· 952 952 .fb_compat_ioctl = ps3fb_ioctl 953 953 }; 954 954 955 - static struct fb_fix_screeninfo ps3fb_fix = { 955 + static const struct fb_fix_screeninfo ps3fb_fix = { 956 956 .id = DEVICE_NAME, 957 957 .type = FB_TYPE_PACKED_PIXELS, 958 958 .visual = FB_VISUAL_TRUECOLOR,
+2 -2
drivers/video/fbdev/pvr2fb.c
··· 154 154 .accel = FB_ACCEL_NONE, 155 155 }; 156 156 157 - static struct fb_var_screeninfo pvr2_var = { 157 + static const struct fb_var_screeninfo pvr2_var = { 158 158 .xres = 640, 159 159 .yres = 480, 160 160 .xres_virtual = 640, ··· 966 966 pci_release_regions(pdev); 967 967 } 968 968 969 - static struct pci_device_id pvr2fb_pci_tbl[] = { 969 + static const struct pci_device_id pvr2fb_pci_tbl[] = { 970 970 { PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_NEON250, 971 971 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, 972 972 { 0, },
+2 -2
drivers/video/fbdev/pxa3xx-gcu.c
··· 626 626 /* request the IRQ */ 627 627 irq = platform_get_irq(pdev, 0); 628 628 if (irq < 0) { 629 - dev_err(dev, "no IRQ defined\n"); 630 - return -ENODEV; 629 + dev_err(dev, "no IRQ defined: %d\n", irq); 630 + return irq; 631 631 } 632 632 633 633 ret = devm_request_irq(dev, irq, pxa3xx_gcu_handle_irq,
+1 -1
drivers/video/fbdev/q40fb.c
··· 36 36 .accel = FB_ACCEL_NONE, 37 37 }; 38 38 39 - static struct fb_var_screeninfo q40fb_var = { 39 + static const struct fb_var_screeninfo q40fb_var = { 40 40 .xres = 1024, 41 41 .yres = 512, 42 42 .xres_virtual = 1024,
+1 -1
drivers/video/fbdev/riva/fbdev.c
··· 101 101 * 102 102 * ------------------------------------------------------------------------- */ 103 103 104 - static struct pci_device_id rivafb_pci_tbl[] = { 104 + static const struct pci_device_id rivafb_pci_tbl[] = { 105 105 { PCI_VENDOR_ID_NVIDIA_SGS, PCI_DEVICE_ID_NVIDIA_SGS_RIVA128, 106 106 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, 107 107 { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_TNT,
+1 -1
drivers/video/fbdev/s3fb.c
··· 1483 1483 1484 1484 /* List of boards that we are trying to support */ 1485 1485 1486 - static struct pci_device_id s3_devices[] = { 1486 + static const struct pci_device_id s3_devices[] = { 1487 1487 {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8810), .driver_data = CHIP_XXX_TRIO}, 1488 1488 {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8811), .driver_data = CHIP_XXX_TRIO}, 1489 1489 {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8812), .driver_data = CHIP_M65_AURORA64VP},
+1 -1
drivers/video/fbdev/savage/savagefb_driver.c
··· 2429 2429 } 2430 2430 2431 2431 2432 - static struct pci_device_id savagefb_devices[] = { 2432 + static const struct pci_device_id savagefb_devices[] = { 2433 2433 {PCI_VENDOR_ID_S3, PCI_CHIP_SUPSAV_MX128, 2434 2434 PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SUPERSAVAGE}, 2435 2435
+3 -12
drivers/video/fbdev/sis/init301.c
··· 6848 6848 if(SiS_Pr->SiS_VGAHDE >= 1280) { 6849 6849 tempch = 20; 6850 6850 tempbx &= ~0x20; 6851 - } else if(SiS_Pr->SiS_VGAHDE >= 1024) { 6852 - tempch = 25; 6853 6851 } else { 6854 6852 tempch = 25; /* OK */ 6855 6853 } ··· 7962 7964 } 7963 7965 } 7964 7966 } else { /* ---- PAL ---- */ 7965 - /* We don't play around with FSCI in PAL mode */ 7966 - if(resindex == 0x04) { 7967 - SiS_SetCH70xxANDOR(SiS_Pr,0x20,0x00,0xEF); /* loop filter off */ 7968 - SiS_SetCH70xxANDOR(SiS_Pr,0x21,0x01,0xFE); /* ACIV on */ 7969 - } else { 7970 - SiS_SetCH70xxANDOR(SiS_Pr,0x20,0x00,0xEF); /* loop filter off */ 7971 - SiS_SetCH70xxANDOR(SiS_Pr,0x21,0x01,0xFE); /* ACIV on */ 7972 - } 7967 + /* We don't play around with FSCI in PAL mode */ 7968 + SiS_SetCH70xxANDOR(SiS_Pr, 0x20, 0x00, 0xEF); /* loop filter off */ 7969 + SiS_SetCH70xxANDOR(SiS_Pr, 0x21, 0x01, 0xFE); /* ACIV on */ 7973 7970 } 7974 7971 7975 7972 #endif /* 300 */ ··· 9650 9657 delay = 0x0a; 9651 9658 } else if(IS_SIS740) { 9652 9659 delay = 0x00; 9653 - } else if(SiS_Pr->ChipType < SIS_330) { 9654 - delay = 0x0c; 9655 9660 } else { 9656 9661 delay = 0x0c; 9657 9662 }
+2 -2
drivers/video/fbdev/skeletonfb.c
··· 84 84 * if we don't use modedb. If we do use modedb see xxxfb_init how to use it 85 85 * to get a fb_var_screeninfo. Otherwise define a default var as well. 86 86 */ 87 - static struct fb_fix_screeninfo xxxfb_fix = { 87 + static const struct fb_fix_screeninfo xxxfb_fix = { 88 88 .id = "FB's name", 89 89 .type = FB_TYPE_PACKED_PIXELS, 90 90 .visual = FB_VISUAL_PSEUDOCOLOR, ··· 866 866 #define xxxfb_resume NULL 867 867 #endif /* CONFIG_PM */ 868 868 869 - static struct pci_device_id xxxfb_id_table[] = { 869 + static const struct pci_device_id xxxfb_id_table[] = { 870 870 { PCI_VENDOR_ID_XXX, PCI_DEVICE_ID_XXX, 871 871 PCI_ANY_ID, PCI_ANY_ID, PCI_BASE_CLASS_DISPLAY << 16, 872 872 PCI_CLASS_MASK, 0 },
+1 -1
drivers/video/fbdev/sm501fb.c
··· 46 46 static char *fb_mode = "640x480-16@60"; 47 47 static unsigned long default_bpp = 16; 48 48 49 - static struct fb_videomode sm501_default_mode = { 49 + static const struct fb_videomode sm501_default_mode = { 50 50 .refresh = 60, 51 51 .xres = 640, 52 52 .yres = 480,
+9 -8
drivers/video/fbdev/sm712fb.c
··· 33 33 #include "sm712.h" 34 34 35 35 /* 36 - * Private structure 37 - */ 36 + * Private structure 37 + */ 38 38 struct smtcfb_info { 39 39 struct pci_dev *pdev; 40 40 struct fb_info *fb; ··· 785 785 smtc_scr_info.lfb_height = 0; 786 786 smtc_scr_info.lfb_depth = 0; 787 787 788 - pr_debug("sm7xx_vga_setup = %s\n", options); 788 + pr_debug("%s = %s\n", __func__, options); 789 789 790 790 for (i = 0; i < ARRAY_SIZE(vesa_mode_table); i++) { 791 791 if (strstr(options, vesa_mode_table[i].index)) { ··· 798 798 } 799 799 } 800 800 801 - static void sm712_setpalette(int regno, unsigned red, unsigned green, 802 - unsigned blue, struct fb_info *info) 801 + static void sm712_setpalette(int regno, unsigned int red, unsigned int green, 802 + unsigned int blue, struct fb_info *info) 803 803 { 804 804 /* set bit 5:4 = 01 (write LCD RAM only) */ 805 805 smtc_seqw(0x66, (smtc_seqr(0x66) & 0xC3) | 0x10); ··· 896 896 return 0; 897 897 } 898 898 899 - static int smtc_setcolreg(unsigned regno, unsigned red, unsigned green, 900 - unsigned blue, unsigned trans, struct fb_info *info) 899 + static int smtc_setcolreg(unsigned int regno, unsigned int red, 900 + unsigned int green, unsigned int blue, 901 + unsigned int trans, struct fb_info *info) 901 902 { 902 903 struct smtcfb_info *sfb; 903 904 u32 val; ··· 1478 1477 } 1479 1478 1480 1479 /* can support 32 bpp */ 1481 - if (15 == sfb->fb->var.bits_per_pixel) 1480 + if (sfb->fb->var.bits_per_pixel == 15) 1482 1481 sfb->fb->var.bits_per_pixel = 16; 1483 1482 1484 1483 sfb->fb->var.xres_virtual = sfb->fb->var.xres;
+1 -1
drivers/video/fbdev/smscufx.c
··· 122 122 FBINFO_VIRTFB | FBINFO_HWACCEL_IMAGEBLIT | FBINFO_HWACCEL_FILLRECT | 123 123 FBINFO_HWACCEL_COPYAREA | FBINFO_MISC_ALWAYS_SETPAR; 124 124 125 - static struct usb_device_id id_table[] = { 125 + static const struct usb_device_id id_table[] = { 126 126 {USB_DEVICE(0x0424, 0x9d00),}, 127 127 {USB_DEVICE(0x0424, 0x9d01),}, 128 128 {},
+5 -5
drivers/video/fbdev/sunxvr1000.c
··· 33 33 gp->depth = of_getintprop_default(gp->of_node, "depth", 32); 34 34 35 35 if (!gp->width || !gp->height) { 36 - printk(KERN_ERR "gfb: Critical properties missing for %s\n", 37 - gp->of_node->full_name); 36 + printk(KERN_ERR "gfb: Critical properties missing for %pOF\n", 37 + gp->of_node); 38 38 return -EINVAL; 39 39 } 40 40 ··· 151 151 if (err) 152 152 goto err_unmap_fb; 153 153 154 - printk("gfb: Found device at %s\n", dp->full_name); 154 + printk("gfb: Found device at %pOF\n", dp); 155 155 156 156 err = register_framebuffer(info); 157 157 if (err < 0) { 158 - printk(KERN_ERR "gfb: Could not register framebuffer %s\n", 159 - dp->full_name); 158 + printk(KERN_ERR "gfb: Could not register framebuffer %pOF\n", 159 + dp); 160 160 goto err_unmap_fb; 161 161 } 162 162
+1 -1
drivers/video/fbdev/sunxvr2500.c
··· 220 220 return err; 221 221 } 222 222 223 - static struct pci_device_id s3d_pci_table[] = { 223 + static const struct pci_device_id s3d_pci_table[] = { 224 224 { PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x002c), }, 225 225 { PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x002d), }, 226 226 { PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x002e), },
+1 -1
drivers/video/fbdev/sunxvr500.c
··· 393 393 return err; 394 394 } 395 395 396 - static struct pci_device_id e3d_pci_table[] = { 396 + static const struct pci_device_id e3d_pci_table[] = { 397 397 { PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x7a0), }, 398 398 { PCI_DEVICE(0x1091, 0x7a0), }, 399 399 { PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x7a2), },
+2 -2
drivers/video/fbdev/tcx.c
··· 467 467 468 468 dev_set_drvdata(&op->dev, info); 469 469 470 - printk(KERN_INFO "%s: TCX at %lx:%lx, %s\n", 471 - dp->full_name, 470 + printk(KERN_INFO "%pOF: TCX at %lx:%lx, %s\n", 471 + dp, 472 472 par->which_io, 473 473 info->fix.smem_start, 474 474 par->lowdepth ? "8-bit only" : "24-bit depth");
+1 -1
drivers/video/fbdev/tdfxfb.c
··· 120 120 static int tdfxfb_probe(struct pci_dev *pdev, const struct pci_device_id *id); 121 121 static void tdfxfb_remove(struct pci_dev *pdev); 122 122 123 - static struct pci_device_id tdfxfb_id_table[] = { 123 + static const struct pci_device_id tdfxfb_id_table[] = { 124 124 { PCI_VENDOR_ID_3DFX, PCI_DEVICE_ID_3DFX_BANSHEE, 125 125 PCI_ANY_ID, PCI_ANY_ID, PCI_BASE_CLASS_DISPLAY << 16, 126 126 0xff0000, 0 },
+1 -1
drivers/video/fbdev/tridentfb.c
··· 1737 1737 } 1738 1738 1739 1739 /* List of boards that we are trying to support */ 1740 - static struct pci_device_id trident_devices[] = { 1740 + static const struct pci_device_id trident_devices[] = { 1741 1741 {PCI_VENDOR_ID_TRIDENT, BLADE3D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 1742 1742 {PCI_VENDOR_ID_TRIDENT, CYBERBLADEi7, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 1743 1743 {PCI_VENDOR_ID_TRIDENT, CYBERBLADEi7D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+2 -3
drivers/video/fbdev/udlfb.c
··· 54 54 * which is compatible with all known USB 2.0 era graphics chips and firmware, 55 55 * but allows DisplayLink to increment those for any future incompatible chips 56 56 */ 57 - static struct usb_device_id id_table[] = { 57 + static const struct usb_device_id id_table[] = { 58 58 {.idVendor = 0x17e9, 59 59 .bInterfaceClass = 0xff, 60 60 .bInterfaceSubClass = 0x00, ··· 1465 1465 return count; 1466 1466 } 1467 1467 1468 - static struct bin_attribute edid_attr = { 1468 + static const struct bin_attribute edid_attr = { 1469 1469 .attr.name = "edid", 1470 1470 .attr.mode = 0666, 1471 1471 .size = EDID_LENGTH, ··· 1655 1655 error: 1656 1656 if (dev) { 1657 1657 1658 - kref_put(&dev->kref, dlfb_free); /* ref for framebuffer */ 1659 1658 kref_put(&dev->kref, dlfb_free); /* last ref from kref_init */ 1660 1659 1661 1660 /* dev has been deallocated. Do not dereference */
+1 -1
drivers/video/fbdev/uvesafb.c
··· 1666 1666 NULL, 1667 1667 }; 1668 1668 1669 - static struct attribute_group uvesafb_dev_attgrp = { 1669 + static const struct attribute_group uvesafb_dev_attgrp = { 1670 1670 .name = NULL, 1671 1671 .attrs = uvesafb_dev_attrs, 1672 1672 };
+2 -2
drivers/video/fbdev/vermilion/vermilion.c
··· 55 55 static struct fb_ops vmlfb_ops; 56 56 static struct vml_sys *subsys = NULL; 57 57 static char *vml_default_mode = "1024x768@60"; 58 - static struct fb_videomode defaultmode = { 58 + static const struct fb_videomode defaultmode = { 59 59 NULL, 60, 1024, 768, 12896, 144, 24, 29, 3, 136, 6, 60 60 0, FB_VMODE_NONINTERLACED 61 61 }; ··· 1044 1044 .fb_setcolreg = vmlfb_setcolreg 1045 1045 }; 1046 1046 1047 - static struct pci_device_id vml_ids[] = { 1047 + static const struct pci_device_id vml_ids[] = { 1048 1048 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, VML_DEVICE_VDC)}, 1049 1049 {0} 1050 1050 };
+1 -1
drivers/video/fbdev/via/via-core.c
··· 724 724 } 725 725 726 726 727 - static struct pci_device_id via_pci_table[] = { 727 + static const struct pci_device_id via_pci_table[] = { 728 728 { PCI_DEVICE(PCI_VENDOR_ID_VIA, UNICHROME_CLE266_DID), 729 729 .driver_data = UNICHROME_CLE266 }, 730 730 { PCI_DEVICE(PCI_VENDOR_ID_VIA, UNICHROME_K400_DID),
+2 -2
drivers/video/fbdev/vt8623fb.c
··· 81 81 static struct vga_regset vt8623_fetch_count_regs[] = {{0x1C, 0, 7}, {0x1D, 0, 1}, VGA_REGSET_END}; 82 82 static struct vga_regset vt8623_start_address_regs[] = {{0x0d, 0, 7}, {0x0c, 0, 7}, {0x34, 0, 7}, {0x48, 0, 1}, VGA_REGSET_END}; 83 83 84 - static struct svga_timing_regs vt8623_timing_regs = { 84 + static const struct svga_timing_regs vt8623_timing_regs = { 85 85 vt8623_h_total_regs, vt8623_h_display_regs, vt8623_h_blank_start_regs, 86 86 vt8623_h_blank_end_regs, vt8623_h_sync_start_regs, vt8623_h_sync_end_regs, 87 87 vt8623_v_total_regs, vt8623_v_display_regs, vt8623_v_blank_start_regs, ··· 888 888 889 889 /* List of boards that we are trying to support */ 890 890 891 - static struct pci_device_id vt8623_devices[] = { 891 + static const struct pci_device_id vt8623_devices[] = { 892 892 {PCI_DEVICE(PCI_VENDOR_ID_VIA, 0x3122)}, 893 893 {0, 0, 0, 0, 0, 0, 0} 894 894 };
+31 -31
drivers/video/fbdev/xilinxfb.c
··· 41 41 42 42 #define DRIVER_NAME "xilinxfb" 43 43 44 - 45 44 /* 46 45 * Xilinx calls it "TFT LCD Controller" though it can also be used for 47 46 * the VGA port on the Xilinx ML40x board. This is a hardware display ··· 91 92 u32 xvirt, yvirt; /* resolution of memory buffer */ 92 93 93 94 /* Physical address of framebuffer memory; If non-zero, driver 94 - * will use provided memory address instead of allocating one from 95 - * the consistent pool. */ 95 + * will use provided memory address instead of allocating one from 96 + * the consistent pool. 97 + */ 96 98 u32 fb_phys; 97 99 }; 98 100 99 101 /* 100 102 * Default xilinxfb configuration 101 103 */ 102 - static struct xilinxfb_platform_data xilinx_fb_default_pdata = { 104 + static const struct xilinxfb_platform_data xilinx_fb_default_pdata = { 103 105 .xres = 640, 104 106 .yres = 480, 105 107 .xvirt = 1024, ··· 110 110 /* 111 111 * Here are the default fb_fix_screeninfo and fb_var_screeninfo structures 112 112 */ 113 - static struct fb_fix_screeninfo xilinx_fb_fix = { 113 + static const struct fb_fix_screeninfo xilinx_fb_fix = { 114 114 .id = "Xilinx", 115 115 .type = FB_TYPE_PACKED_PIXELS, 116 116 .visual = FB_VISUAL_TRUECOLOR, 117 117 .accel = FB_ACCEL_NONE 118 118 }; 119 119 120 - static struct fb_var_screeninfo xilinx_fb_var = { 120 + static const struct fb_var_screeninfo xilinx_fb_var = { 121 121 .bits_per_pixel = BITS_PER_PIXEL, 122 122 123 123 .red = { RED_SHIFT, 8, 0 }, ··· 128 128 .activate = FB_ACTIVATE_NOW 129 129 }; 130 130 131 - 132 131 #define BUS_ACCESS_FLAG 0x1 /* 1 = BUS, 0 = DCR */ 133 132 #define LITTLE_ENDIAN_ACCESS 0x2 /* LITTLE ENDIAN IO functions */ 134 133 135 134 struct xilinxfb_drvdata { 136 - 137 135 struct fb_info info; /* FB driver info record */ 138 136 139 137 phys_addr_t regs_phys; /* phys. address of the control 140 - registers */ 138 + * registers 139 + */ 141 140 void __iomem *regs; /* virt. address of the control 142 - registers */ 141 + * registers 142 + */ 143 143 #ifdef CONFIG_PPC_DCR 144 144 dcr_host_t dcr_host; 145 145 unsigned int dcr_len; ··· 148 148 dma_addr_t fb_phys; /* phys. address of the frame buffer */ 149 149 int fb_alloced; /* Flag, was the fb memory alloced? */ 150 150 151 - u8 flags; /* features of the driver */ 151 + u8 flags; /* features of the driver */ 152 152 153 153 u32 reg_ctrl_default; 154 154 ··· 165 165 * which bus its connected and call the appropriate write API. 166 166 */ 167 167 static void xilinx_fb_out32(struct xilinxfb_drvdata *drvdata, u32 offset, 168 - u32 val) 168 + u32 val) 169 169 { 170 170 if (drvdata->flags & BUS_ACCESS_FLAG) { 171 171 if (drvdata->flags & LITTLE_ENDIAN_ACCESS) ··· 195 195 } 196 196 197 197 static int 198 - xilinx_fb_setcolreg(unsigned regno, unsigned red, unsigned green, unsigned blue, 199 - unsigned transp, struct fb_info *fbi) 198 + xilinx_fb_setcolreg(unsigned int regno, unsigned int red, unsigned int green, 199 + unsigned int blue, unsigned int transp, struct fb_info *fbi) 200 200 { 201 201 u32 *palette = fbi->pseudo_palette; 202 202 ··· 205 205 206 206 if (fbi->var.grayscale) { 207 207 /* Convert color to grayscale. 208 - * grayscale = 0.30*R + 0.59*G + 0.11*B */ 209 - red = green = blue = 210 - (red * 77 + green * 151 + blue * 28 + 127) >> 8; 208 + * grayscale = 0.30*R + 0.59*G + 0.11*B 209 + */ 210 + blue = (red * 77 + green * 151 + blue * 28 + 127) >> 8; 211 + green = blue; 212 + red = green; 211 213 } 212 214 213 215 /* fbi->fix.visual is always FB_VISUAL_TRUECOLOR */ ··· 243 241 xilinx_fb_out32(drvdata, REG_CTRL, 0); 244 242 default: 245 243 break; 246 - 247 244 } 248 245 return 0; /* success */ 249 246 } 250 247 251 - static struct fb_ops xilinxfb_ops = 252 - { 248 + static struct fb_ops xilinxfb_ops = { 253 249 .owner = THIS_MODULE, 254 250 .fb_setcolreg = xilinx_fb_setcolreg, 255 251 .fb_blank = xilinx_fb_blank, ··· 286 286 } else { 287 287 drvdata->fb_alloced = 1; 288 288 drvdata->fb_virt = dma_alloc_coherent(dev, PAGE_ALIGN(fbsize), 289 - &drvdata->fb_phys, GFP_KERNEL); 289 + &drvdata->fb_phys, 290 + GFP_KERNEL); 290 291 } 291 292 292 293 if (!drvdata->fb_virt) { ··· 301 300 /* Tell the hardware where the frame buffer is */ 302 301 xilinx_fb_out32(drvdata, REG_FB_ADDR, drvdata->fb_phys); 303 302 rc = xilinx_fb_in32(drvdata, REG_FB_ADDR); 304 - /* Endianess detection */ 303 + /* Endianness detection */ 305 304 if (rc != drvdata->fb_phys) { 306 305 drvdata->flags |= LITTLE_ENDIAN_ACCESS; 307 306 xilinx_fb_out32(drvdata, REG_FB_ADDR, drvdata->fb_phys); ··· 311 310 drvdata->reg_ctrl_default = REG_CTRL_ENABLE; 312 311 if (pdata->rotate_screen) 313 312 drvdata->reg_ctrl_default |= REG_CTRL_ROTATE; 314 - xilinx_fb_out32(drvdata, REG_CTRL, 315 - drvdata->reg_ctrl_default); 313 + xilinx_fb_out32(drvdata, REG_CTRL, drvdata->reg_ctrl_default); 316 314 317 315 /* Fill struct fb_info */ 318 316 drvdata->info.device = dev; ··· 364 364 err_cmap: 365 365 if (drvdata->fb_alloced) 366 366 dma_free_coherent(dev, PAGE_ALIGN(fbsize), drvdata->fb_virt, 367 - drvdata->fb_phys); 367 + drvdata->fb_phys); 368 368 else 369 369 iounmap(drvdata->fb_virt); 370 370 ··· 435 435 * Fill the resource structure if its direct BUS interface 436 436 * otherwise fill the dcr_host structure. 437 437 */ 438 - if (tft_access) { 438 + if (tft_access) 439 439 drvdata->flags |= BUS_ACCESS_FLAG; 440 - } 441 440 #ifdef CONFIG_PPC_DCR 442 441 else { 443 442 int start; 443 + 444 444 start = dcr_resource_start(pdev->dev.of_node, 0); 445 445 drvdata->dcr_len = dcr_resource_len(pdev->dev.of_node, 0); 446 446 drvdata->dcr_host = dcr_map(pdev->dev.of_node, start, drvdata->dcr_len); ··· 452 452 #endif 453 453 454 454 prop = of_get_property(pdev->dev.of_node, "phys-size", &size); 455 - if ((prop) && (size >= sizeof(u32)*2)) { 455 + if ((prop) && (size >= sizeof(u32) * 2)) { 456 456 pdata.screen_width_mm = prop[0]; 457 457 pdata.screen_height_mm = prop[1]; 458 458 } 459 459 460 460 prop = of_get_property(pdev->dev.of_node, "resolution", &size); 461 - if ((prop) && (size >= sizeof(u32)*2)) { 461 + if ((prop) && (size >= sizeof(u32) * 2)) { 462 462 pdata.xres = prop[0]; 463 463 pdata.yres = prop[1]; 464 464 } 465 465 466 466 prop = of_get_property(pdev->dev.of_node, "virtual-resolution", &size); 467 - if ((prop) && (size >= sizeof(u32)*2)) { 467 + if ((prop) && (size >= sizeof(u32) * 2)) { 468 468 pdata.xvirt = prop[0]; 469 469 pdata.yvirt = prop[1]; 470 470 } ··· 482 482 } 483 483 484 484 /* Match table for of_platform binding */ 485 - static struct of_device_id xilinxfb_of_match[] = { 485 + static const struct of_device_id xilinxfb_of_match[] = { 486 486 { .compatible = "xlnx,xps-tft-1.00.a", }, 487 487 { .compatible = "xlnx,xps-tft-2.00.a", }, 488 488 { .compatible = "xlnx,xps-tft-2.01.a", },
+16 -25
drivers/video/of_display_timing.c
··· 31 31 32 32 prop = of_find_property(np, name, &length); 33 33 if (!prop) { 34 - pr_err("%s: could not find property %s\n", 35 - of_node_full_name(np), name); 34 + pr_err("%pOF: could not find property %s\n", np, name); 36 35 return -EINVAL; 37 36 } 38 37 ··· 43 44 } else if (cells == 3) { 44 45 ret = of_property_read_u32_array(np, name, &result->min, cells); 45 46 } else { 46 - pr_err("%s: illegal timing specification in %s\n", 47 - of_node_full_name(np), name); 47 + pr_err("%pOF: illegal timing specification in %s\n", np, name); 48 48 return -EINVAL; 49 49 } 50 50 ··· 103 105 dt->flags |= DISPLAY_FLAGS_DOUBLECLK; 104 106 105 107 if (ret) { 106 - pr_err("%s: error reading timing properties\n", 107 - of_node_full_name(np)); 108 + pr_err("%pOF: error reading timing properties\n", np); 108 109 return -EINVAL; 109 110 } 110 111 ··· 126 129 127 130 timing_np = of_get_child_by_name(np, name); 128 131 if (!timing_np) { 129 - pr_err("%s: could not find node '%s'\n", 130 - of_node_full_name(np), name); 132 + pr_err("%pOF: could not find node '%s'\n", np, name); 131 133 return -ENOENT; 132 134 } 133 135 ··· 150 154 151 155 timings_np = of_get_child_by_name(np, "display-timings"); 152 156 if (!timings_np) { 153 - pr_err("%s: could not find display-timings node\n", 154 - of_node_full_name(np)); 157 + pr_err("%pOF: could not find display-timings node\n", np); 155 158 return NULL; 156 159 } 157 160 158 161 disp = kzalloc(sizeof(*disp), GFP_KERNEL); 159 162 if (!disp) { 160 - pr_err("%s: could not allocate struct disp'\n", 161 - of_node_full_name(np)); 163 + pr_err("%pOF: could not allocate struct disp'\n", np); 162 164 goto dispfail; 163 165 } 164 166 ··· 166 172 entry = of_get_next_child(timings_np, NULL); 167 173 /* if there is no child, it is useless to go on */ 168 174 if (!entry) { 169 - pr_err("%s: no timing specifications given\n", 170 - of_node_full_name(np)); 175 + pr_err("%pOF: no timing specifications given\n", np); 171 176 goto entryfail; 172 177 } 173 178 174 - pr_debug("%s: using %s as default timing\n", 175 - of_node_full_name(np), entry->name); 179 + pr_debug("%pOF: using %s as default timing\n", np, entry->name); 176 180 177 181 native_mode = entry; 178 182 179 183 disp->num_timings = of_get_child_count(timings_np); 180 184 if (disp->num_timings == 0) { 181 185 /* should never happen, as entry was already found above */ 182 - pr_err("%s: no timings specified\n", of_node_full_name(np)); 186 + pr_err("%pOF: no timings specified\n", np); 183 187 goto entryfail; 184 188 } 185 189 186 190 disp->timings = kzalloc(sizeof(struct display_timing *) * 187 191 disp->num_timings, GFP_KERNEL); 188 192 if (!disp->timings) { 189 - pr_err("%s: could not allocate timings array\n", 190 - of_node_full_name(np)); 193 + pr_err("%pOF: could not allocate timings array\n", np); 191 194 goto entryfail; 192 195 } 193 196 ··· 197 206 198 207 dt = kzalloc(sizeof(*dt), GFP_KERNEL); 199 208 if (!dt) { 200 - pr_err("%s: could not allocate display_timing struct\n", 201 - of_node_full_name(np)); 209 + pr_err("%pOF: could not allocate display_timing struct\n", 210 + np); 202 211 goto timingfail; 203 212 } 204 213 ··· 208 217 * to not encourage wrong devicetrees, fail in case of 209 218 * an error 210 219 */ 211 - pr_err("%s: error in timing %d\n", 212 - of_node_full_name(np), disp->num_timings + 1); 220 + pr_err("%pOF: error in timing %d\n", 221 + np, disp->num_timings + 1); 213 222 kfree(dt); 214 223 goto timingfail; 215 224 } ··· 227 236 */ 228 237 of_node_put(native_mode); 229 238 230 - pr_debug("%s: got %d timings. Using timing #%d as default\n", 231 - of_node_full_name(np), disp->num_timings, 239 + pr_debug("%pOF: got %d timings. Using timing #%d as default\n", 240 + np, disp->num_timings, 232 241 disp->native_mode + 1); 233 242 234 243 return disp;
+1 -1
drivers/video/of_videomode.c
··· 36 36 37 37 disp = of_get_display_timings(np); 38 38 if (!disp) { 39 - pr_err("%s: no timings specified\n", of_node_full_name(np)); 39 + pr_err("%pOF: no timings specified\n", np); 40 40 return -EINVAL; 41 41 } 42 42
+1 -9
include/linux/fb.h
··· 400 400 #endif /* CONFIG_FB_TILEBLITTING */ 401 401 402 402 /* FBINFO_* = fb_info.flags bit flags */ 403 - #define FBINFO_MODULE 0x0001 /* Low-level driver is a module */ 403 + #define FBINFO_DEFAULT 0 404 404 #define FBINFO_HWACCEL_DISABLED 0x0002 405 405 /* When FBINFO_HWACCEL_DISABLED is set: 406 406 * Hardware acceleration is turned off. Software implementations ··· 533 533 return a; 534 534 } 535 535 536 - #ifdef MODULE 537 - #define FBINFO_DEFAULT FBINFO_MODULE 538 - #else 539 - #define FBINFO_DEFAULT 0 540 - #endif 541 - 542 - // This will go away 543 - #define FBINFO_FLAG_MODULE FBINFO_MODULE 544 536 #define FBINFO_FLAG_DEFAULT FBINFO_DEFAULT 545 537 546 538 /* This will go away
+12
include/linux/fbcon.h
··· 1 + #ifndef _LINUX_FBCON_H 2 + #define _LINUX_FBCON_H 3 + 4 + #ifdef CONFIG_FRAMEBUFFER_CONSOLE 5 + void __init fb_console_init(void); 6 + void __exit fb_console_exit(void); 7 + #else 8 + static inline void fb_console_init(void) {} 9 + static inline void fb_console_exit(void) {} 10 + #endif 11 + 12 + #endif /* _LINUX_FBCON_H */