Commit c4295bc2 authored by Antonino Daplas's avatar Antonino Daplas Committed by Linus Torvalds

[PATCH] fbdev: ATTN: Maintainers - Set correct hardware capabilities

With David Eger's patch for advertising hardware capabilities to fbcon,
only a few drivers so far have been converted to do just that.  As a
result, scrolling speed of some drivers will not be optimal
(SCROLL_REDRAW).  The patch adds the correct flags for all drivers (except
for matroxfb -leave this to Petr-, and a few drivers that are not ported
yet to 2.6).

*Majority of changes is FBINFO_FLAG_DEFAULT -> FBINFO_DEFAULT
Signed-off-by: default avatarAntonino Daplas <adaplas@pol.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 64faa586
......@@ -466,7 +466,7 @@ int __init mc68x328fb_init(void)
fb_info.var.red.offset = fb_info.var.green.offset = fb_info.var.blue.offset = 0;
}
fb_info.pseudo_palette = &mc68x328fb_pseudo_palette;
fb_info.flags = FBINFO_FLAG_DEFAULT;
fb_info.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
fb_alloc_cmap(&fb_info.cmap, 256, 0);
......
......@@ -1010,7 +1010,7 @@ static void __init acornfb_init_fbinfo(void)
first = 0;
fb_info.fbops = &acornfb_ops;
fb_info.flags = FBINFO_FLAG_DEFAULT;
fb_info.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
fb_info.pseudo_palette = current_par.pseudo_palette;
strcpy(fb_info.fix.id, "Acorn");
......
......@@ -1307,6 +1307,8 @@ static int amifb_set_par(struct fb_info *info)
info->fix.ywrapstep = 1;
info->fix.xpanstep = 0;
info->fix.ypanstep = 0;
info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YWRAP |
FBINFO_READS_FAST; /* override SCROLL_REDRAW */
} else {
info->fix.ywrapstep = 0;
if (par->vmode & FB_VMODE_SMOOTH_XPAN)
......@@ -1314,6 +1316,7 @@ static int amifb_set_par(struct fb_info *info)
else
info->fix.xpanstep = 16<<maxfmode;
info->fix.ypanstep = 1;
info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
}
return 0;
}
......@@ -2382,7 +2385,7 @@ int __init amifb_init(void)
fb_info.fbops = &amifb_ops;
fb_info.par = &currentpar;
fb_info.flags = FBINFO_FLAG_DEFAULT;
fb_info.flags = FBINFO_DEFAULT;
if (!fb_find_mode(&fb_info.var, &fb_info, mode_option, ami_modedb,
NUM_TOTAL_MODES, &ami_modedb[defmode], 4)) {
......
......@@ -524,7 +524,7 @@ static void __init init_asiliant(struct fb_info *p, unsigned long addr)
p->fix.smem_start = addr;
p->var = asiliantfb_var;
p->fbops = &asiliantfb_ops;
p->flags = FBINFO_FLAG_DEFAULT;
p->flags = FBINFO_DEFAULT;
fb_alloc_cmap(&p->cmap, 256, 0);
......
......@@ -351,7 +351,7 @@ static void bw2_init_one(struct sbus_dev *sdev)
all->par.fbsize = PAGE_ALIGN(linebytes * all->info.var.yres);
all->info.flags = FBINFO_FLAG_DEFAULT;
all->info.flags = FBINFO_DEFAULT;
all->info.fbops = &bw2_ops;
#if defined(CONFIG_SPARC32)
if (sdev)
......
......@@ -550,7 +550,7 @@ static void cg14_init_one(struct sbus_dev *sdev, int node, int parent_node)
all->par.mode = MDI_8_PIX;
all->par.ramsize = (is_8mb ? 0x800000 : 0x400000);
all->info.flags = FBINFO_FLAG_DEFAULT;
all->info.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
all->info.fbops = &cg14_ops;
all->info.currcon = -1;
all->info.par = &all->par;
......
......@@ -398,7 +398,7 @@ static void cg3_init_one(struct sbus_dev *sdev)
sbus_ioremap(&sdev->resource[0], CG3_REGS_OFFSET,
sizeof(struct cg3_regs), "cg3 regs");
all->info.flags = FBINFO_FLAG_DEFAULT;
all->info.flags = FBINFO_DEFAULT;
all->info.fbops = &cg3_ops;
#ifdef CONFIG_SPARC32
all->info.screen_base = (char *)
......
......@@ -712,7 +712,8 @@ static void cg6_init_one(struct sbus_dev *sdev)
sbus_ioremap(&sdev->resource[0], CG6_FHC_OFFSET,
sizeof(u32), "cgsix fhc");
all->info.flags = FBINFO_FLAG_DEFAULT;
all->info.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_IMAGEBLIT |
FBINFO_HWACCEL_COPYAREA | FBINFO_HWACCEL_FILLRECT;
all->info.fbops = &cg6_ops;
#ifdef CONFIG_SPARC32
all->info.screen_base = (char *)
......
......@@ -362,7 +362,7 @@ static void __init init_chips(struct fb_info *p, unsigned long addr)
p->var = chipsfb_var;
p->fbops = &chipsfb_ops;
p->flags = FBINFO_FLAG_DEFAULT;
p->flags = FBINFO_DEFAULT;
fb_alloc_cmap(&p->cmap, 256, 0);
......
......@@ -372,7 +372,7 @@ int __init clps711xfb_init(void)
strcpy(cfb->fix.id, "clps711x");
cfb->fbops = &clps7111fb_ops;
cfb->flags = FBINFO_FLAG_DEFAULT;
cfb->flags = FBINFO_DEFAULT;
clps711x_guess_lcd_params(cfb);
......
......@@ -1010,7 +1010,7 @@ static void __init control_init_info(struct fb_info *info, struct fb_info_contro
info->par = &p->par;
info->fbops = &controlfb_ops;
info->pseudo_palette = p->pseudo_palette;
info->flags = FBINFO_FLAG_DEFAULT;
info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
info->screen_base = (char *) p->frame_buffer + CTRLFB_OFF;
fb_alloc_cmap(&info->cmap, 256, 0);
......
......@@ -1281,7 +1281,7 @@ cyberpro_alloc_fb_info(unsigned int id, char *name)
cfb->fb.var.accel_flags = FB_ACCELF_TEXT;
cfb->fb.fbops = &cyber2000fb_ops;
cfb->fb.flags = FBINFO_FLAG_DEFAULT;
cfb->fb.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
cfb->fb.pseudo_palette = (void *)(cfb + 1);
fb_alloc_cmap(&cfb->fb.cmap, NR_PALETTE, 0);
......
......@@ -507,7 +507,7 @@ int __init e1355fb_init(void)
fb_info.gen.parsize = sizeof(struct e1355_par);
fb_info.gen.info.switch_con = &fbgen_switch;
fb_info.gen.info.updatevar = &fbgen_update_var;
fb_info.gen.info.flags = FBINFO_FLAG_DEFAULT;
fb_info.gen.info.flags = FBINFO_DEFAULT;
/* This should give a reasonable default video mode */
fbgen_get_var(&disp.var, -1, &fb_info.gen.info);
fbgen_do_set_var(&disp.var, 1, &fb_info.gen);
......
......@@ -1027,7 +1027,7 @@ static void ffb_init_one(int node, int parent)
all->par.prom_node = node;
all->par.prom_parent_node = parent;
all->info.flags = FBINFO_FLAG_DEFAULT;
all->info.flags = FBINFO_DEFAULT;
all->info.fbops = &ffb_ops;
all->info.screen_base = (char *) all->par.physbase + FFB_DFB24_POFF;
all->info.currcon = -1;
......
......@@ -280,7 +280,7 @@ static int __devinit fm2fb_probe(struct zorro_dev *z,
info->pseudo_palette = info->par;
info->par = NULL;
info->fix = fb_fix;
info->flags = FBINFO_FLAG_DEFAULT;
info->flags = FBINFO_DEFAULT;
if (register_framebuffer(info) < 0) {
fb_dealloc_cmap(&info->cmap);
......
......@@ -241,7 +241,7 @@ int __init g364fb_init(void)
fb_info.screen_base = (char *) G364_MEM_BASE; /* virtual kernel address */
fb_info.var = fb_var;
fb_info.fix = fb_fix;
fb_info.flags = FBINFO_FLAG_DEFAULT;
fb_info.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
fb_alloc_cmap(&fb_info.cmap, 255, 0);
......
......@@ -1135,7 +1135,7 @@ int __init gbefb_init(void)
fb_info.currcon = -1;
fb_info.fbops = &gbefb_ops;
fb_info.pseudo_palette = pseudo_palette;
fb_info.flags = FBINFO_FLAG_DEFAULT;
fb_info.flags = FBINFO_DEFAULT;
fb_info.screen_base = gbe_mem;
fb_alloc_cmap(&fb_info.cmap, 256, 0);
......
......@@ -558,7 +558,7 @@ int __init hgafb_init(void)
hga_fix.smem_start = VGA_MAP_MEM(hga_vram_base);
hga_fix.smem_len = hga_vram_len;
fb_info.flags = FBINFO_FLAG_DEFAULT;
fb_info.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
fb_info.var = hga_default_var;
fb_info.fix = hga_fix;
fb_info.monspecs.hfmin = 0;
......
......@@ -321,7 +321,7 @@ int __init hitfb_init(void)
fb_info.var = hitfb_var;
fb_info.fix = hitfb_fix;
fb_info.pseudo_palette = pseudo_palette;
fb_info.flags = FBINFO_FLAG_DEFAULT;
fb_info.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
fb_info.screen_base = (void *)hitfb_fix.smem_start;
......
......@@ -151,7 +151,7 @@ int __init hpfb_init_one(unsigned long base)
* Let there be consoles..
*/
fb_info.fbops = &hpfb_ops;
fb_info.flags = FBINFO_FLAG_DEFAULT;
fb_info.flags = FBINFO_DEFAULT;
fb_info.var = hpfb_defined;
fb_info.fix = hpfb_fix;
fb_info.screen_base = (char *)hpfb_fix.smem_start; // FIXME
......
......@@ -357,7 +357,7 @@ static int __init iga_init(struct fb_info *info, struct iga_par *par)
video_cmap_len = 256;
info->fbops = &igafb_ops;
info->flags = FBINFO_FLAG_DEFAULT;
info->flags = FBINFO_DEFAULT;
fb_alloc_cmap(&info->cmap, video_cmap_len, 0);
......
......@@ -1442,7 +1442,10 @@ init_imstt(struct fb_info *info)
info->var.pixclock = 1000000 / getclkMHz(par);
info->fbops = &imsttfb_ops;
info->flags = FBINFO_FLAG_DEFAULT;
info->flags = FBINFO_DEFAULT |
FBINFO_HWACCEL_COPYAREA |
FBINFO_HWACCEL_FILLRECT |
FBINFO_HWACCEL_YPAN;
fb_alloc_cmap(&info->cmap, 0, 0);
......
......@@ -712,7 +712,7 @@ static int __devinit kyrofb_probe(struct pci_dev *pdev,
info->fix = kyro_fix;
info->par = currentpar;
info->pseudo_palette = (void *)(currentpar + 1);
info->flags = FBINFO_FLAG_DEFAULT;
info->flags = FBINFO_DEFAULT;
SetCoreClockPLL(deviceInfo.pSTGReg, pdev);
......
......@@ -588,7 +588,7 @@ static void leo_init_one(struct sbus_dev *sdev)
sbus_ioremap(&sdev->resource[0], LEO_OFF_LX_CURSOR,
sizeof(struct leo_cursor), "leolx cursor");
all->info.flags = FBINFO_FLAG_DEFAULT;
all->info.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
all->info.fbops = &leo_ops;
all->info.currcon = -1;
all->info.par = &all->par;
......
......@@ -950,7 +950,7 @@ void __init macfb_init(void)
fb_info.var = macfb_defined;
fb_info.fix = macfb_fix;
fb_info.pseudo_palette = pseudo_palette;
fb_info.flags = FBINFO_FLAG_DEFAULT;
fb_info.flags = FBINFO_DEFAULT;
fb_alloc_cmap(&fb_info.cmap, video_cmap_len, 0);
......
......@@ -159,7 +159,7 @@ int __init maxinefb_init(void)
fb_info.screen_base = (char *) maxinefb_fix.smem_start;
fb_info.var = maxinefb_defined;
fb_info.fix = maxinefb_fix;
fb_info.flags = FBINFO_FLAG_DEFAULT;
fb_info.flags = FBINFO_DEFAULT;
fb_alloc_cmap(&fb_info.cmap, 256, 0);
......
......@@ -2055,7 +2055,11 @@ static struct fb_info *__devinit neo_alloc_fb_info(struct pci_dev *dev, const st
info->fix.accel = id->driver_data;
info->fbops = &neofb_ops;
info->flags = FBINFO_FLAG_DEFAULT;
info->flags = FBINFO_DEFAULT |
FBINFO_HWACCEL_IMAGEBLIT |
FBINFO_HWACCEL_FILLRECT |
FBINFO_HWACCEL_COPYAREA |
FBINFO_HWACCEL_YPAN;
info->pseudo_palette = (void *) (par + 1);
return info;
}
......
......@@ -527,7 +527,7 @@ static void __init offb_init_fb(const char *name, const char *full_name,
info->screen_base = ioremap(address, fix->smem_len);
info->par = par;
info->pseudo_palette = (void *) (info + 1);
info->flags = FBINFO_FLAG_DEFAULT;
info->flags = FBINFO_DEFAULT;
fb_alloc_cmap(&info->cmap, 256, 0);
......
......@@ -297,7 +297,7 @@ static void p9100_init_one(struct sbus_dev *sdev)
sbus_ioremap(&sdev->resource[0], 0,
sizeof(struct p9100_regs), "p9100 regs");
all->info.flags = FBINFO_FLAG_DEFAULT;
all->info.flags = FBINFO_DEFAULT;
all->info.fbops = &p9100_ops;
#ifdef CONFIG_SPARC32
all->info.screen_base = (char *)
......
......@@ -311,7 +311,7 @@ static void __devinit platinum_init_info(struct fb_info *info, struct fb_info_pl
/* Fill fb_info */
info->fbops = &platinumfb_ops;
info->pseudo_palette = pinfo->pseudo_palette;
info->flags = FBINFO_FLAG_DEFAULT;
info->flags = FBINFO_DEFAULT;
info->screen_base = (char *) pinfo->frame_buffer + 0x20;
fb_alloc_cmap(&info->cmap, 256, 0);
......
......@@ -1124,7 +1124,8 @@ static int __devinit pm2fb_probe(struct pci_dev *pdev,
info->fbops = &pm2fb_ops;
info->fix = pm2fb_fix;
info->pseudo_palette = (void *)(default_par + 1);
info->flags = FBINFO_FLAG_DEFAULT;
info->flags = FBINFO_DEFAULT |
FBINFO_HWACCEL_YPAN;
#ifndef MODULE
if (!mode)
......
......@@ -142,7 +142,7 @@ int __init pmagbafb_init_one(int slot)
info->var = pmagbafb_defined;
info->fix = pmagbafb_fix;
info->screen_base = pmagbafb_fix.smem_start;
info->flags = FBINFO_FLAG_DEFAULT;
info->flags = FBINFO_DEFAULT;
fb_alloc_cmap(&fb_info.cmap, 256, 0);
......
......@@ -145,7 +145,7 @@ int __init pmagbbfb_init_one(int slot)
info->var = pmagbbfb_defined;
info->fix = pmagbbfb_fix;
info->screen_base = pmagbbfb_fix.smem_start;
info->flags = FBINFO_FLAG_DEFAULT;
info->flags = FBINFO_DEFAULT;
fb_alloc_cmap(&fb_info.cmap, 256, 0);
......
......@@ -795,7 +795,7 @@ static int __init pvr2fb_common_init(void)
fb_info->fix = pvr2_fix;
fb_info->par = currentpar;
fb_info->pseudo_palette = (void *)(fb_info->par + 1);
fb_info->flags = FBINFO_FLAG_DEFAULT;
fb_info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
if (video_output == VO_VGA)
defmode = DEFMODE_VGA;
......
......@@ -1040,7 +1040,7 @@ static struct pxafb_info * __init pxafb_init_fbinfo(struct device *dev)
fbi->fb.var.vmode = FB_VMODE_NONINTERLACED;
fbi->fb.fbops = &pxafb_ops;
fbi->fb.flags = FBINFO_FLAG_DEFAULT;
fbi->fb.flags = FBINFO_DEFAULT;
fbi->fb.node = -1;
fbi->fb.currcon = -1;
......
......@@ -105,7 +105,7 @@ static int __init q40fb_probe(struct device *device)
info->var = q40fb_var;
info->fix = q40fb_fix;
info->fbops = &q40fb_ops;
info->flags = FBINFO_FLAG_DEFAULT; /* not as module for now */
info->flags = FBINFO_DEFAULT; /* not as module for now */
info->pseudo_palette = info->par;
info->par = NULL;
info->screen_base = (char *) q40fb_fix.smem_start;
......
......@@ -2250,7 +2250,7 @@ static int __devinit radeon_set_fbinfo (struct radeonfb_info *rinfo)
info->currcon = -1;
info->par = rinfo;
info->pseudo_palette = rinfo->pseudo_palette;
info->flags = FBINFO_FLAG_DEFAULT;
info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
info->fbops = &radeonfb_ops;
info->screen_base = (char *)rinfo->fb_base;
......
......@@ -1671,7 +1671,7 @@ static struct sa1100fb_info * __init sa1100fb_init_fbinfo(struct device *dev)
fbi->fb.var.vmode = FB_VMODE_NONINTERLACED;
fbi->fb.fbops = &sa1100fb_ops;
fbi->fb.flags = FBINFO_FLAG_DEFAULT;
fbi->fb.flags = FBINFO_DEFAULT;
fbi->fb.monspecs = monspecs;
fbi->fb.currcon = -1;
fbi->fb.pseudo_palette = (fbi + 1);
......
......@@ -790,7 +790,7 @@ int __init sgivwfb_init(void)
fb_info.fbops = &sgivwfb_ops;
fb_info.pseudo_palette = pseudo_palette;
fb_info.par = &default_par;
fb_info.flags = FBINFO_FLAG_DEFAULT;
fb_info.flags = FBINFO_DEFAULT;
fb_info.screen_base = ioremap_nocache((unsigned long) sgivwfb_mem_phys, sgivwfb_mem_size);
if (!fb_info.screen_base) {
......
......@@ -1473,7 +1473,7 @@ static int __devinit sstfb_probe(struct pci_dev *pdev,
f_ddprintk("membase_phys: %#lx\n", fix->smem_start);
f_ddprintk("fbbase_virt: %p\n", info->screen_base);
info->flags = FBINFO_FLAG_DEFAULT;
info->flags = FBINFO_DEFAULT;
info->fbops = &sstfb_ops;
info->currcon = -1;
info->pseudo_palette = &all->pseudo_palette;
......
......@@ -1325,7 +1325,7 @@ stifb_init_fb(struct sti_struct *sti, int force_bpp)
strcpy(fix->id, "stifb");
info->fbops = &stifb_ops;
info->screen_base = (void*) REGION_BASE(fb,1);
info->flags = FBINFO_FLAG_DEFAULT;
info->flags = FBINFO_DEFAULT;
info->currcon = -1;
/* This has to been done !!! */
......
......@@ -412,7 +412,7 @@ static void tcx_init_one(struct sbus_dev *sdev)
all->par.mmap_map[i].poff = sdev->reg_addrs[j].phys_addr;
}
all->info.flags = FBINFO_FLAG_DEFAULT;
all->info.flags = FBINFO_DEFAULT;
all->info.fbops = &tcx_ops;
#ifdef CONFIG_SPARC32
all->info.screen_base = (char *)
......
......@@ -1253,7 +1253,11 @@ static int __devinit tdfxfb_probe(struct pci_dev *pdev,
info->fix = tdfx_fix;
info->par = default_par;
info->pseudo_palette = (void *)(default_par + 1);
info->flags = FBINFO_FLAG_DEFAULT;
info->flags = FBINFO_DEFAULT |
FBINFO_HWACCEL_COPYAREA |
FBINFO_HWACCEL_FILLRECT |
FBINFO_HWACCEL_IMAGEBLIT |
FBINFO_HWACCEL_YPAN;
#ifndef MODULE
if (!mode_option)
......
......@@ -1426,7 +1426,8 @@ tgafb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent)
pci_read_config_byte(pdev, PCI_REVISION_ID, &all->par.tga_chip_rev);
/* Setup framebuffer. */
all->info.flags = FBINFO_FLAG_DEFAULT;
all->info.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_COPYAREA |
FBINFO_HWACCEL_IMAGEBLIT | FBINFO_HWACCEL_FILLRECT;
all->info.fbops = &tgafb_ops;
all->info.screen_base = (char *) all->par.tga_fb_base;
all->info.currcon = -1;
......
......@@ -1149,7 +1149,10 @@ static int __devinit trident_pci_probe(struct pci_dev * dev, const struct pci_de
fb_info.fbops = &tridentfb_ops;
fb_info.flags = FBINFO_FLAG_DEFAULT;
fb_info.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
#ifdef CONFIG_FB_TRIDENT_ACCEL
fb_info.flags |= FBINFO_HWACCEL_COPYAREA | FBINFO_HWACCEL_FILLRECT;
#endif
fb_info.pseudo_palette = pseudo_pal;
if (!fb_find_mode(&default_var,&fb_info,mode,NULL,0,NULL,bpp))
......
......@@ -299,7 +299,7 @@ int __init tx3912fb_init(void)
fb_info.var = tx3912fb_var;
fb_info.fix = tx3912fb_fix;
fb_info.pseudo_palette = pseudo_palette;
fb_info.flags = FBINFO_FLAG_DEFAULT;
fb_info.flags = FBINFO_DEFAULT;
/* Clear the framebuffer */
memset((void *) fb_info.fix.smem_start, 0xff, fb_info.fix.smem_len);
......
......@@ -540,7 +540,7 @@ static void __init valkyrie_init_info(struct fb_info *info, struct fb_info_valky
{
info->fbops = &valkyriefb_ops;
info->screen_base = (char *) p->frame_buffer + 0x1000;
info->flags = FBINFO_FLAG_DEFAULT;
info->flags = FBINFO_DEFAULT;
info->pseudo_palette = p->pseudo_palette;
fb_alloc_cmap(&info->cmap, 256, 0);
info->par = &p->par;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment