History

Merge tag 'fbdev-for-6.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev

Pull fbdev fixes from Helge Deller: - use after free fix in imsttfb (Zheng Wang) - fix error handling in arcfb (Zongjie Li) - lots of whitespace cleanups (Thomas Zimmermann) - add 1920x1080 modedb entry (me) * tag 'fbdev-for-6.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev: fbdev: stifb: Fix info entry in sti_struct on error path fbdev: modedb: Add 1920x1080 at 60 Hz video mode fbdev: imsttfb: Fix use after free bug in imsttfb_probe fbdev: vfb: Remove trailing whitespaces fbdev: valkyriefb: Remove trailing whitespaces fbdev: stifb: Remove trailing whitespaces fbdev: sa1100fb: Remove trailing whitespaces fbdev: platinumfb: Remove trailing whitespaces fbdev: p9100: Remove trailing whitespaces fbdev: maxinefb: Remove trailing whitespaces fbdev: macfb: Remove trailing whitespaces fbdev: hpfb: Remove trailing whitespaces fbdev: hgafb: Remove trailing whitespaces fbdev: g364fb: Remove trailing whitespaces fbdev: controlfb: Remove trailing whitespaces fbdev: cg14: Remove trailing whitespaces fbdev: atmel_lcdfb: Remove trailing whitespaces fbdev: 68328fb: Remove trailing whitespaces fbdev: arcfb: Fix error handling in arcfb_probe()

Linus Torvalds committed 3 years ago

Commit adfbf652 parents 046206b 0bdf1ad18 files · +202 −192Browse files

Unified · Split

18 files
  1. drivers/video/fbdev/68328fb.c +6 −6
  2. drivers/video/fbdev/arcfb.c +9 −6
  3. drivers/video/fbdev/atmel_lcdfb.c +1 −1
  4. drivers/video/fbdev/cg14.c +1 −1
  5. drivers/video/fbdev/controlfb.c +17 −17
  6. drivers/video/fbdev/core/modedb.c +5 −0
  7. drivers/video/fbdev/g364fb.c +3 −3
  8. drivers/video/fbdev/hgafb.c +18 −18
  9. drivers/video/fbdev/hpfb.c +4 −4
  10. drivers/video/fbdev/imsttfb.c +8 −7
  11. drivers/video/fbdev/macfb.c +5 −5
  12. drivers/video/fbdev/maxinefb.c +1 −1
  13. drivers/video/fbdev/p9100.c +2 −2
  14. drivers/video/fbdev/platinumfb.c +15 −15
  15. drivers/video/fbdev/sa1100fb.c +16 −16
  16. drivers/video/fbdev/stifb.c +79 −78
  17. drivers/video/fbdev/valkyriefb.c +7 −7
  18. drivers/video/fbdev/vfb.c +5 −5
drivers/video/fbdev/68328fb.c+6−6
@@ -124,7 +124,7 @@ static u_long get_line_length(int xres_virtual, int bpp) · 123 unmodified lines
124124 * First part, xxxfb_check_var, must not write anything
125125 * to hardware, it should only verify and adjust var.
126126 * This means it doesn't alter par but it does use hardware
127− * data from it to check this var.
127+ * data from it to check this var.
128128 */
129129
130130 static int mc68x328fb_check_var(struct fb_var_screeninfo *var,
@@ -182,7 +182,7 @@ static int mc68x328fb_check_var(struct fb_var_screeninfo *var, · 51 unmodified lines
182182
183183 /*
184184 * Now that we checked it we alter var. The reason being is that the video
185− * mode passed in might not work but slight changes to it might make it
185+ * mode passed in might not work but slight changes to it might make it
186186 * work. This way we let the user know what is acceptable.
187187 */
188188 switch (var->bits_per_pixel) {
@@ -257,8 +257,8 @@ static int mc68x328fb_check_var(struct fb_var_screeninfo *var, · 68 unmodified lines
257257 }
258258
259259 /* This routine actually sets the video mode. It's in here where we
260− * the hardware state info->par and fix which can be affected by the
261− * change in par. For this driver it doesn't do much.
260+ * the hardware state info->par and fix which can be affected by the
261+ * change in par. For this driver it doesn't do much.
262262 */
263263 static int mc68x328fb_set_par(struct fb_info *info)
264264 {
@@ -295,7 +295,7 @@ static int mc68x328fb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, · 30 unmodified lines
295295 * {hardwarespecific} contains width of RAMDAC
296296 * cmap[X] is programmed to (X << red.offset) | (X << green.offset) | (X << blue.offset)
297297 * RAMDAC[X] is programmed to (red, green, blue)
298− *
298+ *
299299 * Pseudocolor:
300300 * uses offset = 0 && length = RAMDAC register width.
301301 * var->{color}.offset is 0
@@ -384,7 +384,7 @@ static int mc68x328fb_pan_display(struct fb_var_screeninfo *var, · 82 unmodified lines
384384 }
385385
386386 /*
387− * Most drivers don't need their own mmap function
387+ * Most drivers don't need their own mmap function
388388 */
389389
390390 static int mc68x328fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
drivers/video/fbdev/arcfb.c+9−6
@@ -523,7 +523,7 @@ static int arcfb_probe(struct platform_device *dev) · 522 unmodified lines
523523
524524 info = framebuffer_alloc(sizeof(struct arcfb_par), &dev->dev);
525525 if (!info)
526− goto err;
526+ goto err_fb_alloc;
527527
528528 info->screen_base = (char __iomem *)videomemory;
529529 info->fbops = &arcfb_ops;
@@ -535,7 +535,7 @@ static int arcfb_probe(struct platform_device *dev) · 5 unmodified lines
535535
536536 if (!dio_addr || !cio_addr || !c2io_addr) {
537537 printk(KERN_WARNING "no IO addresses supplied\n");
538− goto err1;
538+ goto err_addr;
539539 }
540540 par->dio_addr = dio_addr;
541541 par->cio_addr = cio_addr;
@@ -551,12 +551,12 @@ static int arcfb_probe(struct platform_device *dev) · 9 unmodified lines
551551 printk(KERN_INFO
552552 "arcfb: Failed req IRQ %d\n", par->irq);
553553 retval = -EBUSY;
554− goto err1;
554+ goto err_addr;
555555 }
556556 }
557557 retval = register_framebuffer(info);
558558 if (retval < 0)
559− goto err1;
559+ goto err_register_fb;
560560 platform_set_drvdata(dev, info);
561561 fb_info(info, "Arc frame buffer device, using %dK of video memory\n",
562562 videomemorysize >> 10);
@@ -580,9 +580,12 @@ static int arcfb_probe(struct platform_device *dev) · 17 unmodified lines
580580 }
581581
582582 return 0;
583−err1:
583+
584+err_register_fb:
585+ free_irq(par->irq, info);
586+err_addr:
584587 framebuffer_release(info);
585−err:
588+err_fb_alloc:
586589 vfree(videomemory);
587590 return retval;
588591 }
drivers/video/fbdev/atmel_lcdfb.c+1−1
@@ -317,7 +317,7 @@ static inline void atmel_lcdfb_free_video_memory(struct atmel_lcdfb_info *sinfo) · 316 unmodified lines
317317 /**
318318 * atmel_lcdfb_alloc_video_memory - Allocate framebuffer memory
319319 * @sinfo: the frame buffer to allocate memory for
320− *
320+ *
321321 * This function is called only from the atmel_lcdfb_probe()
322322 * so no locking by fb_info->mm_lock around smem_len setting is needed.
323323 */
drivers/video/fbdev/cg14.c+1−1
@@ -512,7 +512,7 @@ static int cg14_probe(struct platform_device *op) · 511 unmodified lines
512512 is_8mb = (resource_size(&op->resource[1]) == (8 * 1024 * 1024));
513513
514514 BUILD_BUG_ON(sizeof(par->mmap_map) != sizeof(__cg14_mmap_map));
515−
515+
516516 memcpy(&par->mmap_map, &__cg14_mmap_map, sizeof(par->mmap_map));
517517
518518 for (i = 0; i < CG14_MMAP_ENTRIES; i++) {
drivers/video/fbdev/controlfb.c+17−17
@@ -113,14 +113,14 @@ struct fb_info_control { · 112 unmodified lines
113113 struct fb_info info;
114114 struct fb_par_control par;
115115 u32 pseudo_palette[16];
116−
116+
117117 struct cmap_regs __iomem *cmap_regs;
118118 unsigned long cmap_regs_phys;
119−
119+
120120 struct control_regs __iomem *control_regs;
121121 unsigned long control_regs_phys;
122122 unsigned long control_regs_size;
123−
123+
124124 __u8 __iomem *frame_buffer;
125125 unsigned long frame_buffer_phys;
126126 unsigned long fb_orig_base;
@@ -196,7 +196,7 @@ static void set_control_clock(unsigned char *params) · 69 unmodified lines
196196 while (!req.complete)
197197 cuda_poll();
198198 }
199−#endif
199+#endif
200200 }
201201
202202 /*
@@ -233,19 +233,19 @@ static void control_set_hardware(struct fb_info_control *p, struct fb_par_contro · 30 unmodified lines
233233 if (p->par.xoffset != par->xoffset ||
234234 p->par.yoffset != par->yoffset)
235235 set_screen_start(par->xoffset, par->yoffset, p);
236−
236+
237237 return;
238238 }
239−
239+
240240 p->par = *par;
241241 cmode = p->par.cmode;
242242 r = &par->regvals;
243−
243+
244244 /* Turn off display */
245245 out_le32(CNTRL_REG(p,ctrl), 0x400 | par->ctrl);
246−
246+
247247 set_control_clock(r->clock_params);
248−
248+
249249 RADACAL_WRITE(0x20, r->radacal_ctrl);
250250 RADACAL_WRITE(0x21, p->control_use_bank2 ? 0 : 1);
251251 RADACAL_WRITE(0x10, 0);
@@ -254,7 +254,7 @@ static void control_set_hardware(struct fb_info_control *p, struct fb_par_contro · 2 unmodified lines
254254 rp = &p->control_regs->vswin;
255255 for (i = 0; i < 16; ++i, ++rp)
256256 out_le32(&rp->r, r->regs[i]);
257−
257+
258258 out_le32(CNTRL_REG(p,pitch), par->pitch);
259259 out_le32(CNTRL_REG(p,mode), r->mode);
260260 out_le32(CNTRL_REG(p,vram_attr), p->vram_attr);
@@ -366,7 +366,7 @@ static int read_control_sense(struct fb_info_control *p) · 105 unmodified lines
366366 sense |= (in_le32(CNTRL_REG(p,mon_sense)) & 0x180) >> 7;
367367
368368 out_le32(CNTRL_REG(p,mon_sense), 077); /* turn off drivers */
369−
369+
370370 return sense;
371371 }
372372
@@ -558,9 +558,9 @@ static int control_var_to_par(struct fb_var_screeninfo *var, · 185 unmodified lines
558558 static void control_par_to_var(struct fb_par_control *par, struct fb_var_screeninfo *var)
559559 {
560560 struct control_regints *rv;
561−
561+
562562 rv = (struct control_regints *) par->regvals.regs;
563−
563+
564564 memset(var, 0, sizeof(*var));
565565 var->xres = par->xres;
566566 var->yres = par->yres;
@@ -568,7 +568,7 @@ static void control_par_to_var(struct fb_par_control *par, struct fb_var_screeni · 1 unmodified line
568568 var->yres_virtual = par->vyres;
569569 var->xoffset = par->xoffset;
570570 var->yoffset = par->yoffset;
571−
571+
572572 switch(par->cmode) {
573573 default:
574574 case CMODE_8:
@@ -634,7 +634,7 @@ static int controlfb_check_var (struct fb_var_screeninfo *var, struct fb_info *i · 59 unmodified lines
634634
635635 err = control_var_to_par(var, &par, info);
636636 if (err)
637− return err;
637+ return err;
638638 control_par_to_var(&par, var);
639639
640640 return 0;
@@ -655,7 +655,7 @@ static int controlfb_set_par (struct fb_info *info) · 14 unmodified lines
655655 " control_var_to_par: %d.\n", err);
656656 return err;
657657 }
658−
658+
659659 control_set_hardware(p, &par);
660660
661661 info->fix.visual = (p->par.cmode == CMODE_8) ?
@@ -840,7 +840,7 @@ static int __init init_control(struct fb_info_control *p) · 178 unmodified lines
840840 int full, sense, vmode, cmode, vyres;
841841 struct fb_var_screeninfo var;
842842 int rc;
843−
843+
844844 printk(KERN_INFO "controlfb: ");
845845
846846 full = p->total_vram == 0x400000;
drivers/video/fbdev/core/modedb.c+5−0
@@ -257,6 +257,11 @@ static const struct fb_videomode modedb[] = { · 256 unmodified lines
257257 { NULL, 72, 480, 300, 33386, 40, 24, 11, 19, 80, 3, 0,
258258 FB_VMODE_DOUBLE },
259259
260+ /* 1920x1080 @ 60 Hz, 67.3 kHz hsync */
261+ { NULL, 60, 1920, 1080, 6734, 148, 88, 36, 4, 44, 5, 0,
262+ FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
263+ FB_VMODE_NONINTERLACED },
264+
260265 /* 1920x1200 @ 60 Hz, 74.5 Khz hsync */
261266 { NULL, 60, 1920, 1200, 5177, 128, 336, 1, 38, 208, 3,
262267 FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
drivers/video/fbdev/g364fb.c+3−3
@@ -6,7 +6,7 @@ · 5 unmodified lines
66 *
77 * This driver is based on tgafb.c
88 *
9− * Copyright (C) 1997 Geert Uytterhoeven
9+ * Copyright (C) 1997 Geert Uytterhoeven
1010 * Copyright (C) 1995 Jay Estabrook
1111 *
1212 * This file is subject to the terms and conditions of the GNU General Public
@@ -28,7 +28,7 @@ · 15 unmodified lines
2828 #include <asm/io.h>
2929 #include <asm/jazz.h>
3030
31−/*
31+/*
3232 * Various defines for the G364
3333 */
3434 #define G364_MEM_BASE 0xe4400000
@@ -125,7 +125,7 @@ static const struct fb_ops g364fb_ops = { · 90 unmodified lines
125125 *
126126 * This call looks only at xoffset, yoffset and the FB_VMODE_YWRAP flag
127127 */
128−static int g364fb_pan_display(struct fb_var_screeninfo *var,
128+static int g364fb_pan_display(struct fb_var_screeninfo *var,
129129 struct fb_info *info)
130130 {
131131 if (var->xoffset ||
drivers/video/fbdev/hgafb.c+18−18
@@ -1,6 +1,6 @@
11 /*
22 * linux/drivers/video/hgafb.c -- Hercules graphics adaptor frame buffer device
3− *
3+ *
44 * Created 25 Nov 1999 by Ferenc Bakonyi (fero@drama.obuda.kando.hu)
55 * Based on skeletonfb.c by Geert Uytterhoeven and
66 * mdacon.c by Andrew Apted
@@ -8,14 +8,14 @@ · 1 unmodified line
88 * History:
99 *
1010 * - Revision 0.1.8 (23 Oct 2002): Ported to new framebuffer api.
11− *
12− * - Revision 0.1.7 (23 Jan 2001): fix crash resulting from MDA only cards
11+ *
12+ * - Revision 0.1.7 (23 Jan 2001): fix crash resulting from MDA only cards
1313 * being detected as Hercules. (Paul G.)
1414 * - Revision 0.1.6 (17 Aug 2000): new style structs
1515 * documentation
1616 * - Revision 0.1.5 (13 Mar 2000): spinlocks instead of saveflags();cli();etc
1717 * minor fixes
18− * - Revision 0.1.4 (24 Jan 2000): fixed a bug in hga_card_detect() for
18+ * - Revision 0.1.4 (24 Jan 2000): fixed a bug in hga_card_detect() for
1919 * HGA-only systems
2020 * - Revision 0.1.3 (22 Jan 2000): modified for the new fb_info structure
2121 * screen is cleared after rmmod
@@ -143,7 +143,7 @@ static bool nologo = 0; · 121 unmodified lines
143143
144144 static void write_hga_b(unsigned int val, unsigned char reg)
145145 {
146− outb_p(reg, HGA_INDEX_PORT);
146+ outb_p(reg, HGA_INDEX_PORT);
147147 outb_p(val, HGA_VALUE_PORT);
148148 }
149149
@@ -155,7 +155,7 @@ static void write_hga_w(unsigned int val, unsigned char reg) · 5 unmodified lines
155155
156156 static int test_hga_b(unsigned char val, unsigned char reg)
157157 {
158− outb_p(reg, HGA_INDEX_PORT);
158+ outb_p(reg, HGA_INDEX_PORT);
159159 outb (val, HGA_VALUE_PORT);
160160 udelay(20); val = (inb_p(HGA_VALUE_PORT) == val);
161161 return val;
@@ -244,7 +244,7 @@ static void hga_show_logo(struct fb_info *info) · 82 unmodified lines
244244 void __iomem *dest = hga_vram;
245245 char *logo = linux_logo_bw;
246246 int x, y;
247−
247+
248248 for (y = 134; y < 134 + 80 ; y++) * this needs some cleanup *
249249 for (x = 0; x < 10 ; x++)
250250 writeb(~*(logo++),(dest + HGA_ROWADDR(y) + x + 40));
@@ -255,7 +255,7 @@ static void hga_pan(unsigned int xoffset, unsigned int yoffset) · 4 unmodified lines
255255 {
256256 unsigned int base;
257257 unsigned long flags;
258−
258+
259259 base = (yoffset / 8) * 90 + xoffset;
260260 spin_lock_irqsave(&hga_reg_lock, flags);
261261 write_hga_w(base, 0x0c); /* start address */
@@ -310,7 +310,7 @@ static int hga_card_detect(void) · 48 unmodified lines
310310 /* Ok, there is definitely a card registering at the correct
311311 * memory location, so now we do an I/O port test.
312312 */
313−
313+
314314 if (!test_hga_b(0x66, 0x0f)) /* cursor low register */
315315 goto error;
316316
@@ -321,7 +321,7 @@ static int hga_card_detect(void) · 4 unmodified lines
321321 * bit of the status register is changing. This test lasts for
322322 * approximately 1/10th of a second.
323323 */
324−
324+
325325 p_save = q_save = inb_p(HGA_STATUS_PORT) & HGA_STATUS_VSYNC;
326326
327327 for (count=0; count < 50000 && p_save == q_save; count++) {
@@ -329,7 +329,7 @@ static int hga_card_detect(void) · 1 unmodified line
329329 udelay(2);
330330 }
331331
332− if (p_save == q_save)
332+ if (p_save == q_save)
333333 goto error;
334334
335335 switch (inb_p(HGA_STATUS_PORT) & 0x70) {
@@ -415,7 +415,7 @@ static int hgafb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, · 79 unmodified lines
415415 * @info:pointer to fb_info object containing info for current hga board
416416 *
417417 * This function looks only at xoffset, yoffset and the %FB_VMODE_YWRAP
418− * flag in @var. If input parameters are correct it calls hga_pan() to
418+ * flag in @var. If input parameters are correct it calls hga_pan() to
419419 * program the hardware. @info->var is updated to the new values.
420420 * A zero is returned on success and %-EINVAL for failure.
421421 */
@@ -442,9 +442,9 @@ static int hgafb_pan_display(struct fb_var_screeninfo *var, · 20 unmodified lines
442442 * hgafb_blank - (un)blank the screen
443443 * @blank_mode:blanking method to use
444444 * @info:unused
445− *
446− * Blank the screen if blank_mode != 0, else unblank.
447− * Implements VESA suspend and powerdown modes on hardware that supports
445+ *
446+ * Blank the screen if blank_mode != 0, else unblank.
447+ * Implements VESA suspend and powerdown modes on hardware that supports
448448 * disabling hsync/vsync:
449449 * @blank_mode == 2 means suspend vsync,
450450 * @blank_mode == 3 means suspend hsync,
@@ -539,15 +539,15 @@ static const struct fb_ops hgafb_ops = { · 88 unmodified lines
539539 .fb_copyarea = hgafb_copyarea,
540540 .fb_imageblit = hgafb_imageblit,
541541 };
542−
542+
543543 /* ------------------------------------------------------------------------- *
544544 *
545545 * Functions in fb_info
546− *
546+ *
547547 * ------------------------------------------------------------------------- */
548548
549549 /* ------------------------------------------------------------------------- */
550−
550+
551551 /*
552552 * Initialization
553553 */
drivers/video/fbdev/hpfb.c+4−4
@@ -92,7 +92,7 @@ static int hpfb_setcolreg(unsigned regno, unsigned red, unsigned green, · 91 unmodified lines
9292
9393 if (regno >= info->cmap.len)
9494 return 1;
95−
95+
9696 while (in_be16(fb_regs + 0x6002) & 0x4) udelay(1);
9797
9898 out_be16(fb_regs + 0x60ba, 0xff);
@@ -143,7 +143,7 @@ static void topcat_blit(int x0, int y0, int x1, int y1, int w, int h, int rr) · 44 unmodified lines
143143 out_8(fb_regs + WMOVE, fb_bitmask);
144144 }
145145
146−static void hpfb_copyarea(struct fb_info *info, const struct fb_copyarea *area)
146+static void hpfb_copyarea(struct fb_info *info, const struct fb_copyarea *area)
147147 {
148148 topcat_blit(area->sx, area->sy, area->dx, area->dy, area->width, area->height, RR_COPY);
149149 }
@@ -315,7 +315,7 @@ unmap_screen_base: · 165 unmodified lines
315315 return ret;
316316 }
317317
318−/*
318+/*
319319 * Check that the secondary ID indicates that we have some hope of working with this
320320 * framebuffer. The catseye boards are pretty much like topcats and we can muddle through.
321321 */
@@ -323,7 +323,7 @@ unmap_screen_base: · 1 unmodified line
323323 #define topcat_sid_ok(x) (((x) == DIO_ID2_LRCATSEYE) || ((x) == DIO_ID2_HRCCATSEYE) \
324324 || ((x) == DIO_ID2_HRMCATSEYE) || ((x) == DIO_ID2_TOPCAT))
325325
326−/*
326+/*
327327 * Initialise the framebuffer
328328 */
329329 static int hpfb_dio_probe(struct dio_dev *d, const struct dio_device_id *ent)
drivers/video/fbdev/imsttfb.c+8−7
@@ -1347,7 +1347,7 @@ static const struct fb_ops imsttfb_ops = { · 1346 unmodified lines
13471347 .fb_ioctl = imsttfb_ioctl,
13481348 };
13491349
1350−static void init_imstt(struct fb_info *info)
1350+static int init_imstt(struct fb_info *info)
13511351 {
13521352 struct imstt_par *par = info->par;
13531353 __u32 i, tmp, *ip, *end;
@@ -1420,7 +1420,7 @@ static void init_imstt(struct fb_info *info) · 66 unmodified lines
14201420 || !(compute_imstt_regvals(par, info->var.xres, info->var.yres))) {
14211421 printk("imsttfb: %ux%ux%u not supported\n", info->var.xres, info->var.yres, info->var.bits_per_pixel);
14221422 framebuffer_release(info);
1423− return;
1423+ return -ENODEV;
14241424 }
14251425
14261426 sprintf(info->fix.id, "IMS TT (%s)", par->ramdac == IBM ? "IBM" : "TVP");
@@ -1456,12 +1456,13 @@ static void init_imstt(struct fb_info *info) · 29 unmodified lines
14561456
14571457 if (register_framebuffer(info) < 0) {
14581458 framebuffer_release(info);
1459− return;
1459+ return -ENODEV;
14601460 }
14611461
14621462 tmp = (read_reg_le32(par->dc_regs, SSTATUS) & 0x0f00) >> 8;
14631463 fb_info(info, "%s frame buffer; %uMB vram; chip version %u\n",
14641464 info->fix.id, info->fix.smem_len >> 20, tmp);
1465+ return 0;
14651466 }
14661467
14671468 static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
@@ -1529,10 +1530,10 @@ static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) · 61 unmodified lines
15291530 if (!par->cmap_regs)
15301531 goto error;
15311532 info->pseudo_palette = par->palette;
1532− init_imstt(info);
1533−
1534− pci_set_drvdata(pdev, info);
1535− return 0;
1533+ ret = init_imstt(info);
1534+ if (!ret)
1535+ pci_set_drvdata(pdev, info);
1536+ return ret;
15361537
15371538 error:
15381539 if (par->dc_regs)
drivers/video/fbdev/macfb.c+5−5
@@ -339,7 +339,7 @@ static int civic_setpalette(unsigned int regno, unsigned int red, · 338 unmodified lines
339339 {
340340 unsigned long flags;
341341 int clut_status;
342−
342+
343343 local_irq_save(flags);
344344
345345 /* Set the register address */
@@ -439,7 +439,7 @@ static int macfb_setcolreg(unsigned regno, unsigned red, unsigned green, · 93 unmodified lines
439439 * (according to the entries in the `var' structure).
440440 * Return non-zero for invalid regno.
441441 */
442−
442+
443443 if (regno >= fb_info->cmap.len)
444444 return 1;
445445
@@ -548,7 +548,7 @@ static int __init macfb_init(void) · 102 unmodified lines
548548 return -ENODEV;
549549 macfb_setup(option);
550550
551− if (!MACH_IS_MAC)
551+ if (!MACH_IS_MAC)
552552 return -ENODEV;
553553
554554 if (mac_bi_data.id == MAC_MODEL_Q630 ||
@@ -644,7 +644,7 @@ static int __init macfb_init(void) · 89 unmodified lines
644644 err = -EINVAL;
645645 goto fail_unmap;
646646 }
647−
647+
648648 /*
649649 * We take a wild guess that if the video physical address is
650650 * in nubus slot space, that the nubus card is driving video.
@@ -774,7 +774,7 @@ static int __init macfb_init(void) · 123 unmodified lines
774774 civic_cmap_regs = ioremap(CIVIC_BASE, 0x1000);
775775 break;
776776
777−
777+
778778 /*
779779 * Assorted weirdos
780780 * We think this may be like the LC II
drivers/video/fbdev/maxinefb.c+1−1
@@ -138,7 +138,7 @@ int __init maxinefb_init(void) · 137 unmodified lines
138138 *(volatile unsigned char *)fboff = 0x0;
139139
140140 maxinefb_fix.smem_start = fb_start;
141−
141+
142142 /* erase hardware cursor */
143143 for (i = 0; i < 512; i++) {
144144 maxinefb_ims332_write_register(IMS332_REG_CURSOR_RAM + i,
drivers/video/fbdev/p9100.c+2−2
@@ -65,7 +65,7 @@ static const struct fb_ops p9100_ops = { · 64 unmodified lines
6565 #define P9100_FB_OFF 0x0UL
6666
6767 /* 3 bits: 2=8bpp 3=16bpp 5=32bpp 7=24bpp */
68−#define SYS_CONFIG_PIXELSIZE_SHIFT 26
68+#define SYS_CONFIG_PIXELSIZE_SHIFT 26
6969
7070 #define SCREENPAINT_TIMECTL1_ENABLE_VIDEO 0x20 /* 0 = off, 1 = on */
7171
@@ -110,7 +110,7 @@ struct p9100_regs { · 38 unmodified lines
110110 u32 vram_xxx[25];
111111
112112 /* Registers for IBM RGB528 Palette */
113− u32 ramdac_cmap_wridx;
113+ u32 ramdac_cmap_wridx;
114114 u32 ramdac_palette_data;
115115 u32 ramdac_pixel_mask;
116116 u32 ramdac_palette_rdaddr;
drivers/video/fbdev/platinumfb.c+15−15
@@ -52,17 +52,17 @@ struct fb_info_platinum { · 51 unmodified lines
5252 __u8 red, green, blue;
5353 } palette[256];
5454 u32 pseudo_palette[16];
55−
55+
5656 volatile struct cmap_regs __iomem *cmap_regs;
5757 unsigned long cmap_regs_phys;
58−
58+
5959 volatile struct platinum_regs __iomem *platinum_regs;
6060 unsigned long platinum_regs_phys;
61−
61+
6262 __u8 __iomem *frame_buffer;
6363 volatile __u8 __iomem *base_frame_buffer;
6464 unsigned long frame_buffer_phys;
65−
65+
6666 unsigned long total_vram;
6767 int clktype;
6868 int dactype;
@@ -133,7 +133,7 @@ static int platinumfb_set_par (struct fb_info *info) · 64 unmodified lines
133133 platinum_set_hardware(pinfo);
134134
135135 init = platinum_reg_init[pinfo->vmode-1];
136−
136+
137137 if ((pinfo->vmode == VMODE_832_624_75) && (pinfo->cmode > CMODE_8))
138138 offset = 0x10;
139139
@@ -214,7 +214,7 @@ static int platinumfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, · 74 unmodified lines
214214 break;
215215 }
216216 }
217−
217+
218218 return 0;
219219 }
220220
@@ -269,7 +269,7 @@ static void platinum_set_hardware(struct fb_info_platinum *pinfo) · 48 unmodified lines
269269 struct platinum_regvals *init;
270270 int i;
271271 int vmode, cmode;
272−
272+
273273 vmode = pinfo->vmode;
274274 cmode = pinfo->cmode;
275275
@@ -436,7 +436,7 @@ static int read_platinum_sense(struct fb_info_platinum *info) · 160 unmodified lines
436436 * This routine takes a user-supplied var, and picks the best vmode/cmode from it.
437437 * It also updates the var structure to the actual mode data obtained
438438 */
439−static int platinum_var_to_par(struct fb_var_screeninfo *var,
439+static int platinum_var_to_par(struct fb_var_screeninfo *var,
440440 struct fb_info_platinum *pinfo,
441441 int check_only)
442442 {
@@ -478,12 +478,12 @@ static int platinum_var_to_par(struct fb_var_screeninfo *var, · 35 unmodified lines
478478 pinfo->yoffset = 0;
479479 pinfo->vxres = pinfo->xres;
480480 pinfo->vyres = pinfo->yres;
481−
481+
482482 return 0;
483483 }
484484
485485
486−/*
486+/*
487487 * Parse user specified options (`video=platinumfb:')
488488 */
489489 static int __init platinumfb_setup(char *options)
@@ -624,7 +624,7 @@ static int platinumfb_probe(struct platform_device* odev) · 134 unmodified lines
624624 break;
625625 }
626626 dev_set_drvdata(&odev->dev, info);
627−
627+
628628 rc = platinum_init_fb(info);
629629 if (rc != 0) {
630630 iounmap(pinfo->frame_buffer);
@@ -640,9 +640,9 @@ static void platinumfb_remove(struct platform_device* odev) · 9 unmodified lines
640640 {
641641 struct fb_info *info = dev_get_drvdata(&odev->dev);
642642 struct fb_info_platinum *pinfo = info->par;
643−
643+
644644 unregister_framebuffer (info);
645−
645+
646646 /* Unmap frame buffer and registers */
647647 iounmap(pinfo->frame_buffer);
648648 iounmap(pinfo->platinum_regs);
@@ -656,7 +656,7 @@ static void platinumfb_remove(struct platform_device* odev) · 7 unmodified lines
656656 framebuffer_release(info);
657657 }
658658
659−static struct of_device_id platinumfb_match[] =
659+static struct of_device_id platinumfb_match[] =
660660 {
661661 {
662662 .name = "platinum",
@@ -664,7 +664,7 @@ static struct of_device_id platinumfb_match[] = · 1 unmodified line
664664 {},
665665 };
666666
667−static struct platform_driver platinum_driver =
667+static struct platform_driver platinum_driver =
668668 {
669669 .driver = {
670670 .name = "platinumfb",
drivers/video/fbdev/sa1100fb.c+16−16
@@ -57,14 +57,14 @@ · 56 unmodified lines
5757 * - Driver appears to be working for Brutus 320x200x8bpp mode. Other
5858 * resolutions are working, but only the 8bpp mode is supported.
5959 * Changes need to be made to the palette encode and decode routines
60− * to support 4 and 16 bpp modes.
60+ * to support 4 and 16 bpp modes.
6161 * Driver is not designed to be a module. The FrameBuffer is statically
62− * allocated since dynamic allocation of a 300k buffer cannot be
63− * guaranteed.
62+ * allocated since dynamic allocation of a 300k buffer cannot be
63+ * guaranteed.
6464 *
6565 * 1999/06/17:
6666 * - FrameBuffer memory is now allocated at run-time when the
67− * driver is initialized.
67+ * driver is initialized.
6868 *
6969 * 2000/04/10: Nicolas Pitre <nico@fluxnic.net>
7070 * - Big cleanup for dynamic selection of machine type at run time.
@@ -74,8 +74,8 @@ · 3 unmodified lines
7474 *
7575 * 2000/08/07: Tak-Shing Chan <tchan.rd@idthk.com>
7676 * Jeff Sutherland <jsutherland@accelent.com>
77− * - Resolved an issue caused by a change made to the Assabet's PLD
78− * earlier this year which broke the framebuffer driver for newer
77+ * - Resolved an issue caused by a change made to the Assabet's PLD
78+ * earlier this year which broke the framebuffer driver for newer
7979 * Phase 4 Assabets. Some other parameters were changed to optimize
8080 * for the Sharp display.
8181 *
@@ -102,7 +102,7 @@ · 20 unmodified lines
102102 * 2000/11/23: Eric Peng <ericpeng@coventive.com>
103103 * - Freebird add
104104 *
105− * 2001/02/07: Jamey Hicks <jamey.hicks@compaq.com>
105+ * 2001/02/07: Jamey Hicks <jamey.hicks@compaq.com>
106106 * Cliff Brake <cbrake@accelent.com>
107107 * - Added PM callback
108108 *
@@ -500,7 +500,7 @@ sa1100fb_set_cmap(struct fb_cmap *cmap, int kspc, int con, · 391 unmodified lines
500500 * the shortest recovery time
501501 * Suspend
502502 * This refers to a level of power management in which substantial power
503− * reduction is achieved by the display. The display can have a longer
503+ * reduction is achieved by the display. The display can have a longer
504504 * recovery time from this state than from the Stand-by state
505505 * Off
506506 * This indicates that the display is consuming the lowest level of power
@@ -522,9 +522,9 @@ sa1100fb_set_cmap(struct fb_cmap *cmap, int kspc, int con, · 15 unmodified lines
522522 */
523523 /*
524524 * sa1100fb_blank():
525− * Blank the display by setting all palette values to zero. Note, the
525+ * Blank the display by setting all palette values to zero. Note, the
526526 * 12 and 16 bpp modes don't really use the palette, so this will not
527− * blank the display in all modes.
527+ * blank the display in all modes.
528528 */
529529 static int sa1100fb_blank(int blank, struct fb_info *info)
530530 {
@@ -603,8 +603,8 @@ static inline unsigned int get_pcd(struct sa1100fb_info *fbi, · 72 unmodified lines
603603
604604 /*
605605 * sa1100fb_activate_var():
606− * Configures LCD Controller based on entries in var parameter. Settings are
607− * only written to the controller if changes were made.
606+ * Configures LCD Controller based on entries in var parameter. Settings are
607+ * only written to the controller if changes were made.
608608 */
609609 static int sa1100fb_activate_var(struct fb_var_screeninfo *var, struct sa1100fb_info *fbi)
610610 {
@@ -747,7 +747,7 @@ static void sa1100fb_setup_gpio(struct sa1100fb_info *fbi) · 136 unmodified lines
747747 *
748748 * SA1110 spec update nr. 25 says we can and should
749749 * clear LDD15 to 12 for 4 or 8bpp modes with active
750− * panels.
750+ * panels.
751751 */
752752 if ((fbi->reg_lccr0 & LCCR0_CMS) == LCCR0_Color &&
753753 (fbi->reg_lccr0 & (LCCR0_Dual|LCCR0_Act)) != 0) {
@@ -1020,9 +1020,9 @@ static int sa1100fb_resume(struct platform_device *dev) · 266 unmodified lines
10201020
10211021 /*
10221022 * sa1100fb_map_video_memory():
1023− * Allocates the DRAM memory for the frame buffer. This buffer is
1024− * remapped into a non-cached, non-buffered, memory region to
1025− * allow palette and pixel writes to occur without flushing the
1023+ * Allocates the DRAM memory for the frame buffer. This buffer is
1024+ * remapped into a non-cached, non-buffered, memory region to
1025+ * allow palette and pixel writes to occur without flushing the
10261026 * cache. Once this area is remapped, all virtual memory
10271027 * access to the video memory should occur at the new region.
10281028 */
drivers/video/fbdev/stifb.c+79−78
@@ -1,11 +1,11 @@
11 /*
2− * linux/drivers/video/stifb.c -
3− * Low level Frame buffer driver for HP workstations with
2+ * linux/drivers/video/stifb.c -
3+ * Low level Frame buffer driver for HP workstations with
44 * STI (standard text interface) video firmware.
55 *
66 * Copyright (C) 2001-2006 Helge Deller <deller@gmx.de>
77 * Portions Copyright (C) 2001 Thomas Bogendoerfer <tsbogend@alpha.franken.de>
8− *
8+ *
99 * Based on:
1010 * - linux/drivers/video/artistfb.c -- Artist frame buffer driver
1111 * Copyright (C) 2000 Philipp Rumpf <prumpf@tux.org>
@@ -14,7 +14,7 @@ · 2 unmodified lines
1414 * - HP Xhp cfb-based X11 window driver for XFree86
1515 * (c)Copyright 1992 Hewlett-Packard Co.
1616 *
17− *
17+ *
1818 * The following graphics display devices (NGLE family) are supported by this driver:
1919 *
2020 * HPA4070A known as "HCRX", a 1280x1024 color device with 8 planes
@@ -30,7 +30,7 @@ · 9 unmodified lines
3030 * supports 1280x1024 color displays with 8 planes.
3131 * HP710G same as HP710C, 1280x1024 grayscale only
3232 * HP710L same as HP710C, 1024x768 color only
33− * HP712 internal graphics support on HP9000s712 SPU, supports 640x480,
33+ * HP712 internal graphics support on HP9000s712 SPU, supports 640x480,
3434 * 1024x768 or 1280x1024 color displays on 8 planes (Artist)
3535 *
3636 * This file is subject to the terms and conditions of the GNU General Public
@@ -92,7 +92,7 @@ typedef struct { · 55 unmodified lines
9292 __s32 misc_video_end;
9393 } video_setup_t;
9494
95−typedef struct {
95+typedef struct {
9696 __s16 sizeof_ngle_data;
9797 __s16 x_size_visible; /* visible screen dim in pixels */
9898 __s16 y_size_visible;
@@ -177,10 +177,10 @@ static int __initdata stifb_bpp_pref[MAX_STI_ROMS]; · 78 unmodified lines
177177 #endif /* DEBUG_STIFB_REGS */
178178
179179
180−#define ENABLE 1 /* for enabling/disabling screen */
180+#define ENABLE 1 /* for enabling/disabling screen */
181181 #define DISABLE 0
182182
183−#define NGLE_LOCK(fb_info) do { } while (0)
183+#define NGLE_LOCK(fb_info) do { } while (0)
184184 #define NGLE_UNLOCK(fb_info) do { } while (0)
185185
186186 static void
@@ -198,9 +198,9 @@ SETUP_HW(struct stifb_info *fb) · 11 unmodified lines
198198
199199 static void
200200 SETUP_FB(struct stifb_info *fb)
201−{
201+{
202202 unsigned int reg10_value = 0;
203−
203+
204204 SETUP_HW(fb);
205205 switch (fb->id)
206206 {
@@ -210,15 +210,15 @@ SETUP_FB(struct stifb_info *fb) · 3 unmodified lines
210210 reg10_value = 0x13601000;
211211 break;
212212 case S9000_ID_A1439A:
213− if (fb->info.var.bits_per_pixel == 32)
213+ if (fb->info.var.bits_per_pixel == 32)
214214 reg10_value = 0xBBA0A000;
215− else
215+ else
216216 reg10_value = 0x13601000;
217217 break;
218218 case S9000_ID_HCRX:
219219 if (fb->info.var.bits_per_pixel == 32)
220220 reg10_value = 0xBBA0A000;
221− else
221+ else
222222 reg10_value = 0x13602000;
223223 break;
224224 case S9000_ID_TIMBER:
@@ -243,7 +243,7 @@ START_IMAGE_COLORMAP_ACCESS(struct stifb_info *fb) · 18 unmodified lines
243243 }
244244
245245 static void
246−WRITE_IMAGE_COLOR(struct stifb_info *fb, int index, int color)
246+WRITE_IMAGE_COLOR(struct stifb_info *fb, int index, int color)
247247 {
248248 SETUP_HW(fb);
249249 WRITE_WORD(((0x100+index)<<2), fb, REG_3);
@@ -251,30 +251,30 @@ WRITE_IMAGE_COLOR(struct stifb_info *fb, int index, int color) · 1 unmodified line
251251 }
252252
253253 static void
254−FINISH_IMAGE_COLORMAP_ACCESS(struct stifb_info *fb)
255−{
254+FINISH_IMAGE_COLORMAP_ACCESS(struct stifb_info *fb)
255+{
256256 WRITE_WORD(0x400, fb, REG_2);
257257 if (fb->info.var.bits_per_pixel == 32) {
258258 WRITE_WORD(0x83000100, fb, REG_1);
259259 } else {
260260 if (fb->id == S9000_ID_ARTIST || fb->id == CRT_ID_VISUALIZE_EG)
261261 WRITE_WORD(0x80000100, fb, REG_26);
262− else
262+ else
263263 WRITE_WORD(0x80000100, fb, REG_1);
264264 }
265265 SETUP_FB(fb);
266266 }
267267
268268 static void
269−SETUP_RAMDAC(struct stifb_info *fb)
269+SETUP_RAMDAC(struct stifb_info *fb)
270270 {
271271 SETUP_HW(fb);
272272 WRITE_WORD(0x04000000, fb, 0x1020);
273273 WRITE_WORD(0xff000000, fb, 0x1028);
274274 }
275275
276−static void
277−CRX24_SETUP_RAMDAC(struct stifb_info *fb)
276+static void
277+CRX24_SETUP_RAMDAC(struct stifb_info *fb)
278278 {
279279 SETUP_HW(fb);
280280 WRITE_WORD(0x04000000, fb, 0x1000);
@@ -286,14 +286,14 @@ CRX24_SETUP_RAMDAC(struct stifb_info *fb) · 5 unmodified lines
286286 }
287287
288288 #if 0
289−static void
289+static void
290290 HCRX_SETUP_RAMDAC(struct stifb_info *fb)
291291 {
292292 WRITE_WORD(0xffffffff, fb, REG_32);
293293 }
294294 #endif
295295
296−static void
296+static void
297297 CRX24_SET_OVLY_MASK(struct stifb_info *fb)
298298 {
299299 SETUP_HW(fb);
@@ -314,7 +314,7 @@ ENABLE_DISABLE_DISPLAY(struct stifb_info *fb, int enable) · 14 unmodified lines
314314 WRITE_WORD(value, fb, 0x1038);
315315 }
316316
317−static void
317+static void
318318 CRX24_ENABLE_DISABLE_DISPLAY(struct stifb_info *fb, int enable)
319319 {
320320 unsigned int value = enable ? 0x10000000 : 0x30000000;
@@ -325,11 +325,11 @@ CRX24_ENABLE_DISABLE_DISPLAY(struct stifb_info *fb, int enable) · 4 unmodified lines
325325 }
326326
327327 static void
328−ARTIST_ENABLE_DISABLE_DISPLAY(struct stifb_info *fb, int enable)
328+ARTIST_ENABLE_DISABLE_DISPLAY(struct stifb_info *fb, int enable)
329329 {
330330 u32 DregsMiscVideo = REG_21;
331331 u32 DregsMiscCtl = REG_27;
332−
332+
333333 SETUP_HW(fb);
334334 if (enable) {
335335 WRITE_WORD(READ_WORD(fb, DregsMiscVideo) | 0x0A000000, fb, DregsMiscVideo);
@@ -344,7 +344,7 @@ ARTIST_ENABLE_DISABLE_DISPLAY(struct stifb_info *fb, int enable) · 8 unmodified lines
344344 (READ_BYTE(fb, REG_16b3) - 1)
345345
346346 #define HYPER_CONFIG_PLANES_24 0x00000100
347−
347+
348348 #define IS_24_DEVICE(fb) \
349349 (fb->deviceSpecificConfig & HYPER_CONFIG_PLANES_24)
350350
@@ -470,15 +470,15 @@ SETUP_ATTR_ACCESS(struct stifb_info *fb, unsigned BufferNumber) · 119 unmodified lines
470470 }
471471
472472 static void
473−SET_ATTR_SIZE(struct stifb_info *fb, int width, int height)
473+SET_ATTR_SIZE(struct stifb_info *fb, int width, int height)
474474 {
475− /* REG_6 seems to have special values when run on a
475+ /* REG_6 seems to have special values when run on a
476476 RDI precisionbook parisc laptop (INTERNAL_EG_DX1024 or
477477 INTERNAL_EG_X1024). The values are:
478478 0x2f0: internal (LCD) & external display enabled
479479 0x2a0: external display only
480480 0x000: zero on standard artist graphic cards
481− */
481+ */
482482 WRITE_WORD(0x00000000, fb, REG_6);
483483 WRITE_WORD((width<<16) | height, fb, REG_9);
484484 WRITE_WORD(0x05000000, fb, REG_6);
@@ -486,7 +486,7 @@ SET_ATTR_SIZE(struct stifb_info *fb, int width, int height) · 1 unmodified line
486486 }
487487
488488 static void
489−FINISH_ATTR_ACCESS(struct stifb_info *fb)
489+FINISH_ATTR_ACCESS(struct stifb_info *fb)
490490 {
491491 SETUP_HW(fb);
492492 WRITE_WORD(0x00000000, fb, REG_12);
@@ -499,7 +499,7 @@ elkSetupPlanes(struct stifb_info *fb) · 6 unmodified lines
499499 SETUP_FB(fb);
500500 }
501501
502−static void
502+static void
503503 ngleSetupAttrPlanes(struct stifb_info *fb, int BufferNumber)
504504 {
505505 SETUP_ATTR_ACCESS(fb, BufferNumber);
@@ -519,7 +519,7 @@ rattlerSetupPlanes(struct stifb_info *fb) · 13 unmodified lines
519519 * read mask register for overlay planes, not image planes).
520520 */
521521 CRX24_SETUP_RAMDAC(fb);
522−
522+
523523 /* change fb->id temporarily to fool SETUP_FB() */
524524 saved_id = fb->id;
525525 fb->id = CRX24_OVERLAY_PLANES;
@@ -565,7 +565,7 @@ setNgleLutBltCtl(struct stifb_info *fb, int offsetWithinLut, int length) · 39 unmodified lines
565565 lutBltCtl.all = 0x80000000;
566566 lutBltCtl.fields.length = length;
567567
568− switch (fb->id)
568+ switch (fb->id)
569569 {
570570 case S9000_ID_A1439A: /* CRX24 */
571571 if (fb->var.bits_per_pixel == 8) {
@@ -576,12 +576,12 @@ setNgleLutBltCtl(struct stifb_info *fb, int offsetWithinLut, int length) · 4 unmodified lines
576576 lutBltCtl.fields.lutOffset = 0 * 256;
577577 }
578578 break;
579−
579+
580580 case S9000_ID_ARTIST:
581581 lutBltCtl.fields.lutType = NGLE_CMAP_INDEXED0_TYPE;
582582 lutBltCtl.fields.lutOffset = 0 * 256;
583583 break;
584−
584+
585585 default:
586586 lutBltCtl.fields.lutType = NGLE_CMAP_INDEXED0_TYPE;
587587 lutBltCtl.fields.lutOffset = 0;
@@ -596,7 +596,7 @@ setNgleLutBltCtl(struct stifb_info *fb, int offsetWithinLut, int length) · 8 unmodified lines
596596 #endif
597597
598598 static NgleLutBltCtl
599−setHyperLutBltCtl(struct stifb_info *fb, int offsetWithinLut, int length)
599+setHyperLutBltCtl(struct stifb_info *fb, int offsetWithinLut, int length)
600600 {
601601 NgleLutBltCtl lutBltCtl;
602602
@@ -633,7 +633,7 @@ static void hyperUndoITE(struct stifb_info *fb) · 30 unmodified lines
633633
634634 /* Hardware setup for full-depth write to "magic" location */
635635 GET_FIFO_SLOTS(fb, nFreeFifoSlots, 7);
636− NGLE_QUICK_SET_DST_BM_ACCESS(fb,
636+ NGLE_QUICK_SET_DST_BM_ACCESS(fb,
637637 BA(IndexedDcd, Otc04, Ots08, AddrLong,
638638 BAJustPoint(0), BINovly, BAIndexBase(0)));
639639 NGLE_QUICK_SET_IMAGE_BITMAP_OP(fb,
@@ -653,13 +653,13 @@ static void hyperUndoITE(struct stifb_info *fb) · 13 unmodified lines
653653 NGLE_UNLOCK(fb);
654654 }
655655
656−static void
656+static void
657657 ngleDepth8_ClearImagePlanes(struct stifb_info *fb)
658658 {
659659 /* FIXME! */
660660 }
661661
662−static void
662+static void
663663 ngleDepth24_ClearImagePlanes(struct stifb_info *fb)
664664 {
665665 /* FIXME! */
@@ -675,7 +675,7 @@ ngleResetAttrPlanes(struct stifb_info *fb, unsigned int ctlPlaneReg) · 9 unmodified lines
675675 NGLE_LOCK(fb);
676676
677677 GET_FIFO_SLOTS(fb, nFreeFifoSlots, 4);
678− NGLE_QUICK_SET_DST_BM_ACCESS(fb,
678+ NGLE_QUICK_SET_DST_BM_ACCESS(fb,
679679 BA(IndexedDcd, Otc32, OtsIndirect,
680680 AddrLong, BAJustPoint(0),
681681 BINattr, BAIndexBase(0)));
@@ -713,22 +713,22 @@ ngleResetAttrPlanes(struct stifb_info *fb, unsigned int ctlPlaneReg) · 31 unmodified lines
713713 /**** Finally, set the Control Plane Register back to zero: ****/
714714 GET_FIFO_SLOTS(fb, nFreeFifoSlots, 1);
715715 NGLE_QUICK_SET_CTL_PLN_REG(fb, 0);
716−
716+
717717 NGLE_UNLOCK(fb);
718718 }
719−
719+
720720 static void
721721 ngleClearOverlayPlanes(struct stifb_info *fb, int mask, int data)
722722 {
723723 int nFreeFifoSlots = 0;
724724 u32 packed_dst;
725725 u32 packed_len;
726−
726+
727727 NGLE_LOCK(fb);
728728
729729 /* Hardware setup */
730730 GET_FIFO_SLOTS(fb, nFreeFifoSlots, 8);
731− NGLE_QUICK_SET_DST_BM_ACCESS(fb,
731+ NGLE_QUICK_SET_DST_BM_ACCESS(fb,
732732 BA(IndexedDcd, Otc04, Ots08, AddrLong,
733733 BAJustPoint(0), BINovly, BAIndexBase(0)));
734734
@@ -736,23 +736,23 @@ ngleClearOverlayPlanes(struct stifb_info *fb, int mask, int data) · 1 unmodified line
736736
737737 NGLE_REALLY_SET_IMAGE_FG_COLOR(fb, data);
738738 NGLE_REALLY_SET_IMAGE_PLANEMASK(fb, mask);
739−
739+
740740 packed_dst = 0;
741741 packed_len = (fb->info.var.xres << 16) | fb->info.var.yres;
742742 NGLE_SET_DSTXY(fb, packed_dst);
743−
744− /* Write zeroes to overlay planes */
743+
744+ /* Write zeroes to overlay planes */
745745 NGLE_QUICK_SET_IMAGE_BITMAP_OP(fb,
746746 IBOvals(RopSrc, MaskAddrOffset(0),
747747 BitmapExtent08, StaticReg(0),
748748 DataDynamic, MaskOtc, BGx(0), FGx(0)));
749−
749+
750750 SET_LENXY_START_RECFILL(fb, packed_len);
751751
752752 NGLE_UNLOCK(fb);
753753 }
754754
755−static void
755+static void
756756 hyperResetPlanes(struct stifb_info *fb, int enable)
757757 {
758758 unsigned int controlPlaneReg;
@@ -783,7 +783,7 @@ hyperResetPlanes(struct stifb_info *fb, int enable) · 24 unmodified lines
783783 ngleClearOverlayPlanes(fb, 0xff, 255);
784784
785785 /**************************************************
786− ** Also need to counteract ITE settings
786+ ** Also need to counteract ITE settings
787787 **************************************************/
788788 hyperUndoITE(fb);
789789 break;
@@ -803,13 +803,13 @@ hyperResetPlanes(struct stifb_info *fb, int enable) · 13 unmodified lines
803803 ngleResetAttrPlanes(fb, controlPlaneReg);
804804 break;
805805 }
806−
806+
807807 NGLE_UNLOCK(fb);
808808 }
809809
810810 /* Return pointer to in-memory structure holding ELK device-dependent ROM values. */
811811
812−static void
812+static void
813813 ngleGetDeviceRomData(struct stifb_info *fb)
814814 {
815815 #if 0
@@ -821,7 +821,7 @@ XXX: FIXME: !!! · 5 unmodified lines
821821 char *pCard8;
822822 int i;
823823 char *mapOrigin = NULL;
824−
824+
825825 int romTableIdx;
826826
827827 pPackedDevRomData = fb->ngle_rom;
@@ -888,7 +888,7 @@ SETUP_HCRX(struct stifb_info *fb) · 60 unmodified lines
888888
889889 /* Initialize Hyperbowl registers */
890890 GET_FIFO_SLOTS(fb, nFreeFifoSlots, 7);
891−
891+
892892 if (IS_24_DEVICE(fb)) {
893893 hyperbowl = (fb->info.var.bits_per_pixel == 32) ?
894894 HYPERBOWL_MODE01_8_24_LUT0_TRANSPARENT_LUT1_OPAQUE :
@@ -897,9 +897,9 @@ SETUP_HCRX(struct stifb_info *fb) · 2 unmodified lines
897897 /* First write to Hyperbowl must happen twice (bug) */
898898 WRITE_WORD(hyperbowl, fb, REG_40);
899899 WRITE_WORD(hyperbowl, fb, REG_40);
900−
900+
901901 WRITE_WORD(HYPERBOWL_MODE2_8_24, fb, REG_39);
902−
902+
903903 WRITE_WORD(0x014c0148, fb, REG_42); /* Set lut 0 to be the direct color */
904904 WRITE_WORD(0x404c4048, fb, REG_43);
905905 WRITE_WORD(0x034c0348, fb, REG_44);
@@ -990,7 +990,7 @@ stifb_setcolreg(u_int regno, u_int red, u_int green, · 84 unmodified lines
990990 0, /* Offset w/i LUT */
991991 256); /* Load entire LUT */
992992 NGLE_BINC_SET_SRCADDR(fb,
993− NGLE_LONG_FB_ADDRESS(0, 0x100, 0));
993+ NGLE_LONG_FB_ADDRESS(0, 0x100, 0));
994994 /* 0x100 is same as used in WRITE_IMAGE_COLOR() */
995995 START_COLORMAPLOAD(fb, lutBltCtl.all);
996996 SETUP_FB(fb);
@@ -1028,7 +1028,7 @@ stifb_blank(int blank_mode, struct fb_info *info) · 31 unmodified lines
10281028 ENABLE_DISABLE_DISPLAY(fb, enable);
10291029 break;
10301030 }
1031−
1031+
10321032 SETUP_FB(fb);
10331033 return 0;
10341034 }
@@ -1114,15 +1114,15 @@ stifb_init_display(struct stifb_info *fb) · 79 unmodified lines
11141114
11151115 /* HCRX specific initialization */
11161116 SETUP_HCRX(fb);
1117−
1117+
11181118 /*
11191119 if (id == S9000_ID_HCRX)
11201120 hyperInitSprite(fb);
11211121 else
11221122 ngleInitSprite(fb);
11231123 */
1124−
1125− /* Initialize the image planes. */
1124+
1125+ /* Initialize the image planes. */
11261126 switch (id) {
11271127 case S9000_ID_HCRX:
11281128 hyperResetPlanes(fb, ENABLE);
@@ -1194,7 +1194,7 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref) · 65 unmodified lines
11941194 fb = kzalloc(sizeof(*fb), GFP_ATOMIC);
11951195 if (!fb)
11961196 return -ENOMEM;
1197−
1197+
11981198 info = &fb->info;
11991199
12001200 /* set struct to a known state */
@@ -1235,7 +1235,7 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref) · 34 unmodified lines
12351235 dev_name, fb->id);
12361236 goto out_err0;
12371237 }
1238−
1238+
12391239 /* default to 8 bpp on most graphic chips */
12401240 bpp = 8;
12411241 xres = sti_onscreen_x(fb->sti);
@@ -1256,7 +1256,7 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref) · 14 unmodified lines
12561256 fb->id = S9000_ID_A1659A;
12571257 break;
12581258 case S9000_ID_TIMBER: /* HP9000/710 Any (may be a grayscale device) */
1259− if (strstr(dev_name, "GRAYSCALE") ||
1259+ if (strstr(dev_name, "GRAYSCALE") ||
12601260 strstr(dev_name, "Grayscale") ||
12611261 strstr(dev_name, "grayscale"))
12621262 var->grayscale = 1;
@@ -1295,16 +1295,16 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref) · 32 unmodified lines
12951295 case CRT_ID_VISUALIZE_EG:
12961296 case S9000_ID_ARTIST: /* Artist */
12971297 break;
1298− default:
1298+ default:
12991299 #ifdef FALLBACK_TO_1BPP
1300− printk(KERN_WARNING
1300+ printk(KERN_WARNING
13011301 "stifb: Unsupported graphics card (id=0x%08x) "
13021302 "- now trying 1bpp mode instead\n",
13031303 fb->id);
13041304 bpp = 1; /* default to 1 bpp */
13051305 break;
13061306 #else
1307− printk(KERN_WARNING
1307+ printk(KERN_WARNING
13081308 "stifb: Unsupported graphics card (id=0x%08x) "
13091309 "- skipping.\n",
13101310 fb->id);
@@ -1320,11 +1320,11 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref) · 9 unmodified lines
13201320 fix->line_length = (fb->sti->glob_cfg->total_x * bpp) / 8;
13211321 if (!fix->line_length)
13221322 fix->line_length = 2048; /* default */
1323−
1323+
13241324 /* limit fbsize to max visible screen size */
13251325 if (fix->smem_len > yres*fix->line_length)
13261326 fix->smem_len = ALIGN(yres*fix->line_length, 4*1024*1024);
1327−
1327+
13281328 fix->accel = FB_ACCEL_NONE;
13291329
13301330 switch (bpp) {
@@ -1350,7 +1350,7 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref) · 19 unmodified lines
13501350 default:
13511351 break;
13521352 }
1353−
1353+
13541354 var->xres = var->xres_virtual = xres;
13551355 var->yres = var->yres_virtual = yres;
13561356 var->bits_per_pixel = bpp;
@@ -1379,7 +1379,7 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref) · 22 unmodified lines
13791379 fix->smem_start, fix->smem_start+fix->smem_len);
13801380 goto out_err2;
13811381 }
1382−
1382+
13831383 if (!request_mem_region(fix->mmio_start, fix->mmio_len, "stifb mmio")) {
13841384 printk(KERN_ERR "stifb: cannot reserve sti mmio region 0x%04lx-0x%04lx\n",
13851385 fix->mmio_start, fix->mmio_start+fix->mmio_len);
@@ -1393,11 +1393,11 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref) · 7 unmodified lines
13931393
13941394 fb_info(&fb->info, "%s %dx%d-%d frame buffer device, %s, id: %04x, mmio: 0x%04lx\n",
13951395 fix->id,
1396− var->xres,
1396+ var->xres,
13971397 var->yres,
13981398 var->bits_per_pixel,
13991399 dev_name,
1400− fb->id,
1400+ fb->id,
14011401 fix->mmio_start);
14021402
14031403 return 0;
@@ -1413,6 +1413,7 @@ out_err1: · 9 unmodified lines
14131413 iounmap(info->screen_base);
14141414 out_err0:
14151415 kfree(fb);
1416+ sti->info = NULL;
14161417 return -ENXIO;
14171418 }
14181419
@@ -1426,7 +1427,7 @@ static int __init stifb_init(void) · 7 unmodified lines
14261427 struct sti_struct *sti;
14271428 struct sti_struct *def_sti;
14281429 int i;
1429−
1430+
14301431 #ifndef MODULE
14311432 char *option = NULL;
14321433
@@ -1438,7 +1439,7 @@ static int __init stifb_init(void) · 5 unmodified lines
14381439 printk(KERN_INFO "stifb: disabled by \"stifb=off\" kernel parameter\n");
14391440 return -ENXIO;
14401441 }
1441−
1442+
14421443 def_sti = sti_get_rom(0);
14431444 if (def_sti) {
14441445 for (i = 1; i <= MAX_STI_ROMS; i++) {
@@ -1472,7 +1473,7 @@ stifb_cleanup(void) · 27 unmodified lines
14721473 {
14731474 struct sti_struct *sti;
14741475 int i;
1475−
1476+
14761477 for (i = 1; i <= MAX_STI_ROMS; i++) {
14771478 sti = sti_get_rom(i);
14781479 if (!sti)
@@ -1495,10 +1496,10 @@ int __init · 16 unmodified lines
14951496 stifb_setup(char *options)
14961497 {
14971498 int i;
1498−
1499+
14991500 if (!options || !*options)
15001501 return 1;
1501−
1502+
15021503 if (strncmp(options, "off", 3) == 0) {
15031504 stifb_disabled = 1;
15041505 options += 3;
drivers/video/fbdev/valkyriefb.c+7−7
@@ -1,7 +1,7 @@
11 /*
22 * valkyriefb.c -- frame buffer device for the PowerMac 'valkyrie' display
33 *
4− * Created 8 August 1998 by
4+ * Created 8 August 1998 by
55 * Martin Costabel <costabel@wanadoo.fr> and Kevin Schoedel
66 *
77 * Vmode-switching changes and vmode 15/17 modifications created 29 August
@@ -77,13 +77,13 @@ struct fb_info_valkyrie { · 69 unmodified lines
7777 struct fb_par_valkyrie par;
7878 struct cmap_regs __iomem *cmap_regs;
7979 unsigned long cmap_regs_phys;
80−
80+
8181 struct valkyrie_regs __iomem *valkyrie_regs;
8282 unsigned long valkyrie_regs_phys;
83−
83+
8484 __u8 __iomem *frame_buffer;
8585 unsigned long frame_buffer_phys;
86−
86+
8787 int sense;
8888 unsigned long total_vram;
8989
@@ -244,7 +244,7 @@ static inline int valkyrie_vram_reqd(int video_mode, int color_mode) · 154 unmodified lines
244244 {
245245 int pitch;
246246 struct valkyrie_regvals *init = valkyrie_reg_init[video_mode-1];
247−
247+
248248 if ((pitch = init->pitch[color_mode]) == 0)
249249 pitch = 2 * init->pitch[0];
250250 return init->vres * pitch;
@@ -467,7 +467,7 @@ static int valkyrie_var_to_par(struct fb_var_screeninfo *var, · 216 unmodified lines
467467 printk(KERN_ERR "valkyriefb: vmode %d not valid.\n", vmode);
468468 return -EINVAL;
469469 }
470−
470+
471471 if (cmode != CMODE_8 && cmode != CMODE_16) {
472472 printk(KERN_ERR "valkyriefb: cmode %d not valid.\n", cmode);
473473 return -EINVAL;
@@ -516,7 +516,7 @@ static void valkyrie_init_fix(struct fb_fix_screeninfo *fix, struct fb_info_valk · 42 unmodified lines
516516 fix->ywrapstep = 0;
517517 fix->ypanstep = 0;
518518 fix->xpanstep = 0;
519−
519+
520520 }
521521
522522 /* Fix must already be inited above */
drivers/video/fbdev/vfb.c+5−5
@@ -111,7 +111,7 @@ static u_long get_line_length(int xres_virtual, int bpp) · 110 unmodified lines
111111 * First part, xxxfb_check_var, must not write anything
112112 * to hardware, it should only verify and adjust var.
113113 * This means it doesn't alter par but it does use hardware
114− * data from it to check this var.
114+ * data from it to check this var.
115115 */
116116
117117 static int vfb_check_var(struct fb_var_screeninfo *var,
@@ -169,7 +169,7 @@ static int vfb_check_var(struct fb_var_screeninfo *var, · 51 unmodified lines
169169
170170 /*
171171 * Now that we checked it we alter var. The reason being is that the video
172− * mode passed in might not work but slight changes to it might make it
172+ * mode passed in might not work but slight changes to it might make it
173173 * work. This way we let the user know what is acceptable.
174174 */
175175 switch (var->bits_per_pixel) {
@@ -235,8 +235,8 @@ static int vfb_check_var(struct fb_var_screeninfo *var, · 59 unmodified lines
235235 }
236236
237237 /* This routine actually sets the video mode. It's in here where we
238− * the hardware state info->par and fix which can be affected by the
239− * change in par. For this driver it doesn't do much.
238+ * the hardware state info->par and fix which can be affected by the
239+ * change in par. For this driver it doesn't do much.
240240 */
241241 static int vfb_set_par(struct fb_info *info)
242242 {
@@ -379,7 +379,7 @@ static int vfb_pan_display(struct fb_var_screeninfo *var, · 136 unmodified lines
379379 }
380380
381381 /*
382− * Most drivers don't need their own mmap function
382+ * Most drivers don't need their own mmap function
383383 */
384384
385385 static int vfb_mmap(struct fb_info *info,