diff options
Diffstat (limited to 'drivers/video/fbdev/aty')
-rw-r--r-- | drivers/video/fbdev/aty/aty128fb.c | 52 | ||||
-rw-r--r-- | drivers/video/fbdev/aty/radeon_base.c | 66 |
2 files changed, 59 insertions, 59 deletions
diff --git a/drivers/video/fbdev/aty/aty128fb.c b/drivers/video/fbdev/aty/aty128fb.c index b26c81233b6b..5cdbbba2a013 100644 --- a/drivers/video/fbdev/aty/aty128fb.c +++ b/drivers/video/fbdev/aty/aty128fb.c @@ -23,7 +23,7 @@ * - Convert to new framebuffer API, * fix colormap setting at 16 bits/pixel (565) * - * Paul Mundt + * Paul Mundt * - PCI hotplug * * Jon Smirl <jonsmirl@yahoo.com> @@ -520,13 +520,13 @@ static const struct fb_ops aty128fb_ops = { * - endian conversions may possibly be avoided by * using the other register aperture. TODO. */ -static inline u32 _aty_ld_le32(volatile unsigned int regindex, +static inline u32 _aty_ld_le32(volatile unsigned int regindex, const struct aty128fb_par *par) { return readl (par->regbase + regindex); } -static inline void _aty_st_le32(volatile unsigned int regindex, u32 val, +static inline void _aty_st_le32(volatile unsigned int regindex, u32 val, const struct aty128fb_par *par) { writel (val, par->regbase + regindex); @@ -559,12 +559,12 @@ static inline void _aty_st_8(unsigned int regindex, u8 val, static u32 _aty_ld_pll(unsigned int pll_index, const struct aty128fb_par *par) -{ +{ aty_st_8(CLOCK_CNTL_INDEX, pll_index & 0x3F); return aty_ld_le32(CLOCK_CNTL_DATA); } - + static void _aty_st_pll(unsigned int pll_index, u32 val, const struct aty128fb_par *par) { @@ -619,7 +619,7 @@ static int register_test(const struct aty128fb_par *par) aty_st_le32(BIOS_0_SCRATCH, 0xAAAAAAAA); if (aty_ld_le32(BIOS_0_SCRATCH) == 0xAAAAAAAA) - flag = 1; + flag = 1; } aty_st_le32(BIOS_0_SCRATCH, val); // restore value @@ -901,7 +901,7 @@ static void aty128_get_pllinfo(struct aty128fb_par *par, bios_hdr = BIOS_IN16(0x48); bios_pll = BIOS_IN16(bios_hdr + 0x30); - + par->constants.ppll_max = BIOS_IN32(bios_pll + 0x16); par->constants.ppll_min = BIOS_IN32(bios_pll + 0x12); par->constants.xclk = BIOS_IN16(bios_pll + 0x08); @@ -913,7 +913,7 @@ static void aty128_get_pllinfo(struct aty128fb_par *par, par->constants.xclk, par->constants.ref_divider, par->constants.ref_clk); -} +} #ifdef CONFIG_X86 static void __iomem *aty128_find_mem_vbios(struct aty128fb_par *par) @@ -925,7 +925,7 @@ static void __iomem *aty128_find_mem_vbios(struct aty128fb_par *par) */ u32 segstart; unsigned char __iomem *rom_base = NULL; - + for (segstart=0x000c0000; segstart<0x000f0000; segstart+=0x00001000) { rom_base = ioremap(segstart, 0x10000); if (rom_base == NULL) @@ -1118,12 +1118,12 @@ static int aty128_var_to_crtc(const struct fb_var_screeninfo *var, v_sync_wid = 1; else if (v_sync_wid > 0x1f) /* 0x1f = max vwidth */ v_sync_wid = 0x1f; - + v_sync_strt = v_disp + lower; h_sync_pol = sync & FB_SYNC_HOR_HIGH_ACT ? 0 : 1; v_sync_pol = sync & FB_SYNC_VERT_HIGH_ACT ? 0 : 1; - + c_sync = sync & FB_SYNC_COMP_HIGH_ACT ? (1 << 4) : 0; crtc->gen_cntl = 0x3000000L | c_sync | (dst << 8); @@ -1301,11 +1301,11 @@ static void aty128_set_lcd_enable(struct aty128fb_par *par, int on) aty_st_le32(LVDS_GEN_CNTL, reg); #ifdef CONFIG_FB_ATY128_BACKLIGHT aty128_bl_set_power(info, FB_BLANK_UNBLANK); -#endif +#endif } else { #ifdef CONFIG_FB_ATY128_BACKLIGHT aty128_bl_set_power(info, FB_BLANK_POWERDOWN); -#endif +#endif reg = aty_ld_le32(LVDS_GEN_CNTL); reg |= LVDS_DISPLAY_DIS; aty_st_le32(LVDS_GEN_CNTL, reg); @@ -1481,7 +1481,7 @@ static int aty128_ddafifo(struct aty128_ddafifo *dsp, * This actually sets the video mode. */ static int aty128fb_set_par(struct fb_info *info) -{ +{ struct aty128fb_par *par = info->par; u32 config; int err; @@ -1595,7 +1595,7 @@ static int aty128_encode_var(struct fb_var_screeninfo *var, var->accel_flags = par->accel_flags; return 0; -} +} static int aty128fb_check_var(struct fb_var_screeninfo *var, @@ -1979,12 +1979,12 @@ static int aty128_init(struct pci_dev *pdev, const struct pci_device_id *ent) /* PowerBook Titanium */ if (of_machine_is_compatible("PowerBook3,2")) default_vmode = VMODE_1152_768_60; - - if (default_cmode > 16) + + if (default_cmode > 16) default_cmode = CMODE_32; - else if (default_cmode > 8) + else if (default_cmode > 8) default_cmode = CMODE_16; - else + else default_cmode = CMODE_8; if (mac_vmode_to_var(default_vmode, default_cmode, &var)) @@ -1994,7 +1994,7 @@ static int aty128_init(struct pci_dev *pdev, const struct pci_device_id *ent) #endif /* CONFIG_PPC_PMAC */ { if (mode_option) - if (fb_find_mode(&var, info, mode_option, NULL, + if (fb_find_mode(&var, info, mode_option, NULL, 0, &defaultmode, 8) == 0) var = default_var; } @@ -2301,7 +2301,7 @@ static int aty128fb_ioctl(struct fb_info *info, u_int cmd, u_long arg) struct aty128fb_par *par = info->par; u32 value; int rc; - + switch (cmd) { case FBIO_ATY128_SET_MIRROR: if (par->chip_gen != rage_M3) @@ -2313,8 +2313,8 @@ static int aty128fb_ioctl(struct fb_info *info, u_int cmd, u_long arg) par->crt_on = (value & 0x02) != 0; if (!par->crt_on && !par->lcd_on) par->lcd_on = 1; - aty128_set_crt_enable(par, par->crt_on); - aty128_set_lcd_enable(par, par->lcd_on); + aty128_set_crt_enable(par, par->crt_on); + aty128_set_lcd_enable(par, par->lcd_on); return 0; case FBIO_ATY128_GET_MIRROR: if (par->chip_gen != rage_M3) @@ -2331,7 +2331,7 @@ static void aty128_set_suspend(struct aty128fb_par *par, int suspend) if (!par->pdev->pm_cap) return; - + /* Set the chip into the appropriate suspend mode (we use D2, * D3 would require a complete re-initialisation of the chip, * including PCI config registers, clocks, AGP configuration, ...) @@ -2376,12 +2376,12 @@ static int aty128_pci_suspend_late(struct device *dev, pm_message_t state) */ return 0; #endif /* CONFIG_PPC_PMAC */ - + if (state.event == pdev->dev.power.power_state.event) return 0; printk(KERN_DEBUG "aty128fb: suspending...\n"); - + console_lock(); fb_set_suspend(info, 1); diff --git a/drivers/video/fbdev/aty/radeon_base.c b/drivers/video/fbdev/aty/radeon_base.c index 6851f47613e1..b311c07fe66d 100644 --- a/drivers/video/fbdev/aty/radeon_base.c +++ b/drivers/video/fbdev/aty/radeon_base.c @@ -7,7 +7,7 @@ * Copyright 2000 Ani Joshi <ajoshi@kernel.crashing.org> * * i2c bits from Luca Tettamanti <kronos@kronoz.cjb.net> - * + * * Special thanks to ATI DevRel team for their hardware donations. * * ...Insert GPL boilerplate here... @@ -110,7 +110,7 @@ static const struct pci_device_id radeonfb_pci_table[] = { /* Radeon IGP320M (U1) */ CHIP_DEF(PCI_CHIP_RS100_4336, RS100, CHIP_HAS_CRTC2 | CHIP_IS_IGP | CHIP_IS_MOBILITY), /* Radeon IGP320 (A3) */ - CHIP_DEF(PCI_CHIP_RS100_4136, RS100, CHIP_HAS_CRTC2 | CHIP_IS_IGP), + CHIP_DEF(PCI_CHIP_RS100_4136, RS100, CHIP_HAS_CRTC2 | CHIP_IS_IGP), /* IGP330M/340M/350M (U2) */ CHIP_DEF(PCI_CHIP_RS200_4337, RS200, CHIP_HAS_CRTC2 | CHIP_IS_IGP | CHIP_IS_MOBILITY), /* IGP330/340/350 (A4) */ @@ -240,7 +240,7 @@ typedef struct { * interfere with anything */ static reg_val common_regs[] = { - { OVR_CLR, 0 }, + { OVR_CLR, 0 }, { OVR_WID_LEFT_RIGHT, 0 }, { OVR_WID_TOP_BOTTOM, 0 }, { OV0_SCALE_CNTL, 0 }, @@ -255,7 +255,7 @@ static reg_val common_regs[] = { /* * globals */ - + static char *mode_option; static char *monitor_layout; static bool noaccel = 0; @@ -422,7 +422,7 @@ static int radeon_map_ROM(struct radeonfb_info *rinfo, struct pci_dev *dev) * ROM somewhere in the first meg. We will just ignore the copy * and use the ROM directly. */ - + /* Fix from ATI for problem with Radeon hardware not leaving ROM enabled */ unsigned int temp; temp = INREG(MPP_TB_CONFIG); @@ -430,14 +430,14 @@ static int radeon_map_ROM(struct radeonfb_info *rinfo, struct pci_dev *dev) temp |= 0x04 << 24; OUTREG(MPP_TB_CONFIG, temp); temp = INREG(MPP_TB_CONFIG); - + rom = pci_map_rom(dev, &rom_size); if (!rom) { printk(KERN_ERR "radeonfb (%s): ROM failed to map\n", pci_name(rinfo->pdev)); return -ENOMEM; } - + rinfo->bios_seg = rom; /* Very simple test to make sure it appeared */ @@ -515,7 +515,7 @@ static int radeon_find_mem_vbios(struct radeonfb_info *rinfo) */ u32 segstart; void __iomem *rom_base = NULL; - + for(segstart=0x000c0000; segstart<0x000f0000; segstart+=0x00001000) { rom_base = ioremap(segstart, 0x10000); if (rom_base == NULL) @@ -605,16 +605,16 @@ static int radeon_probe_pll_params(struct radeonfb_info *rinfo) for(i=0; i<1000000; i++) if (((INREG(CRTC_VLINE_CRNT_VLINE) >> 16) & 0x3ff) == 0) break; - + stop_time = ktime_get(); - + local_irq_enable(); total_usecs = ktime_us_delta(stop_time, start_time); if (total_usecs >= 10 * USEC_PER_SEC || total_usecs == 0) return -1; hz = USEC_PER_SEC/(u32)total_usecs; - + hTotal = ((INREG(CRTC_H_TOTAL_DISP) & 0x1ff) + 1) * 8; vTotal = ((INREG(CRTC_V_TOTAL_DISP) & 0x3ff) + 1); vclk = (long long)hTotal * (long long)vTotal * hz; @@ -662,7 +662,7 @@ static int radeon_probe_pll_params(struct radeonfb_info *rinfo) denom *= 3; break; case 6: - denom *= 6; + denom *= 6; break; case 7: denom *= 12; @@ -878,7 +878,7 @@ static int radeonfb_check_var (struct fb_var_screeninfo *var, struct fb_info *in v.green.length = 6; v.blue.length = 5; v.transp.offset = v.transp.length = 0; - break; + break; case 24: nom = 4; den = 1; @@ -908,7 +908,7 @@ static int radeonfb_check_var (struct fb_var_screeninfo *var, struct fb_info *in v.yres_virtual = v.yres; if (v.xres_virtual < v.xres) v.xres_virtual = v.xres; - + /* XXX I'm adjusting xres_virtual to the pitch, that may help XFree * with some panels, though I don't quite like this solution @@ -929,14 +929,14 @@ static int radeonfb_check_var (struct fb_var_screeninfo *var, struct fb_info *in if (v.xoffset > v.xres_virtual - v.xres) v.xoffset = v.xres_virtual - v.xres - 1; - + if (v.yoffset > v.yres_virtual - v.yres) v.yoffset = v.yres_virtual - v.yres - 1; - + v.red.msb_right = v.green.msb_right = v.blue.msb_right = v.transp.offset = v.transp.length = v.transp.msb_right = 0; - + memcpy(var, &v, sizeof(v)); return 0; @@ -951,7 +951,7 @@ static int radeonfb_pan_display (struct fb_var_screeninfo *var, if ((var->xoffset + info->var.xres > info->var.xres_virtual) || (var->yoffset + info->var.yres > info->var.yres_virtual)) return -EINVAL; - + if (rinfo->asleep) return 0; @@ -1151,7 +1151,7 @@ static int radeonfb_blank (int blank, struct fb_info *info) if (rinfo->asleep) return 0; - + return radeon_screen_blank(rinfo, blank, 0); } @@ -1401,7 +1401,7 @@ static void radeon_write_pll_regs(struct radeonfb_info *rinfo, struct radeon_reg } else { /* R300 uses ref_div_acc field as real ref divider */ OUTPLLP(PPLL_REF_DIV, - (mode->ppll_ref_div << R300_PPLL_REF_DIV_ACC_SHIFT), + (mode->ppll_ref_div << R300_PPLL_REF_DIV_ACC_SHIFT), ~R300_PPLL_REF_DIV_ACC_MASK); } } else @@ -1423,7 +1423,7 @@ static void radeon_write_pll_regs(struct radeonfb_info *rinfo, struct radeon_reg workaround shouldn't have any effect on them. */ for (i = 0; (i < 10000 && INPLL(PPLL_REF_DIV) & PPLL_ATOMIC_UPDATE_R); i++) ; - + OUTPLL(HTOTAL_CNTL, 0); /* Clear reset & atomic update */ @@ -1510,7 +1510,7 @@ void radeon_write_mode (struct radeonfb_info *rinfo, struct radeon_regs *mode, radeon_fifo_wait(2); OUTPLL(VCLK_ECP_CNTL, mode->vclk_ecp_cntl); - + return; } @@ -1735,7 +1735,7 @@ static int radeonfb_set_par(struct fb_info *info) /* Clear auto-center etc... */ newmode->crtc_more_cntl = rinfo->init_state.crtc_more_cntl; newmode->crtc_more_cntl &= 0xfffffff0; - + if ((primary_mon == MT_DFP) || (primary_mon == MT_LCD)) { newmode->crtc_ext_cntl = VGA_ATI_LINEAR | XCRT_CNT_EN; if (mirror) @@ -1793,7 +1793,7 @@ static int radeonfb_set_par(struct fb_info *info) newmode->surface_cntl |= NONSURF_AP0_SWP_16BPP; newmode->surface_cntl |= NONSURF_AP1_SWP_16BPP; break; - case 24: + case 24: case 32: newmode->surface_cntl |= NONSURF_AP0_SWP_32BPP; newmode->surface_cntl |= NONSURF_AP1_SWP_32BPP; @@ -2028,7 +2028,7 @@ static void fixup_memory_mappings(struct radeonfb_info *rinfo) } save_crtc_gen_cntl = INREG(CRTC_GEN_CNTL); save_crtc_ext_cntl = INREG(CRTC_EXT_CNTL); - + OUTREG(CRTC_EXT_CNTL, save_crtc_ext_cntl | CRTC_DISPLAY_DIS); OUTREG(CRTC_GEN_CNTL, save_crtc_gen_cntl | CRTC_DISP_REQ_EN_B); mdelay(100); @@ -2038,7 +2038,7 @@ static void fixup_memory_mappings(struct radeonfb_info *rinfo) #ifdef SET_MC_FB_FROM_APERTURE /* Set framebuffer to be at the same address as set in PCI BAR */ - OUTREG(MC_FB_LOCATION, + OUTREG(MC_FB_LOCATION, ((aper_base + aper_size - 1) & 0xffff0000) | (aper_base >> 16)); rinfo->fb_local_base = aper_base; #else @@ -2079,7 +2079,7 @@ static void fixup_memory_mappings(struct radeonfb_info *rinfo) OUTREG(CRTC_GEN_CNTL, save_crtc_gen_cntl); OUTREG(CRTC_EXT_CNTL, save_crtc_ext_cntl); if (rinfo->has_CRTC2) - OUTREG(CRTC2_GEN_CNTL, save_crtc2_gen_cntl); + OUTREG(CRTC2_GEN_CNTL, save_crtc2_gen_cntl); pr_debug("aper_base: %08x MC_FB_LOC to: %08x, MC_AGP_LOC to: %08x\n", aper_base, @@ -2265,7 +2265,7 @@ static int radeonfb_pci_register(struct pci_dev *pdev, int err = 0; pr_debug("radeonfb_pci_register BEGIN\n"); - + /* Enable device in PCI config */ ret = pci_enable_device(pdev); if (ret < 0) { @@ -2280,9 +2280,9 @@ static int radeonfb_pci_register(struct pci_dev *pdev, goto err_disable; } rinfo = info->par; - rinfo->info = info; + rinfo->info = info; rinfo->pdev = pdev; - + spin_lock_init(&rinfo->reg_lock); timer_setup(&rinfo->lvds_timer, radeon_lvds_timer_func, 0); @@ -2521,7 +2521,7 @@ static void radeonfb_pci_unregister(struct pci_dev *pdev) { struct fb_info *info = pci_get_drvdata(pdev); struct radeonfb_info *rinfo = info->par; - + if (!rinfo) return; @@ -2540,7 +2540,7 @@ static void radeonfb_pci_unregister(struct pci_dev *pdev) iounmap(rinfo->mmio_base); iounmap(rinfo->fb_base); - + pci_release_region(pdev, 2); pci_release_region(pdev, 0); @@ -2550,7 +2550,7 @@ static void radeonfb_pci_unregister(struct pci_dev *pdev) fb_destroy_modedb(rinfo->mon1_modedb); #ifdef CONFIG_FB_RADEON_I2C radeon_delete_i2c_busses(rinfo); -#endif +#endif fb_dealloc_cmap(&info->cmap); framebuffer_release(info); } |