mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
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
This commit is contained in:
@@ -2427,7 +2427,7 @@ 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 |
|
||||
info->flags = FBINFO_HWACCEL_YWRAP |
|
||||
FBINFO_READS_FAST; /* override SCROLL_REDRAW */
|
||||
} else {
|
||||
info->fix.ywrapstep = 0;
|
||||
@@ -2436,7 +2436,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;
|
||||
info->flags = FBINFO_HWACCEL_YPAN;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -3660,7 +3660,6 @@ default_chipset:
|
||||
}
|
||||
|
||||
info->fbops = &amifb_ops;
|
||||
info->flags = FBINFO_DEFAULT;
|
||||
info->device = &pdev->dev;
|
||||
|
||||
if (!fb_find_mode(&info->var, info, mode_option, ami_modedb,
|
||||
|
||||
@@ -516,7 +516,6 @@ static int 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_DEFAULT;
|
||||
|
||||
err = fb_alloc_cmap(&p->cmap, 256, 0);
|
||||
if (err) {
|
||||
|
||||
@@ -1059,7 +1059,7 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev)
|
||||
if (IS_ERR(sinfo->reg_lcd))
|
||||
sinfo->reg_lcd = NULL;
|
||||
|
||||
info->flags = FBINFO_DEFAULT | FBINFO_PARTIAL_PAN_OK |
|
||||
info->flags = FBINFO_PARTIAL_PAN_OK |
|
||||
FBINFO_HWACCEL_YPAN;
|
||||
info->pseudo_palette = sinfo->pseudo_palette;
|
||||
info->fbops = &atmel_lcdfb_ops;
|
||||
|
||||
@@ -2637,8 +2637,7 @@ static int aty_init(struct fb_info *info)
|
||||
|
||||
info->fbops = &atyfb_ops;
|
||||
info->pseudo_palette = par->pseudo_palette;
|
||||
info->flags = FBINFO_DEFAULT |
|
||||
FBINFO_HWACCEL_IMAGEBLIT |
|
||||
info->flags = FBINFO_HWACCEL_IMAGEBLIT |
|
||||
FBINFO_HWACCEL_FILLRECT |
|
||||
FBINFO_HWACCEL_COPYAREA |
|
||||
FBINFO_HWACCEL_YPAN |
|
||||
|
||||
@@ -1972,8 +1972,7 @@ static int radeon_set_fbinfo(struct radeonfb_info *rinfo)
|
||||
|
||||
info->par = rinfo;
|
||||
info->pseudo_palette = rinfo->pseudo_palette;
|
||||
info->flags = FBINFO_DEFAULT
|
||||
| FBINFO_HWACCEL_COPYAREA
|
||||
info->flags = FBINFO_HWACCEL_COPYAREA
|
||||
| FBINFO_HWACCEL_FILLRECT
|
||||
| FBINFO_HWACCEL_XPAN
|
||||
| FBINFO_HWACCEL_YPAN;
|
||||
|
||||
@@ -314,7 +314,6 @@ static int bw2_probe(struct platform_device *op)
|
||||
|
||||
info->fix.smem_len = PAGE_ALIGN(linebytes * info->var.yres);
|
||||
|
||||
info->flags = FBINFO_DEFAULT;
|
||||
info->fbops = &bw2_ops;
|
||||
|
||||
info->screen_base = of_ioremap(&op->resource[0], 0,
|
||||
|
||||
@@ -561,7 +561,6 @@ static int alloc_carmine_fb(void __iomem *regs, void __iomem *smem_base,
|
||||
|
||||
info->fix = carminefb_fix;
|
||||
info->pseudo_palette = par->pseudo_palette;
|
||||
info->flags = FBINFO_DEFAULT;
|
||||
|
||||
ret = fb_alloc_cmap(&info->cmap, 256, 1);
|
||||
if (ret < 0)
|
||||
|
||||
@@ -533,7 +533,7 @@ static int cg14_probe(struct platform_device *op)
|
||||
par->mode = MDI_8_PIX;
|
||||
par->ramsize = (is_8mb ? 0x800000 : 0x400000);
|
||||
|
||||
info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
|
||||
info->flags = FBINFO_HWACCEL_YPAN;
|
||||
info->fbops = &cg14_ops;
|
||||
|
||||
__cg14_reset(par);
|
||||
|
||||
@@ -384,7 +384,6 @@ static int cg3_probe(struct platform_device *op)
|
||||
if (!par->regs)
|
||||
goto out_release_fb;
|
||||
|
||||
info->flags = FBINFO_DEFAULT;
|
||||
info->fbops = &cg3_ops;
|
||||
info->screen_base = of_ioremap(&op->resource[0], CG3_RAM_OFFSET,
|
||||
info->fix.smem_len, "cg3 ram");
|
||||
|
||||
@@ -782,7 +782,7 @@ static int cg6_probe(struct platform_device *op)
|
||||
par->fhc = of_ioremap(&op->resource[0], CG6_FHC_OFFSET,
|
||||
sizeof(u32), "cgsix fhc");
|
||||
|
||||
info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_IMAGEBLIT |
|
||||
info->flags = FBINFO_HWACCEL_IMAGEBLIT |
|
||||
FBINFO_HWACCEL_COPYAREA | FBINFO_HWACCEL_FILLRECT |
|
||||
FBINFO_READS_FAST;
|
||||
info->fbops = &cg6_ops;
|
||||
|
||||
@@ -340,7 +340,6 @@ static void init_chips(struct fb_info *p, unsigned long addr)
|
||||
p->var = chipsfb_var;
|
||||
|
||||
p->fbops = &chipsfb_ops;
|
||||
p->flags = FBINFO_DEFAULT;
|
||||
|
||||
fb_alloc_cmap(&p->cmap, 256, 0);
|
||||
|
||||
|
||||
@@ -1978,8 +1978,7 @@ static int cirrusfb_set_fbinfo(struct fb_info *info)
|
||||
struct fb_var_screeninfo *var = &info->var;
|
||||
|
||||
info->pseudo_palette = cinfo->pseudo_palette;
|
||||
info->flags = FBINFO_DEFAULT
|
||||
| FBINFO_HWACCEL_XPAN
|
||||
info->flags = FBINFO_HWACCEL_XPAN
|
||||
| FBINFO_HWACCEL_YPAN
|
||||
| FBINFO_HWACCEL_FILLRECT
|
||||
| FBINFO_HWACCEL_IMAGEBLIT
|
||||
|
||||
@@ -310,7 +310,6 @@ static int clps711x_fb_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
info->fbops = &clps711x_fb_ops;
|
||||
info->flags = FBINFO_DEFAULT;
|
||||
info->var.activate = FB_ACTIVATE_FORCE | FB_ACTIVATE_NOW;
|
||||
info->var.height = -1;
|
||||
info->var.width = -1;
|
||||
|
||||
@@ -313,7 +313,6 @@ static int cobalt_lcdfb_probe(struct platform_device *dev)
|
||||
info->fix.smem_len = info->screen_size;
|
||||
info->pseudo_palette = NULL;
|
||||
info->par = NULL;
|
||||
info->flags = FBINFO_DEFAULT;
|
||||
|
||||
retval = register_framebuffer(info);
|
||||
if (retval < 0) {
|
||||
|
||||
@@ -515,7 +515,6 @@ static int ep93xxfb_probe(struct platform_device *pdev)
|
||||
info->fix.accel = FB_ACCEL_NONE;
|
||||
info->var.activate = FB_ACTIVATE_NOW;
|
||||
info->var.vmode = FB_VMODE_NONINTERLACED;
|
||||
info->flags = FBINFO_DEFAULT;
|
||||
info->node = -1;
|
||||
info->state = FBINFO_STATE_RUNNING;
|
||||
info->pseudo_palette = &fbi->pseudo_palette;
|
||||
|
||||
@@ -929,8 +929,7 @@ static int ffb_probe(struct platform_device *op)
|
||||
/* Don't mention copyarea, so SCROLL_REDRAW is always
|
||||
* used. It is the fastest on this chip.
|
||||
*/
|
||||
info->flags = (FBINFO_DEFAULT |
|
||||
/* FBINFO_HWACCEL_COPYAREA | */
|
||||
info->flags = (/* FBINFO_HWACCEL_COPYAREA | */
|
||||
FBINFO_HWACCEL_FILLRECT |
|
||||
FBINFO_HWACCEL_IMAGEBLIT);
|
||||
|
||||
|
||||
@@ -280,7 +280,6 @@ static int fm2fb_probe(struct zorro_dev *z, const struct zorro_device_id *id)
|
||||
info->pseudo_palette = info->par;
|
||||
info->par = NULL;
|
||||
info->fix = fb_fix;
|
||||
info->flags = FBINFO_DEFAULT;
|
||||
|
||||
if (register_framebuffer(info) < 0) {
|
||||
fb_dealloc_cmap(&info->cmap);
|
||||
|
||||
@@ -1194,7 +1194,6 @@ static int gbefb_probe(struct platform_device *p_dev)
|
||||
|
||||
info->fbops = &gbefb_ops;
|
||||
info->pseudo_palette = pseudo_palette;
|
||||
info->flags = FBINFO_DEFAULT;
|
||||
info->screen_base = gbe_mem;
|
||||
fb_alloc_cmap(&info->cmap, 256, 0);
|
||||
|
||||
|
||||
@@ -294,7 +294,6 @@ static struct fb_info *gx1fb_init_fbinfo(struct device *dev)
|
||||
info->var.vmode = FB_VMODE_NONINTERLACED;
|
||||
|
||||
info->fbops = &gx1fb_ops;
|
||||
info->flags = FBINFO_DEFAULT;
|
||||
info->node = -1;
|
||||
|
||||
info->pseudo_palette = (void *)par + sizeof(struct geodefb_par);
|
||||
|
||||
@@ -308,7 +308,6 @@ static struct fb_info *gxfb_init_fbinfo(struct device *dev)
|
||||
info->var.vmode = FB_VMODE_NONINTERLACED;
|
||||
|
||||
info->fbops = &gxfb_ops;
|
||||
info->flags = FBINFO_DEFAULT;
|
||||
info->node = -1;
|
||||
|
||||
info->pseudo_palette = (void *)par + sizeof(struct gxfb_par);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user