Skip to content

Commit b3e148d

Browse files
committed
fbdev: Remove FBINFO_DEFAULT from framebuffer_alloc()'ed structs
The flag FBINFO_DEFAULT is 0 and has no effect, as struct fbinfo.flags has been allocated to zero by framebuffer_alloc(). So do not set it. Flags should signal differences from the default values. After cleaning up all occurrences of FBINFO_DEFAULT, the token will be removed. v4: * clarify commit message (Geert, Dan) v2: * fix commit message (Miguel) Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Sam Ravnborg <sam@ravnborg.org> Cc: Helge Deller <deller@gmx.de> Cc: Nicolas Ferre <nicolas.ferre@microchip.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Ferenc Bakonyi <fero@drama.obuda.kando.hu> Cc: "K. Y. Srinivasan" <kys@microsoft.com> Cc: Haiyang Zhang <haiyangz@microsoft.com> Cc: Wei Liu <wei.liu@kernel.org> Cc: Dexuan Cui <decui@microsoft.com> Cc: Antonino Daplas <adaplas@gmail.com> Cc: Maik Broemme <mbroemme@libmpq.org> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Nicholas Piggin <npiggin@gmail.com> Cc: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: Kristoffer Ericson <kristoffer.ericson@gmail.com> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Steve Glendinning <steve.glendinning@shawell.net> Cc: Bernie Thompson <bernie@plugable.com> Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Link: https://patchwork.freedesktop.org/patch/msgid/20230715185343.7193-6-tzimmermann@suse.de
1 parent 45733d2 commit b3e148d

64 files changed

Lines changed: 41 additions & 81 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

drivers/video/fbdev/amifb.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2427,7 +2427,7 @@ static int amifb_set_par(struct fb_info *info)
24272427
info->fix.ywrapstep = 1;
24282428
info->fix.xpanstep = 0;
24292429
info->fix.ypanstep = 0;
2430-
info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YWRAP |
2430+
info->flags = FBINFO_HWACCEL_YWRAP |
24312431
FBINFO_READS_FAST; /* override SCROLL_REDRAW */
24322432
} else {
24332433
info->fix.ywrapstep = 0;
@@ -2436,7 +2436,7 @@ static int amifb_set_par(struct fb_info *info)
24362436
else
24372437
info->fix.xpanstep = 16 << maxfmode;
24382438
info->fix.ypanstep = 1;
2439-
info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
2439+
info->flags = FBINFO_HWACCEL_YPAN;
24402440
}
24412441
return 0;
24422442
}
@@ -3660,7 +3660,6 @@ static int __init amifb_probe(struct platform_device *pdev)
36603660
}
36613661

36623662
info->fbops = &amifb_ops;
3663-
info->flags = FBINFO_DEFAULT;
36643663
info->device = &pdev->dev;
36653664

36663665
if (!fb_find_mode(&info->var, info, mode_option, ami_modedb,

drivers/video/fbdev/asiliantfb.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,6 @@ static int init_asiliant(struct fb_info *p, unsigned long addr)
516516
p->fix.smem_start = addr;
517517
p->var = asiliantfb_var;
518518
p->fbops = &asiliantfb_ops;
519-
p->flags = FBINFO_DEFAULT;
520519

521520
err = fb_alloc_cmap(&p->cmap, 256, 0);
522521
if (err) {

drivers/video/fbdev/atmel_lcdfb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1059,7 +1059,7 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev)
10591059
if (IS_ERR(sinfo->reg_lcd))
10601060
sinfo->reg_lcd = NULL;
10611061

1062-
info->flags = FBINFO_DEFAULT | FBINFO_PARTIAL_PAN_OK |
1062+
info->flags = FBINFO_PARTIAL_PAN_OK |
10631063
FBINFO_HWACCEL_YPAN;
10641064
info->pseudo_palette = sinfo->pseudo_palette;
10651065
info->fbops = &atmel_lcdfb_ops;

drivers/video/fbdev/aty/atyfb_base.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2637,8 +2637,7 @@ static int aty_init(struct fb_info *info)
26372637

26382638
info->fbops = &atyfb_ops;
26392639
info->pseudo_palette = par->pseudo_palette;
2640-
info->flags = FBINFO_DEFAULT |
2641-
FBINFO_HWACCEL_IMAGEBLIT |
2640+
info->flags = FBINFO_HWACCEL_IMAGEBLIT |
26422641
FBINFO_HWACCEL_FILLRECT |
26432642
FBINFO_HWACCEL_COPYAREA |
26442643
FBINFO_HWACCEL_YPAN |

drivers/video/fbdev/aty/radeon_base.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1972,8 +1972,7 @@ static int radeon_set_fbinfo(struct radeonfb_info *rinfo)
19721972

19731973
info->par = rinfo;
19741974
info->pseudo_palette = rinfo->pseudo_palette;
1975-
info->flags = FBINFO_DEFAULT
1976-
| FBINFO_HWACCEL_COPYAREA
1975+
info->flags = FBINFO_HWACCEL_COPYAREA
19771976
| FBINFO_HWACCEL_FILLRECT
19781977
| FBINFO_HWACCEL_XPAN
19791978
| FBINFO_HWACCEL_YPAN;

drivers/video/fbdev/bw2.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,6 @@ static int bw2_probe(struct platform_device *op)
314314

315315
info->fix.smem_len = PAGE_ALIGN(linebytes * info->var.yres);
316316

317-
info->flags = FBINFO_DEFAULT;
318317
info->fbops = &bw2_ops;
319318

320319
info->screen_base = of_ioremap(&op->resource[0], 0,

drivers/video/fbdev/carminefb.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,6 @@ static int alloc_carmine_fb(void __iomem *regs, void __iomem *smem_base,
561561

562562
info->fix = carminefb_fix;
563563
info->pseudo_palette = par->pseudo_palette;
564-
info->flags = FBINFO_DEFAULT;
565564

566565
ret = fb_alloc_cmap(&info->cmap, 256, 1);
567566
if (ret < 0)

drivers/video/fbdev/cg14.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ static int cg14_probe(struct platform_device *op)
533533
par->mode = MDI_8_PIX;
534534
par->ramsize = (is_8mb ? 0x800000 : 0x400000);
535535

536-
info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
536+
info->flags = FBINFO_HWACCEL_YPAN;
537537
info->fbops = &cg14_ops;
538538

539539
__cg14_reset(par);

drivers/video/fbdev/cg3.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,6 @@ static int cg3_probe(struct platform_device *op)
384384
if (!par->regs)
385385
goto out_release_fb;
386386

387-
info->flags = FBINFO_DEFAULT;
388387
info->fbops = &cg3_ops;
389388
info->screen_base = of_ioremap(&op->resource[0], CG3_RAM_OFFSET,
390389
info->fix.smem_len, "cg3 ram");

drivers/video/fbdev/cg6.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,7 @@ static int cg6_probe(struct platform_device *op)
782782
par->fhc = of_ioremap(&op->resource[0], CG6_FHC_OFFSET,
783783
sizeof(u32), "cgsix fhc");
784784

785-
info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_IMAGEBLIT |
785+
info->flags = FBINFO_HWACCEL_IMAGEBLIT |
786786
FBINFO_HWACCEL_COPYAREA | FBINFO_HWACCEL_FILLRECT |
787787
FBINFO_READS_FAST;
788788
info->fbops = &cg6_ops;

0 commit comments

Comments
 (0)