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()

+202 -192
+6 -6
drivers/video/fbdev/68328fb.c
··· 124 124 * First part, xxxfb_check_var, must not write anything 125 125 * to hardware, it should only verify and adjust var. 126 126 * 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. 128 128 */ 129 129 130 130 static int mc68x328fb_check_var(struct fb_var_screeninfo *var, ··· 182 182 183 183 /* 184 184 * 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 186 186 * work. This way we let the user know what is acceptable. 187 187 */ 188 188 switch (var->bits_per_pixel) { ··· 257 257 } 258 258 259 259 /* 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. 262 262 */ 263 263 static int mc68x328fb_set_par(struct fb_info *info) 264 264 { ··· 295 295 * {hardwarespecific} contains width of RAMDAC 296 296 * cmap[X] is programmed to (X << red.offset) | (X << green.offset) | (X << blue.offset) 297 297 * RAMDAC[X] is programmed to (red, green, blue) 298 - * 298 + * 299 299 * Pseudocolor: 300 300 * uses offset = 0 && length = RAMDAC register width. 301 301 * var->{color}.offset is 0 ··· 384 384 } 385 385 386 386 /* 387 - * Most drivers don't need their own mmap function 387 + * Most drivers don't need their own mmap function 388 388 */ 389 389 390 390 static int mc68x328fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
+9 -6
drivers/video/fbdev/arcfb.c
··· 523 523 524 524 info = framebuffer_alloc(sizeof(struct arcfb_par), &dev->dev); 525 525 if (!info) 526 - goto err; 526 + goto err_fb_alloc; 527 527 528 528 info->screen_base = (char __iomem *)videomemory; 529 529 info->fbops = &arcfb_ops; ··· 535 535 536 536 if (!dio_addr || !cio_addr || !c2io_addr) { 537 537 printk(KERN_WARNING "no IO addresses supplied\n"); 538 - goto err1; 538 + goto err_addr; 539 539 } 540 540 par->dio_addr = dio_addr; 541 541 par->cio_addr = cio_addr; ··· 551 551 printk(KERN_INFO 552 552 "arcfb: Failed req IRQ %d\n", par->irq); 553 553 retval = -EBUSY; 554 - goto err1; 554 + goto err_addr; 555 555 } 556 556 } 557 557 retval = register_framebuffer(info); 558 558 if (retval < 0) 559 - goto err1; 559 + goto err_register_fb; 560 560 platform_set_drvdata(dev, info); 561 561 fb_info(info, "Arc frame buffer device, using %dK of video memory\n", 562 562 videomemorysize >> 10); ··· 580 580 } 581 581 582 582 return 0; 583 - err1: 583 + 584 + err_register_fb: 585 + free_irq(par->irq, info); 586 + err_addr: 584 587 framebuffer_release(info); 585 - err: 588 + err_fb_alloc: 586 589 vfree(videomemory); 587 590 return retval; 588 591 }
+1 -1
drivers/video/fbdev/atmel_lcdfb.c
··· 317 317 /** 318 318 * atmel_lcdfb_alloc_video_memory - Allocate framebuffer memory 319 319 * @sinfo: the frame buffer to allocate memory for 320 - * 320 + * 321 321 * This function is called only from the atmel_lcdfb_probe() 322 322 * so no locking by fb_info->mm_lock around smem_len setting is needed. 323 323 */
+1 -1
drivers/video/fbdev/cg14.c
··· 512 512 is_8mb = (resource_size(&op->resource[1]) == (8 * 1024 * 1024)); 513 513 514 514 BUILD_BUG_ON(sizeof(par->mmap_map) != sizeof(__cg14_mmap_map)); 515 - 515 + 516 516 memcpy(&par->mmap_map, &__cg14_mmap_map, sizeof(par->mmap_map)); 517 517 518 518 for (i = 0; i < CG14_MMAP_ENTRIES; i++) {
+17 -17
drivers/video/fbdev/controlfb.c
··· 113 113 struct fb_info info; 114 114 struct fb_par_control par; 115 115 u32 pseudo_palette[16]; 116 - 116 + 117 117 struct cmap_regs __iomem *cmap_regs; 118 118 unsigned long cmap_regs_phys; 119 - 119 + 120 120 struct control_regs __iomem *control_regs; 121 121 unsigned long control_regs_phys; 122 122 unsigned long control_regs_size; 123 - 123 + 124 124 __u8 __iomem *frame_buffer; 125 125 unsigned long frame_buffer_phys; 126 126 unsigned long fb_orig_base; ··· 196 196 while (!req.complete) 197 197 cuda_poll(); 198 198 } 199 - #endif 199 + #endif 200 200 } 201 201 202 202 /* ··· 233 233 if (p->par.xoffset != par->xoffset || 234 234 p->par.yoffset != par->yoffset) 235 235 set_screen_start(par->xoffset, par->yoffset, p); 236 - 236 + 237 237 return; 238 238 } 239 - 239 + 240 240 p->par = *par; 241 241 cmode = p->par.cmode; 242 242 r = &par->regvals; 243 - 243 + 244 244 /* Turn off display */ 245 245 out_le32(CNTRL_REG(p,ctrl), 0x400 | par->ctrl); 246 - 246 + 247 247 set_control_clock(r->clock_params); 248 - 248 + 249 249 RADACAL_WRITE(0x20, r->radacal_ctrl); 250 250 RADACAL_WRITE(0x21, p->control_use_bank2 ? 0 : 1); 251 251 RADACAL_WRITE(0x10, 0); ··· 254 254 rp = &p->control_regs->vswin; 255 255 for (i = 0; i < 16; ++i, ++rp) 256 256 out_le32(&rp->r, r->regs[i]); 257 - 257 + 258 258 out_le32(CNTRL_REG(p,pitch), par->pitch); 259 259 out_le32(CNTRL_REG(p,mode), r->mode); 260 260 out_le32(CNTRL_REG(p,vram_attr), p->vram_attr); ··· 366 366 sense |= (in_le32(CNTRL_REG(p,mon_sense)) & 0x180) >> 7; 367 367 368 368 out_le32(CNTRL_REG(p,mon_sense), 077); /* turn off drivers */ 369 - 369 + 370 370 return sense; 371 371 } 372 372 ··· 558 558 static void control_par_to_var(struct fb_par_control *par, struct fb_var_screeninfo *var) 559 559 { 560 560 struct control_regints *rv; 561 - 561 + 562 562 rv = (struct control_regints *) par->regvals.regs; 563 - 563 + 564 564 memset(var, 0, sizeof(*var)); 565 565 var->xres = par->xres; 566 566 var->yres = par->yres; ··· 568 568 var->yres_virtual = par->vyres; 569 569 var->xoffset = par->xoffset; 570 570 var->yoffset = par->yoffset; 571 - 571 + 572 572 switch(par->cmode) { 573 573 default: 574 574 case CMODE_8: ··· 634 634 635 635 err = control_var_to_par(var, &par, info); 636 636 if (err) 637 - return err; 637 + return err; 638 638 control_par_to_var(&par, var); 639 639 640 640 return 0; ··· 655 655 " control_var_to_par: %d.\n", err); 656 656 return err; 657 657 } 658 - 658 + 659 659 control_set_hardware(p, &par); 660 660 661 661 info->fix.visual = (p->par.cmode == CMODE_8) ? ··· 840 840 int full, sense, vmode, cmode, vyres; 841 841 struct fb_var_screeninfo var; 842 842 int rc; 843 - 843 + 844 844 printk(KERN_INFO "controlfb: "); 845 845 846 846 full = p->total_vram == 0x400000;
+5
drivers/video/fbdev/core/modedb.c
··· 257 257 { NULL, 72, 480, 300, 33386, 40, 24, 11, 19, 80, 3, 0, 258 258 FB_VMODE_DOUBLE }, 259 259 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 + 260 265 /* 1920x1200 @ 60 Hz, 74.5 Khz hsync */ 261 266 { NULL, 60, 1920, 1200, 5177, 128, 336, 1, 38, 208, 3, 262 267 FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+3 -3
drivers/video/fbdev/g364fb.c
··· 6 6 * 7 7 * This driver is based on tgafb.c 8 8 * 9 - * Copyright (C) 1997 Geert Uytterhoeven 9 + * Copyright (C) 1997 Geert Uytterhoeven 10 10 * Copyright (C) 1995 Jay Estabrook 11 11 * 12 12 * This file is subject to the terms and conditions of the GNU General Public ··· 28 28 #include <asm/io.h> 29 29 #include <asm/jazz.h> 30 30 31 - /* 31 + /* 32 32 * Various defines for the G364 33 33 */ 34 34 #define G364_MEM_BASE 0xe4400000 ··· 125 125 * 126 126 * This call looks only at xoffset, yoffset and the FB_VMODE_YWRAP flag 127 127 */ 128 - static int g364fb_pan_display(struct fb_var_screeninfo *var, 128 + static int g364fb_pan_display(struct fb_var_screeninfo *var, 129 129 struct fb_info *info) 130 130 { 131 131 if (var->xoffset ||
+18 -18
drivers/video/fbdev/hgafb.c
··· 1 1 /* 2 2 * linux/drivers/video/hgafb.c -- Hercules graphics adaptor frame buffer device 3 - * 3 + * 4 4 * Created 25 Nov 1999 by Ferenc Bakonyi (fero@drama.obuda.kando.hu) 5 5 * Based on skeletonfb.c by Geert Uytterhoeven and 6 6 * mdacon.c by Andrew Apted ··· 8 8 * History: 9 9 * 10 10 * - 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 13 13 * being detected as Hercules. (Paul G.) 14 14 * - Revision 0.1.6 (17 Aug 2000): new style structs 15 15 * documentation 16 16 * - Revision 0.1.5 (13 Mar 2000): spinlocks instead of saveflags();cli();etc 17 17 * 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 19 19 * HGA-only systems 20 20 * - Revision 0.1.3 (22 Jan 2000): modified for the new fb_info structure 21 21 * screen is cleared after rmmod ··· 143 143 144 144 static void write_hga_b(unsigned int val, unsigned char reg) 145 145 { 146 - outb_p(reg, HGA_INDEX_PORT); 146 + outb_p(reg, HGA_INDEX_PORT); 147 147 outb_p(val, HGA_VALUE_PORT); 148 148 } 149 149 ··· 155 155 156 156 static int test_hga_b(unsigned char val, unsigned char reg) 157 157 { 158 - outb_p(reg, HGA_INDEX_PORT); 158 + outb_p(reg, HGA_INDEX_PORT); 159 159 outb (val, HGA_VALUE_PORT); 160 160 udelay(20); val = (inb_p(HGA_VALUE_PORT) == val); 161 161 return val; ··· 244 244 void __iomem *dest = hga_vram; 245 245 char *logo = linux_logo_bw; 246 246 int x, y; 247 - 247 + 248 248 for (y = 134; y < 134 + 80 ; y++) * this needs some cleanup * 249 249 for (x = 0; x < 10 ; x++) 250 250 writeb(~*(logo++),(dest + HGA_ROWADDR(y) + x + 40)); ··· 255 255 { 256 256 unsigned int base; 257 257 unsigned long flags; 258 - 258 + 259 259 base = (yoffset / 8) * 90 + xoffset; 260 260 spin_lock_irqsave(&hga_reg_lock, flags); 261 261 write_hga_w(base, 0x0c); /* start address */ ··· 310 310 /* Ok, there is definitely a card registering at the correct 311 311 * memory location, so now we do an I/O port test. 312 312 */ 313 - 313 + 314 314 if (!test_hga_b(0x66, 0x0f)) /* cursor low register */ 315 315 goto error; 316 316 ··· 321 321 * bit of the status register is changing. This test lasts for 322 322 * approximately 1/10th of a second. 323 323 */ 324 - 324 + 325 325 p_save = q_save = inb_p(HGA_STATUS_PORT) & HGA_STATUS_VSYNC; 326 326 327 327 for (count=0; count < 50000 && p_save == q_save; count++) { ··· 329 329 udelay(2); 330 330 } 331 331 332 - if (p_save == q_save) 332 + if (p_save == q_save) 333 333 goto error; 334 334 335 335 switch (inb_p(HGA_STATUS_PORT) & 0x70) { ··· 415 415 * @info:pointer to fb_info object containing info for current hga board 416 416 * 417 417 * 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 419 419 * program the hardware. @info->var is updated to the new values. 420 420 * A zero is returned on success and %-EINVAL for failure. 421 421 */ ··· 442 442 * hgafb_blank - (un)blank the screen 443 443 * @blank_mode:blanking method to use 444 444 * @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 448 448 * disabling hsync/vsync: 449 449 * @blank_mode == 2 means suspend vsync, 450 450 * @blank_mode == 3 means suspend hsync, ··· 539 539 .fb_copyarea = hgafb_copyarea, 540 540 .fb_imageblit = hgafb_imageblit, 541 541 }; 542 - 542 + 543 543 /* ------------------------------------------------------------------------- * 544 544 * 545 545 * Functions in fb_info 546 - * 546 + * 547 547 * ------------------------------------------------------------------------- */ 548 548 549 549 /* ------------------------------------------------------------------------- */ 550 - 550 + 551 551 /* 552 552 * Initialization 553 553 */
+4 -4
drivers/video/fbdev/hpfb.c
··· 92 92 93 93 if (regno >= info->cmap.len) 94 94 return 1; 95 - 95 + 96 96 while (in_be16(fb_regs + 0x6002) & 0x4) udelay(1); 97 97 98 98 out_be16(fb_regs + 0x60ba, 0xff); ··· 143 143 out_8(fb_regs + WMOVE, fb_bitmask); 144 144 } 145 145 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) 147 147 { 148 148 topcat_blit(area->sx, area->sy, area->dx, area->dy, area->width, area->height, RR_COPY); 149 149 } ··· 315 315 return ret; 316 316 } 317 317 318 - /* 318 + /* 319 319 * Check that the secondary ID indicates that we have some hope of working with this 320 320 * framebuffer. The catseye boards are pretty much like topcats and we can muddle through. 321 321 */ ··· 323 323 #define topcat_sid_ok(x) (((x) == DIO_ID2_LRCATSEYE) || ((x) == DIO_ID2_HRCCATSEYE) \ 324 324 || ((x) == DIO_ID2_HRMCATSEYE) || ((x) == DIO_ID2_TOPCAT)) 325 325 326 - /* 326 + /* 327 327 * Initialise the framebuffer 328 328 */ 329 329 static int hpfb_dio_probe(struct dio_dev *d, const struct dio_device_id *ent)
+8 -7
drivers/video/fbdev/imsttfb.c
··· 1347 1347 .fb_ioctl = imsttfb_ioctl, 1348 1348 }; 1349 1349 1350 - static void init_imstt(struct fb_info *info) 1350 + static int init_imstt(struct fb_info *info) 1351 1351 { 1352 1352 struct imstt_par *par = info->par; 1353 1353 __u32 i, tmp, *ip, *end; ··· 1420 1420 || !(compute_imstt_regvals(par, info->var.xres, info->var.yres))) { 1421 1421 printk("imsttfb: %ux%ux%u not supported\n", info->var.xres, info->var.yres, info->var.bits_per_pixel); 1422 1422 framebuffer_release(info); 1423 - return; 1423 + return -ENODEV; 1424 1424 } 1425 1425 1426 1426 sprintf(info->fix.id, "IMS TT (%s)", par->ramdac == IBM ? "IBM" : "TVP"); ··· 1456 1456 1457 1457 if (register_framebuffer(info) < 0) { 1458 1458 framebuffer_release(info); 1459 - return; 1459 + return -ENODEV; 1460 1460 } 1461 1461 1462 1462 tmp = (read_reg_le32(par->dc_regs, SSTATUS) & 0x0f00) >> 8; 1463 1463 fb_info(info, "%s frame buffer; %uMB vram; chip version %u\n", 1464 1464 info->fix.id, info->fix.smem_len >> 20, tmp); 1465 + return 0; 1465 1466 } 1466 1467 1467 1468 static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ··· 1530 1529 if (!par->cmap_regs) 1531 1530 goto error; 1532 1531 info->pseudo_palette = par->palette; 1533 - init_imstt(info); 1534 - 1535 - pci_set_drvdata(pdev, info); 1536 - return 0; 1532 + ret = init_imstt(info); 1533 + if (!ret) 1534 + pci_set_drvdata(pdev, info); 1535 + return ret; 1537 1536 1538 1537 error: 1539 1538 if (par->dc_regs)
+5 -5
drivers/video/fbdev/macfb.c
··· 339 339 { 340 340 unsigned long flags; 341 341 int clut_status; 342 - 342 + 343 343 local_irq_save(flags); 344 344 345 345 /* Set the register address */ ··· 439 439 * (according to the entries in the `var' structure). 440 440 * Return non-zero for invalid regno. 441 441 */ 442 - 442 + 443 443 if (regno >= fb_info->cmap.len) 444 444 return 1; 445 445 ··· 548 548 return -ENODEV; 549 549 macfb_setup(option); 550 550 551 - if (!MACH_IS_MAC) 551 + if (!MACH_IS_MAC) 552 552 return -ENODEV; 553 553 554 554 if (mac_bi_data.id == MAC_MODEL_Q630 || ··· 644 644 err = -EINVAL; 645 645 goto fail_unmap; 646 646 } 647 - 647 + 648 648 /* 649 649 * We take a wild guess that if the video physical address is 650 650 * in nubus slot space, that the nubus card is driving video. ··· 774 774 civic_cmap_regs = ioremap(CIVIC_BASE, 0x1000); 775 775 break; 776 776 777 - 777 + 778 778 /* 779 779 * Assorted weirdos 780 780 * We think this may be like the LC II
+1 -1
drivers/video/fbdev/maxinefb.c
··· 138 138 *(volatile unsigned char *)fboff = 0x0; 139 139 140 140 maxinefb_fix.smem_start = fb_start; 141 - 141 + 142 142 /* erase hardware cursor */ 143 143 for (i = 0; i < 512; i++) { 144 144 maxinefb_ims332_write_register(IMS332_REG_CURSOR_RAM + i,
+2 -2
drivers/video/fbdev/p9100.c
··· 65 65 #define P9100_FB_OFF 0x0UL 66 66 67 67 /* 3 bits: 2=8bpp 3=16bpp 5=32bpp 7=24bpp */ 68 - #define SYS_CONFIG_PIXELSIZE_SHIFT 26 68 + #define SYS_CONFIG_PIXELSIZE_SHIFT 26 69 69 70 70 #define SCREENPAINT_TIMECTL1_ENABLE_VIDEO 0x20 /* 0 = off, 1 = on */ 71 71 ··· 110 110 u32 vram_xxx[25]; 111 111 112 112 /* Registers for IBM RGB528 Palette */ 113 - u32 ramdac_cmap_wridx; 113 + u32 ramdac_cmap_wridx; 114 114 u32 ramdac_palette_data; 115 115 u32 ramdac_pixel_mask; 116 116 u32 ramdac_palette_rdaddr;
+15 -15
drivers/video/fbdev/platinumfb.c
··· 52 52 __u8 red, green, blue; 53 53 } palette[256]; 54 54 u32 pseudo_palette[16]; 55 - 55 + 56 56 volatile struct cmap_regs __iomem *cmap_regs; 57 57 unsigned long cmap_regs_phys; 58 - 58 + 59 59 volatile struct platinum_regs __iomem *platinum_regs; 60 60 unsigned long platinum_regs_phys; 61 - 61 + 62 62 __u8 __iomem *frame_buffer; 63 63 volatile __u8 __iomem *base_frame_buffer; 64 64 unsigned long frame_buffer_phys; 65 - 65 + 66 66 unsigned long total_vram; 67 67 int clktype; 68 68 int dactype; ··· 133 133 platinum_set_hardware(pinfo); 134 134 135 135 init = platinum_reg_init[pinfo->vmode-1]; 136 - 136 + 137 137 if ((pinfo->vmode == VMODE_832_624_75) && (pinfo->cmode > CMODE_8)) 138 138 offset = 0x10; 139 139 ··· 214 214 break; 215 215 } 216 216 } 217 - 217 + 218 218 return 0; 219 219 } 220 220 ··· 269 269 struct platinum_regvals *init; 270 270 int i; 271 271 int vmode, cmode; 272 - 272 + 273 273 vmode = pinfo->vmode; 274 274 cmode = pinfo->cmode; 275 275 ··· 436 436 * This routine takes a user-supplied var, and picks the best vmode/cmode from it. 437 437 * It also updates the var structure to the actual mode data obtained 438 438 */ 439 - static int platinum_var_to_par(struct fb_var_screeninfo *var, 439 + static int platinum_var_to_par(struct fb_var_screeninfo *var, 440 440 struct fb_info_platinum *pinfo, 441 441 int check_only) 442 442 { ··· 478 478 pinfo->yoffset = 0; 479 479 pinfo->vxres = pinfo->xres; 480 480 pinfo->vyres = pinfo->yres; 481 - 481 + 482 482 return 0; 483 483 } 484 484 485 485 486 - /* 486 + /* 487 487 * Parse user specified options (`video=platinumfb:') 488 488 */ 489 489 static int __init platinumfb_setup(char *options) ··· 624 624 break; 625 625 } 626 626 dev_set_drvdata(&odev->dev, info); 627 - 627 + 628 628 rc = platinum_init_fb(info); 629 629 if (rc != 0) { 630 630 iounmap(pinfo->frame_buffer); ··· 640 640 { 641 641 struct fb_info *info = dev_get_drvdata(&odev->dev); 642 642 struct fb_info_platinum *pinfo = info->par; 643 - 643 + 644 644 unregister_framebuffer (info); 645 - 645 + 646 646 /* Unmap frame buffer and registers */ 647 647 iounmap(pinfo->frame_buffer); 648 648 iounmap(pinfo->platinum_regs); ··· 656 656 framebuffer_release(info); 657 657 } 658 658 659 - static struct of_device_id platinumfb_match[] = 659 + static struct of_device_id platinumfb_match[] = 660 660 { 661 661 { 662 662 .name = "platinum", ··· 664 664 {}, 665 665 }; 666 666 667 - static struct platform_driver platinum_driver = 667 + static struct platform_driver platinum_driver = 668 668 { 669 669 .driver = { 670 670 .name = "platinumfb",
+16 -16
drivers/video/fbdev/sa1100fb.c
··· 57 57 * - Driver appears to be working for Brutus 320x200x8bpp mode. Other 58 58 * resolutions are working, but only the 8bpp mode is supported. 59 59 * 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. 61 61 * 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. 64 64 * 65 65 * 1999/06/17: 66 66 * - FrameBuffer memory is now allocated at run-time when the 67 - * driver is initialized. 67 + * driver is initialized. 68 68 * 69 69 * 2000/04/10: Nicolas Pitre <nico@fluxnic.net> 70 70 * - Big cleanup for dynamic selection of machine type at run time. ··· 74 74 * 75 75 * 2000/08/07: Tak-Shing Chan <tchan.rd@idthk.com> 76 76 * 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 79 79 * Phase 4 Assabets. Some other parameters were changed to optimize 80 80 * for the Sharp display. 81 81 * ··· 102 102 * 2000/11/23: Eric Peng <ericpeng@coventive.com> 103 103 * - Freebird add 104 104 * 105 - * 2001/02/07: Jamey Hicks <jamey.hicks@compaq.com> 105 + * 2001/02/07: Jamey Hicks <jamey.hicks@compaq.com> 106 106 * Cliff Brake <cbrake@accelent.com> 107 107 * - Added PM callback 108 108 * ··· 500 500 * the shortest recovery time 501 501 * Suspend 502 502 * 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 504 504 * recovery time from this state than from the Stand-by state 505 505 * Off 506 506 * This indicates that the display is consuming the lowest level of power ··· 522 522 */ 523 523 /* 524 524 * 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 526 526 * 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. 528 528 */ 529 529 static int sa1100fb_blank(int blank, struct fb_info *info) 530 530 { ··· 603 603 604 604 /* 605 605 * 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. 608 608 */ 609 609 static int sa1100fb_activate_var(struct fb_var_screeninfo *var, struct sa1100fb_info *fbi) 610 610 { ··· 747 747 * 748 748 * SA1110 spec update nr. 25 says we can and should 749 749 * clear LDD15 to 12 for 4 or 8bpp modes with active 750 - * panels. 750 + * panels. 751 751 */ 752 752 if ((fbi->reg_lccr0 & LCCR0_CMS) == LCCR0_Color && 753 753 (fbi->reg_lccr0 & (LCCR0_Dual|LCCR0_Act)) != 0) { ··· 1020 1020 1021 1021 /* 1022 1022 * 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 1026 1026 * cache. Once this area is remapped, all virtual memory 1027 1027 * access to the video memory should occur at the new region. 1028 1028 */
+79 -78
drivers/video/fbdev/stifb.c
··· 1 1 /* 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 4 4 * STI (standard text interface) video firmware. 5 5 * 6 6 * Copyright (C) 2001-2006 Helge Deller <deller@gmx.de> 7 7 * Portions Copyright (C) 2001 Thomas Bogendoerfer <tsbogend@alpha.franken.de> 8 - * 8 + * 9 9 * Based on: 10 10 * - linux/drivers/video/artistfb.c -- Artist frame buffer driver 11 11 * Copyright (C) 2000 Philipp Rumpf <prumpf@tux.org> ··· 14 14 * - HP Xhp cfb-based X11 window driver for XFree86 15 15 * (c)Copyright 1992 Hewlett-Packard Co. 16 16 * 17 - * 17 + * 18 18 * The following graphics display devices (NGLE family) are supported by this driver: 19 19 * 20 20 * HPA4070A known as "HCRX", a 1280x1024 color device with 8 planes ··· 30 30 * supports 1280x1024 color displays with 8 planes. 31 31 * HP710G same as HP710C, 1280x1024 grayscale only 32 32 * 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, 34 34 * 1024x768 or 1280x1024 color displays on 8 planes (Artist) 35 35 * 36 36 * This file is subject to the terms and conditions of the GNU General Public ··· 92 92 __s32 misc_video_end; 93 93 } video_setup_t; 94 94 95 - typedef struct { 95 + typedef struct { 96 96 __s16 sizeof_ngle_data; 97 97 __s16 x_size_visible; /* visible screen dim in pixels */ 98 98 __s16 y_size_visible; ··· 177 177 #endif /* DEBUG_STIFB_REGS */ 178 178 179 179 180 - #define ENABLE 1 /* for enabling/disabling screen */ 180 + #define ENABLE 1 /* for enabling/disabling screen */ 181 181 #define DISABLE 0 182 182 183 - #define NGLE_LOCK(fb_info) do { } while (0) 183 + #define NGLE_LOCK(fb_info) do { } while (0) 184 184 #define NGLE_UNLOCK(fb_info) do { } while (0) 185 185 186 186 static void ··· 198 198 199 199 static void 200 200 SETUP_FB(struct stifb_info *fb) 201 - { 201 + { 202 202 unsigned int reg10_value = 0; 203 - 203 + 204 204 SETUP_HW(fb); 205 205 switch (fb->id) 206 206 { ··· 210 210 reg10_value = 0x13601000; 211 211 break; 212 212 case S9000_ID_A1439A: 213 - if (fb->info.var.bits_per_pixel == 32) 213 + if (fb->info.var.bits_per_pixel == 32) 214 214 reg10_value = 0xBBA0A000; 215 - else 215 + else 216 216 reg10_value = 0x13601000; 217 217 break; 218 218 case S9000_ID_HCRX: 219 219 if (fb->info.var.bits_per_pixel == 32) 220 220 reg10_value = 0xBBA0A000; 221 - else 221 + else 222 222 reg10_value = 0x13602000; 223 223 break; 224 224 case S9000_ID_TIMBER: ··· 243 243 } 244 244 245 245 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) 247 247 { 248 248 SETUP_HW(fb); 249 249 WRITE_WORD(((0x100+index)<<2), fb, REG_3); ··· 251 251 } 252 252 253 253 static void 254 - FINISH_IMAGE_COLORMAP_ACCESS(struct stifb_info *fb) 255 - { 254 + FINISH_IMAGE_COLORMAP_ACCESS(struct stifb_info *fb) 255 + { 256 256 WRITE_WORD(0x400, fb, REG_2); 257 257 if (fb->info.var.bits_per_pixel == 32) { 258 258 WRITE_WORD(0x83000100, fb, REG_1); 259 259 } else { 260 260 if (fb->id == S9000_ID_ARTIST || fb->id == CRT_ID_VISUALIZE_EG) 261 261 WRITE_WORD(0x80000100, fb, REG_26); 262 - else 262 + else 263 263 WRITE_WORD(0x80000100, fb, REG_1); 264 264 } 265 265 SETUP_FB(fb); 266 266 } 267 267 268 268 static void 269 - SETUP_RAMDAC(struct stifb_info *fb) 269 + SETUP_RAMDAC(struct stifb_info *fb) 270 270 { 271 271 SETUP_HW(fb); 272 272 WRITE_WORD(0x04000000, fb, 0x1020); 273 273 WRITE_WORD(0xff000000, fb, 0x1028); 274 274 } 275 275 276 - static void 277 - CRX24_SETUP_RAMDAC(struct stifb_info *fb) 276 + static void 277 + CRX24_SETUP_RAMDAC(struct stifb_info *fb) 278 278 { 279 279 SETUP_HW(fb); 280 280 WRITE_WORD(0x04000000, fb, 0x1000); ··· 286 286 } 287 287 288 288 #if 0 289 - static void 289 + static void 290 290 HCRX_SETUP_RAMDAC(struct stifb_info *fb) 291 291 { 292 292 WRITE_WORD(0xffffffff, fb, REG_32); 293 293 } 294 294 #endif 295 295 296 - static void 296 + static void 297 297 CRX24_SET_OVLY_MASK(struct stifb_info *fb) 298 298 { 299 299 SETUP_HW(fb); ··· 314 314 WRITE_WORD(value, fb, 0x1038); 315 315 } 316 316 317 - static void 317 + static void 318 318 CRX24_ENABLE_DISABLE_DISPLAY(struct stifb_info *fb, int enable) 319 319 { 320 320 unsigned int value = enable ? 0x10000000 : 0x30000000; ··· 325 325 } 326 326 327 327 static void 328 - ARTIST_ENABLE_DISABLE_DISPLAY(struct stifb_info *fb, int enable) 328 + ARTIST_ENABLE_DISABLE_DISPLAY(struct stifb_info *fb, int enable) 329 329 { 330 330 u32 DregsMiscVideo = REG_21; 331 331 u32 DregsMiscCtl = REG_27; 332 - 332 + 333 333 SETUP_HW(fb); 334 334 if (enable) { 335 335 WRITE_WORD(READ_WORD(fb, DregsMiscVideo) | 0x0A000000, fb, DregsMiscVideo); ··· 344 344 (READ_BYTE(fb, REG_16b3) - 1) 345 345 346 346 #define HYPER_CONFIG_PLANES_24 0x00000100 347 - 347 + 348 348 #define IS_24_DEVICE(fb) \ 349 349 (fb->deviceSpecificConfig & HYPER_CONFIG_PLANES_24) 350 350 ··· 470 470 } 471 471 472 472 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) 474 474 { 475 - /* REG_6 seems to have special values when run on a 475 + /* REG_6 seems to have special values when run on a 476 476 RDI precisionbook parisc laptop (INTERNAL_EG_DX1024 or 477 477 INTERNAL_EG_X1024). The values are: 478 478 0x2f0: internal (LCD) & external display enabled 479 479 0x2a0: external display only 480 480 0x000: zero on standard artist graphic cards 481 - */ 481 + */ 482 482 WRITE_WORD(0x00000000, fb, REG_6); 483 483 WRITE_WORD((width<<16) | height, fb, REG_9); 484 484 WRITE_WORD(0x05000000, fb, REG_6); ··· 486 486 } 487 487 488 488 static void 489 - FINISH_ATTR_ACCESS(struct stifb_info *fb) 489 + FINISH_ATTR_ACCESS(struct stifb_info *fb) 490 490 { 491 491 SETUP_HW(fb); 492 492 WRITE_WORD(0x00000000, fb, REG_12); ··· 499 499 SETUP_FB(fb); 500 500 } 501 501 502 - static void 502 + static void 503 503 ngleSetupAttrPlanes(struct stifb_info *fb, int BufferNumber) 504 504 { 505 505 SETUP_ATTR_ACCESS(fb, BufferNumber); ··· 519 519 * read mask register for overlay planes, not image planes). 520 520 */ 521 521 CRX24_SETUP_RAMDAC(fb); 522 - 522 + 523 523 /* change fb->id temporarily to fool SETUP_FB() */ 524 524 saved_id = fb->id; 525 525 fb->id = CRX24_OVERLAY_PLANES; ··· 565 565 lutBltCtl.all = 0x80000000; 566 566 lutBltCtl.fields.length = length; 567 567 568 - switch (fb->id) 568 + switch (fb->id) 569 569 { 570 570 case S9000_ID_A1439A: /* CRX24 */ 571 571 if (fb->var.bits_per_pixel == 8) { ··· 576 576 lutBltCtl.fields.lutOffset = 0 * 256; 577 577 } 578 578 break; 579 - 579 + 580 580 case S9000_ID_ARTIST: 581 581 lutBltCtl.fields.lutType = NGLE_CMAP_INDEXED0_TYPE; 582 582 lutBltCtl.fields.lutOffset = 0 * 256; 583 583 break; 584 - 584 + 585 585 default: 586 586 lutBltCtl.fields.lutType = NGLE_CMAP_INDEXED0_TYPE; 587 587 lutBltCtl.fields.lutOffset = 0; ··· 596 596 #endif 597 597 598 598 static NgleLutBltCtl 599 - setHyperLutBltCtl(struct stifb_info *fb, int offsetWithinLut, int length) 599 + setHyperLutBltCtl(struct stifb_info *fb, int offsetWithinLut, int length) 600 600 { 601 601 NgleLutBltCtl lutBltCtl; 602 602 ··· 633 633 634 634 /* Hardware setup for full-depth write to "magic" location */ 635 635 GET_FIFO_SLOTS(fb, nFreeFifoSlots, 7); 636 - NGLE_QUICK_SET_DST_BM_ACCESS(fb, 636 + NGLE_QUICK_SET_DST_BM_ACCESS(fb, 637 637 BA(IndexedDcd, Otc04, Ots08, AddrLong, 638 638 BAJustPoint(0), BINovly, BAIndexBase(0))); 639 639 NGLE_QUICK_SET_IMAGE_BITMAP_OP(fb, ··· 653 653 NGLE_UNLOCK(fb); 654 654 } 655 655 656 - static void 656 + static void 657 657 ngleDepth8_ClearImagePlanes(struct stifb_info *fb) 658 658 { 659 659 /* FIXME! */ 660 660 } 661 661 662 - static void 662 + static void 663 663 ngleDepth24_ClearImagePlanes(struct stifb_info *fb) 664 664 { 665 665 /* FIXME! */ ··· 675 675 NGLE_LOCK(fb); 676 676 677 677 GET_FIFO_SLOTS(fb, nFreeFifoSlots, 4); 678 - NGLE_QUICK_SET_DST_BM_ACCESS(fb, 678 + NGLE_QUICK_SET_DST_BM_ACCESS(fb, 679 679 BA(IndexedDcd, Otc32, OtsIndirect, 680 680 AddrLong, BAJustPoint(0), 681 681 BINattr, BAIndexBase(0))); ··· 713 713 /**** Finally, set the Control Plane Register back to zero: ****/ 714 714 GET_FIFO_SLOTS(fb, nFreeFifoSlots, 1); 715 715 NGLE_QUICK_SET_CTL_PLN_REG(fb, 0); 716 - 716 + 717 717 NGLE_UNLOCK(fb); 718 718 } 719 - 719 + 720 720 static void 721 721 ngleClearOverlayPlanes(struct stifb_info *fb, int mask, int data) 722 722 { 723 723 int nFreeFifoSlots = 0; 724 724 u32 packed_dst; 725 725 u32 packed_len; 726 - 726 + 727 727 NGLE_LOCK(fb); 728 728 729 729 /* Hardware setup */ 730 730 GET_FIFO_SLOTS(fb, nFreeFifoSlots, 8); 731 - NGLE_QUICK_SET_DST_BM_ACCESS(fb, 731 + NGLE_QUICK_SET_DST_BM_ACCESS(fb, 732 732 BA(IndexedDcd, Otc04, Ots08, AddrLong, 733 733 BAJustPoint(0), BINovly, BAIndexBase(0))); 734 734 ··· 736 736 737 737 NGLE_REALLY_SET_IMAGE_FG_COLOR(fb, data); 738 738 NGLE_REALLY_SET_IMAGE_PLANEMASK(fb, mask); 739 - 739 + 740 740 packed_dst = 0; 741 741 packed_len = (fb->info.var.xres << 16) | fb->info.var.yres; 742 742 NGLE_SET_DSTXY(fb, packed_dst); 743 - 744 - /* Write zeroes to overlay planes */ 743 + 744 + /* Write zeroes to overlay planes */ 745 745 NGLE_QUICK_SET_IMAGE_BITMAP_OP(fb, 746 746 IBOvals(RopSrc, MaskAddrOffset(0), 747 747 BitmapExtent08, StaticReg(0), 748 748 DataDynamic, MaskOtc, BGx(0), FGx(0))); 749 - 749 + 750 750 SET_LENXY_START_RECFILL(fb, packed_len); 751 751 752 752 NGLE_UNLOCK(fb); 753 753 } 754 754 755 - static void 755 + static void 756 756 hyperResetPlanes(struct stifb_info *fb, int enable) 757 757 { 758 758 unsigned int controlPlaneReg; ··· 783 783 ngleClearOverlayPlanes(fb, 0xff, 255); 784 784 785 785 /************************************************** 786 - ** Also need to counteract ITE settings 786 + ** Also need to counteract ITE settings 787 787 **************************************************/ 788 788 hyperUndoITE(fb); 789 789 break; ··· 803 803 ngleResetAttrPlanes(fb, controlPlaneReg); 804 804 break; 805 805 } 806 - 806 + 807 807 NGLE_UNLOCK(fb); 808 808 } 809 809 810 810 /* Return pointer to in-memory structure holding ELK device-dependent ROM values. */ 811 811 812 - static void 812 + static void 813 813 ngleGetDeviceRomData(struct stifb_info *fb) 814 814 { 815 815 #if 0 ··· 821 821 char *pCard8; 822 822 int i; 823 823 char *mapOrigin = NULL; 824 - 824 + 825 825 int romTableIdx; 826 826 827 827 pPackedDevRomData = fb->ngle_rom; ··· 888 888 889 889 /* Initialize Hyperbowl registers */ 890 890 GET_FIFO_SLOTS(fb, nFreeFifoSlots, 7); 891 - 891 + 892 892 if (IS_24_DEVICE(fb)) { 893 893 hyperbowl = (fb->info.var.bits_per_pixel == 32) ? 894 894 HYPERBOWL_MODE01_8_24_LUT0_TRANSPARENT_LUT1_OPAQUE : ··· 897 897 /* First write to Hyperbowl must happen twice (bug) */ 898 898 WRITE_WORD(hyperbowl, fb, REG_40); 899 899 WRITE_WORD(hyperbowl, fb, REG_40); 900 - 900 + 901 901 WRITE_WORD(HYPERBOWL_MODE2_8_24, fb, REG_39); 902 - 902 + 903 903 WRITE_WORD(0x014c0148, fb, REG_42); /* Set lut 0 to be the direct color */ 904 904 WRITE_WORD(0x404c4048, fb, REG_43); 905 905 WRITE_WORD(0x034c0348, fb, REG_44); ··· 990 990 0, /* Offset w/i LUT */ 991 991 256); /* Load entire LUT */ 992 992 NGLE_BINC_SET_SRCADDR(fb, 993 - NGLE_LONG_FB_ADDRESS(0, 0x100, 0)); 993 + NGLE_LONG_FB_ADDRESS(0, 0x100, 0)); 994 994 /* 0x100 is same as used in WRITE_IMAGE_COLOR() */ 995 995 START_COLORMAPLOAD(fb, lutBltCtl.all); 996 996 SETUP_FB(fb); ··· 1028 1028 ENABLE_DISABLE_DISPLAY(fb, enable); 1029 1029 break; 1030 1030 } 1031 - 1031 + 1032 1032 SETUP_FB(fb); 1033 1033 return 0; 1034 1034 } ··· 1114 1114 1115 1115 /* HCRX specific initialization */ 1116 1116 SETUP_HCRX(fb); 1117 - 1117 + 1118 1118 /* 1119 1119 if (id == S9000_ID_HCRX) 1120 1120 hyperInitSprite(fb); 1121 1121 else 1122 1122 ngleInitSprite(fb); 1123 1123 */ 1124 - 1125 - /* Initialize the image planes. */ 1124 + 1125 + /* Initialize the image planes. */ 1126 1126 switch (id) { 1127 1127 case S9000_ID_HCRX: 1128 1128 hyperResetPlanes(fb, ENABLE); ··· 1194 1194 fb = kzalloc(sizeof(*fb), GFP_ATOMIC); 1195 1195 if (!fb) 1196 1196 return -ENOMEM; 1197 - 1197 + 1198 1198 info = &fb->info; 1199 1199 1200 1200 /* set struct to a known state */ ··· 1235 1235 dev_name, fb->id); 1236 1236 goto out_err0; 1237 1237 } 1238 - 1238 + 1239 1239 /* default to 8 bpp on most graphic chips */ 1240 1240 bpp = 8; 1241 1241 xres = sti_onscreen_x(fb->sti); ··· 1256 1256 fb->id = S9000_ID_A1659A; 1257 1257 break; 1258 1258 case S9000_ID_TIMBER: /* HP9000/710 Any (may be a grayscale device) */ 1259 - if (strstr(dev_name, "GRAYSCALE") || 1259 + if (strstr(dev_name, "GRAYSCALE") || 1260 1260 strstr(dev_name, "Grayscale") || 1261 1261 strstr(dev_name, "grayscale")) 1262 1262 var->grayscale = 1; ··· 1295 1295 case CRT_ID_VISUALIZE_EG: 1296 1296 case S9000_ID_ARTIST: /* Artist */ 1297 1297 break; 1298 - default: 1298 + default: 1299 1299 #ifdef FALLBACK_TO_1BPP 1300 - printk(KERN_WARNING 1300 + printk(KERN_WARNING 1301 1301 "stifb: Unsupported graphics card (id=0x%08x) " 1302 1302 "- now trying 1bpp mode instead\n", 1303 1303 fb->id); 1304 1304 bpp = 1; /* default to 1 bpp */ 1305 1305 break; 1306 1306 #else 1307 - printk(KERN_WARNING 1307 + printk(KERN_WARNING 1308 1308 "stifb: Unsupported graphics card (id=0x%08x) " 1309 1309 "- skipping.\n", 1310 1310 fb->id); ··· 1320 1320 fix->line_length = (fb->sti->glob_cfg->total_x * bpp) / 8; 1321 1321 if (!fix->line_length) 1322 1322 fix->line_length = 2048; /* default */ 1323 - 1323 + 1324 1324 /* limit fbsize to max visible screen size */ 1325 1325 if (fix->smem_len > yres*fix->line_length) 1326 1326 fix->smem_len = ALIGN(yres*fix->line_length, 4*1024*1024); 1327 - 1327 + 1328 1328 fix->accel = FB_ACCEL_NONE; 1329 1329 1330 1330 switch (bpp) { ··· 1350 1350 default: 1351 1351 break; 1352 1352 } 1353 - 1353 + 1354 1354 var->xres = var->xres_virtual = xres; 1355 1355 var->yres = var->yres_virtual = yres; 1356 1356 var->bits_per_pixel = bpp; ··· 1379 1379 fix->smem_start, fix->smem_start+fix->smem_len); 1380 1380 goto out_err2; 1381 1381 } 1382 - 1382 + 1383 1383 if (!request_mem_region(fix->mmio_start, fix->mmio_len, "stifb mmio")) { 1384 1384 printk(KERN_ERR "stifb: cannot reserve sti mmio region 0x%04lx-0x%04lx\n", 1385 1385 fix->mmio_start, fix->mmio_start+fix->mmio_len); ··· 1393 1393 1394 1394 fb_info(&fb->info, "%s %dx%d-%d frame buffer device, %s, id: %04x, mmio: 0x%04lx\n", 1395 1395 fix->id, 1396 - var->xres, 1396 + var->xres, 1397 1397 var->yres, 1398 1398 var->bits_per_pixel, 1399 1399 dev_name, 1400 - fb->id, 1400 + fb->id, 1401 1401 fix->mmio_start); 1402 1402 1403 1403 return 0; ··· 1413 1413 iounmap(info->screen_base); 1414 1414 out_err0: 1415 1415 kfree(fb); 1416 + sti->info = NULL; 1416 1417 return -ENXIO; 1417 1418 } 1418 1419 ··· 1427 1426 struct sti_struct *sti; 1428 1427 struct sti_struct *def_sti; 1429 1428 int i; 1430 - 1429 + 1431 1430 #ifndef MODULE 1432 1431 char *option = NULL; 1433 1432 ··· 1439 1438 printk(KERN_INFO "stifb: disabled by \"stifb=off\" kernel parameter\n"); 1440 1439 return -ENXIO; 1441 1440 } 1442 - 1441 + 1443 1442 def_sti = sti_get_rom(0); 1444 1443 if (def_sti) { 1445 1444 for (i = 1; i <= MAX_STI_ROMS; i++) { ··· 1473 1472 { 1474 1473 struct sti_struct *sti; 1475 1474 int i; 1476 - 1475 + 1477 1476 for (i = 1; i <= MAX_STI_ROMS; i++) { 1478 1477 sti = sti_get_rom(i); 1479 1478 if (!sti) ··· 1496 1495 stifb_setup(char *options) 1497 1496 { 1498 1497 int i; 1499 - 1498 + 1500 1499 if (!options || !*options) 1501 1500 return 1; 1502 - 1501 + 1503 1502 if (strncmp(options, "off", 3) == 0) { 1504 1503 stifb_disabled = 1; 1505 1504 options += 3;
+7 -7
drivers/video/fbdev/valkyriefb.c
··· 1 1 /* 2 2 * valkyriefb.c -- frame buffer device for the PowerMac 'valkyrie' display 3 3 * 4 - * Created 8 August 1998 by 4 + * Created 8 August 1998 by 5 5 * Martin Costabel <costabel@wanadoo.fr> and Kevin Schoedel 6 6 * 7 7 * Vmode-switching changes and vmode 15/17 modifications created 29 August ··· 77 77 struct fb_par_valkyrie par; 78 78 struct cmap_regs __iomem *cmap_regs; 79 79 unsigned long cmap_regs_phys; 80 - 80 + 81 81 struct valkyrie_regs __iomem *valkyrie_regs; 82 82 unsigned long valkyrie_regs_phys; 83 - 83 + 84 84 __u8 __iomem *frame_buffer; 85 85 unsigned long frame_buffer_phys; 86 - 86 + 87 87 int sense; 88 88 unsigned long total_vram; 89 89 ··· 244 244 { 245 245 int pitch; 246 246 struct valkyrie_regvals *init = valkyrie_reg_init[video_mode-1]; 247 - 247 + 248 248 if ((pitch = init->pitch[color_mode]) == 0) 249 249 pitch = 2 * init->pitch[0]; 250 250 return init->vres * pitch; ··· 467 467 printk(KERN_ERR "valkyriefb: vmode %d not valid.\n", vmode); 468 468 return -EINVAL; 469 469 } 470 - 470 + 471 471 if (cmode != CMODE_8 && cmode != CMODE_16) { 472 472 printk(KERN_ERR "valkyriefb: cmode %d not valid.\n", cmode); 473 473 return -EINVAL; ··· 516 516 fix->ywrapstep = 0; 517 517 fix->ypanstep = 0; 518 518 fix->xpanstep = 0; 519 - 519 + 520 520 } 521 521 522 522 /* Fix must already be inited above */
+5 -5
drivers/video/fbdev/vfb.c
··· 111 111 * First part, xxxfb_check_var, must not write anything 112 112 * to hardware, it should only verify and adjust var. 113 113 * 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. 115 115 */ 116 116 117 117 static int vfb_check_var(struct fb_var_screeninfo *var, ··· 169 169 170 170 /* 171 171 * 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 173 173 * work. This way we let the user know what is acceptable. 174 174 */ 175 175 switch (var->bits_per_pixel) { ··· 235 235 } 236 236 237 237 /* 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. 240 240 */ 241 241 static int vfb_set_par(struct fb_info *info) 242 242 { ··· 379 379 } 380 380 381 381 /* 382 - * Most drivers don't need their own mmap function 382 + * Most drivers don't need their own mmap function 383 383 */ 384 384 385 385 static int vfb_mmap(struct fb_info *info,