* [PATCH 00/17] fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT flags
@ 2023-07-10 12:50 Thomas Zimmermann
2023-07-10 12:50 ` [PATCH 01/17] drm: Remove flag FBINFO_DEFAULT from fbdev emulation Thomas Zimmermann
` (16 more replies)
0 siblings, 17 replies; 35+ messages in thread
From: Thomas Zimmermann @ 2023-07-10 12:50 UTC (permalink / raw)
To: deller, javierm
Cc: linux-sh, dri-devel, linux-kernel, amd-gfx, linux-input,
linux-media, linux-fbdev, linux-staging, linux-arm-kernel,
linux-geode, linux-nvidia, linux-hyperv, linux-omap, linuxppc-dev,
kvm, Thomas Zimmermann
Remove the unused flags FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT from
fbdev and drivers, as briefly discussed at [1]. Both flags were maybe
useful when fbdev had special handling for driver modules. With
commit 376b3ff54c9a ("fbdev: Nuke FBINFO_MODULE"), they are both 0
and have no further effect.
Patches 1 to 7 remove FBINFO_DEFAULT from drivers. Patches 2 to 5
split this by the way the fb_info struct is being allocated. All flags
are cleared to zero during the allocation.
Patches 8 to 16 do the same for FBINFO_FLAG_DEFAULT. Patch 8 fixes
an actual bug in how arch/sh uses the tokne for struct fb_videomode,
which is unrelated.
Patch 17 removes both flag constants from <linux/fb.h>
[1] https://lore.kernel.org/dri-devel/877crer8fm.fsf@minerva.mail-host-address-is-not-set/
Thomas Zimmermann (17):
drm: Remove flag FBINFO_DEFAULT from fbdev emulation
fbdev: Remove flag FBINFO_DEFAULT from fbdev drivers
fbdev: Remove flag FBINFO_DEFAULT from fbdev drivers
fbdev: Remove flag FBINFO_DEFAULT from fbdev drivers
fbdev: Remove flag FBINFO_DEFAULT from fbdev drivers
fbdev/fsl-diu-fb: Remove flag FBINFO_DEFAULT
vfio-mdev: Remove flag FBINFO_DEFAULT from fbdev sample driver
arch/sh: Do not assign FBINFO_FLAG_DEFAULT to fb_videomode.flag
auxdisplay: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers
hid/picolcd: Remove flag FBINFO_FLAG_DEFAULT from fbdev driver
media: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers
staging: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers
fbdev: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers
fbdev: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers
fbdev/atafb: Remove flag FBINFO_FLAG_DEFAULT
fbdev/pxafb: Remove flag FBINFO_FLAG_DEFAULT
fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT
arch/sh/boards/mach-sh7763rdp/setup.c | 1 -
drivers/auxdisplay/cfag12864bfb.c | 1 -
drivers/auxdisplay/ht16k33.c | 1 -
drivers/gpu/drm/drm_fbdev_dma.c | 1 -
drivers/gpu/drm/drm_fbdev_generic.c | 1 -
drivers/gpu/drm/gma500/fbdev.c | 2 +-
drivers/gpu/drm/radeon/radeon_fbdev.c | 2 +-
drivers/hid/hid-picolcd_fb.c | 1 -
drivers/media/pci/ivtv/ivtvfb.c | 1 -
drivers/media/test-drivers/vivid/vivid-osd.c | 1 -
drivers/staging/fbtft/fbtft-core.c | 2 +-
drivers/staging/sm750fb/sm750.c | 1 -
drivers/video/fbdev/68328fb.c | 2 +-
drivers/video/fbdev/acornfb.c | 2 +-
drivers/video/fbdev/amba-clcd.c | 1 -
drivers/video/fbdev/amifb.c | 5 ++---
drivers/video/fbdev/arcfb.c | 1 -
drivers/video/fbdev/asiliantfb.c | 1 -
drivers/video/fbdev/atafb.c | 1 -
drivers/video/fbdev/atmel_lcdfb.c | 2 +-
drivers/video/fbdev/aty/aty128fb.c | 1 -
drivers/video/fbdev/aty/atyfb_base.c | 3 +--
drivers/video/fbdev/aty/radeon_base.c | 3 +--
drivers/video/fbdev/broadsheetfb.c | 2 +-
drivers/video/fbdev/bw2.c | 1 -
drivers/video/fbdev/carminefb.c | 1 -
drivers/video/fbdev/cg14.c | 2 +-
drivers/video/fbdev/cg3.c | 1 -
drivers/video/fbdev/cg6.c | 2 +-
drivers/video/fbdev/chipsfb.c | 1 -
drivers/video/fbdev/cirrusfb.c | 3 +--
drivers/video/fbdev/clps711x-fb.c | 1 -
drivers/video/fbdev/cobalt_lcdfb.c | 1 -
drivers/video/fbdev/controlfb.c | 2 +-
drivers/video/fbdev/cyber2000fb.c | 2 +-
drivers/video/fbdev/da8xx-fb.c | 1 -
drivers/video/fbdev/efifb.c | 1 -
drivers/video/fbdev/ep93xx-fb.c | 1 -
drivers/video/fbdev/ffb.c | 3 +--
drivers/video/fbdev/fm2fb.c | 1 -
drivers/video/fbdev/fsl-diu-fb.c | 2 +-
drivers/video/fbdev/g364fb.c | 2 +-
drivers/video/fbdev/gbefb.c | 1 -
drivers/video/fbdev/geode/gx1fb_core.c | 1 -
drivers/video/fbdev/geode/gxfb_core.c | 1 -
drivers/video/fbdev/geode/lxfb_core.c | 1 -
drivers/video/fbdev/goldfishfb.c | 1 -
drivers/video/fbdev/grvga.c | 2 +-
drivers/video/fbdev/gxt4500.c | 3 +--
drivers/video/fbdev/hecubafb.c | 2 +-
drivers/video/fbdev/hgafb.c | 2 +-
drivers/video/fbdev/hitfb.c | 2 +-
drivers/video/fbdev/hpfb.c | 1 -
drivers/video/fbdev/hyperv_fb.c | 2 --
drivers/video/fbdev/i740fb.c | 2 +-
drivers/video/fbdev/i810/i810_main.c | 4 ++--
drivers/video/fbdev/imsttfb.c | 3 +--
drivers/video/fbdev/imxfb.c | 3 +--
drivers/video/fbdev/intelfb/intelfbdrv.c | 5 ++---
drivers/video/fbdev/kyro/fbdev.c | 1 -
drivers/video/fbdev/leo.c | 1 -
drivers/video/fbdev/macfb.c | 1 -
drivers/video/fbdev/matrox/matroxfb_crtc2.c | 5 ++---
drivers/video/fbdev/maxinefb.c | 1 -
drivers/video/fbdev/mb862xx/mb862xxfbdrv.c | 2 +-
drivers/video/fbdev/metronomefb.c | 2 +-
drivers/video/fbdev/mmp/fb/mmpfb.c | 2 +-
drivers/video/fbdev/mx3fb.c | 1 -
drivers/video/fbdev/neofb.c | 2 +-
drivers/video/fbdev/nvidia/nvidia.c | 4 ++--
drivers/video/fbdev/offb.c | 2 +-
drivers/video/fbdev/omap/omapfb_main.c | 1 -
drivers/video/fbdev/omap2/omapfb/omapfb-main.c | 1 -
drivers/video/fbdev/p9100.c | 1 -
drivers/video/fbdev/platinumfb.c | 1 -
drivers/video/fbdev/pm2fb.c | 3 +--
drivers/video/fbdev/pm3fb.c | 3 +--
drivers/video/fbdev/pmag-aa-fb.c | 1 -
drivers/video/fbdev/pmag-ba-fb.c | 1 -
drivers/video/fbdev/pmagb-b-fb.c | 1 -
drivers/video/fbdev/ps3fb.c | 2 +-
drivers/video/fbdev/pvr2fb.c | 2 +-
drivers/video/fbdev/pxa168fb.c | 2 +-
drivers/video/fbdev/pxafb.c | 2 --
drivers/video/fbdev/q40fb.c | 1 -
drivers/video/fbdev/riva/fbdev.c | 3 +--
drivers/video/fbdev/s1d13xxxfb.c | 4 ++--
drivers/video/fbdev/s3c-fb.c | 1 -
drivers/video/fbdev/sa1100fb.c | 1 -
drivers/video/fbdev/savage/savagefb_driver.c | 3 +--
drivers/video/fbdev/sh_mobile_lcdcfb.c | 2 --
drivers/video/fbdev/simplefb.c | 1 -
drivers/video/fbdev/sis/sis_main.c | 5 +----
drivers/video/fbdev/skeletonfb.c | 2 +-
drivers/video/fbdev/sm501fb.c | 2 +-
drivers/video/fbdev/sm712fb.c | 1 -
drivers/video/fbdev/smscufx.c | 2 +-
drivers/video/fbdev/sstfb.c | 1 -
drivers/video/fbdev/sunxvr1000.c | 1 -
drivers/video/fbdev/sunxvr2500.c | 1 -
drivers/video/fbdev/sunxvr500.c | 1 -
drivers/video/fbdev/tcx.c | 1 -
drivers/video/fbdev/tdfxfb.c | 2 +-
drivers/video/fbdev/tgafb.c | 2 +-
drivers/video/fbdev/tridentfb.c | 2 +-
drivers/video/fbdev/udlfb.c | 2 +-
drivers/video/fbdev/uvesafb.c | 3 +--
drivers/video/fbdev/valkyriefb.c | 1 -
drivers/video/fbdev/vermilion/vermilion.c | 2 +-
drivers/video/fbdev/vesafb.c | 2 +-
drivers/video/fbdev/vfb.c | 1 -
drivers/video/fbdev/vga16fb.c | 2 +-
drivers/video/fbdev/via/viafbdev.c | 2 +-
drivers/video/fbdev/vt8500lcdfb.c | 3 +--
drivers/video/fbdev/wm8505fb.c | 3 +--
drivers/video/fbdev/xen-fbfront.c | 2 +-
drivers/video/fbdev/xilinxfb.c | 1 -
include/linux/fb.h | 3 ---
samples/vfio-mdev/mdpy-fb.c | 1 -
119 files changed, 65 insertions(+), 150 deletions(-)
--
2.41.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 35+ messages in thread
* [PATCH 01/17] drm: Remove flag FBINFO_DEFAULT from fbdev emulation
2023-07-10 12:50 [PATCH 00/17] fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT flags Thomas Zimmermann
@ 2023-07-10 12:50 ` Thomas Zimmermann
2023-07-10 12:50 ` [PATCH 02/17] fbdev: Remove flag FBINFO_DEFAULT from fbdev drivers Thomas Zimmermann
` (15 subsequent siblings)
16 siblings, 0 replies; 35+ messages in thread
From: Thomas Zimmermann @ 2023-07-10 12:50 UTC (permalink / raw)
To: deller, javierm
Cc: linux-sh, dri-devel, linux-kernel, amd-gfx, linux-input,
linux-media, linux-fbdev, linux-staging, linux-arm-kernel,
linux-geode, linux-nvidia, linux-hyperv, linux-omap, linuxppc-dev,
kvm, Thomas Zimmermann, Patrik Jakobsson, Alex Deucher,
Christian König, Pan, Xinhui
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 occurences of FBINFO_DEFAULT, the token can be removed.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>
---
drivers/gpu/drm/drm_fbdev_dma.c | 1 -
drivers/gpu/drm/drm_fbdev_generic.c | 1 -
drivers/gpu/drm/gma500/fbdev.c | 2 +-
drivers/gpu/drm/radeon/radeon_fbdev.c | 2 +-
4 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/drm_fbdev_dma.c b/drivers/gpu/drm/drm_fbdev_dma.c
index 8217f1ddc007..bc5fdb1da6a3 100644
--- a/drivers/gpu/drm/drm_fbdev_dma.c
+++ b/drivers/gpu/drm/drm_fbdev_dma.c
@@ -123,7 +123,6 @@ static int drm_fbdev_dma_helper_fb_probe(struct drm_fb_helper *fb_helper,
drm_fb_helper_fill_info(info, fb_helper, sizes);
info->fbops = &drm_fbdev_dma_fb_ops;
- info->flags = FBINFO_DEFAULT;
/* screen */
info->flags |= FBINFO_VIRTFB; /* system memory */
diff --git a/drivers/gpu/drm/drm_fbdev_generic.c b/drivers/gpu/drm/drm_fbdev_generic.c
index 98ae703848a0..8a5600b33e10 100644
--- a/drivers/gpu/drm/drm_fbdev_generic.c
+++ b/drivers/gpu/drm/drm_fbdev_generic.c
@@ -109,7 +109,6 @@ static int drm_fbdev_generic_helper_fb_probe(struct drm_fb_helper *fb_helper,
drm_fb_helper_fill_info(info, fb_helper, sizes);
info->fbops = &drm_fbdev_generic_fb_ops;
- info->flags = FBINFO_DEFAULT;
/* screen */
info->flags |= FBINFO_VIRTFB | FBINFO_READS_FAST;
diff --git a/drivers/gpu/drm/gma500/fbdev.c b/drivers/gpu/drm/gma500/fbdev.c
index 955cbe9f05a7..b09a3ef770d4 100644
--- a/drivers/gpu/drm/gma500/fbdev.c
+++ b/drivers/gpu/drm/gma500/fbdev.c
@@ -215,7 +215,7 @@ static int psb_fbdev_fb_probe(struct drm_fb_helper *fb_helper,
}
info->fbops = &psb_fbdev_fb_ops;
- info->flags = FBINFO_DEFAULT;
+
/* Accessed stolen memory directly */
info->screen_base = dev_priv->vram_addr + backing->offset;
info->screen_size = size;
diff --git a/drivers/gpu/drm/radeon/radeon_fbdev.c b/drivers/gpu/drm/radeon/radeon_fbdev.c
index ab9c1abbac97..c632ca03032b 100644
--- a/drivers/gpu/drm/radeon/radeon_fbdev.c
+++ b/drivers/gpu/drm/radeon/radeon_fbdev.c
@@ -253,7 +253,7 @@ static int radeon_fbdev_fb_helper_fb_probe(struct drm_fb_helper *fb_helper,
}
info->fbops = &radeon_fbdev_fb_ops;
- info->flags = FBINFO_DEFAULT;
+
/* radeon resume is fragile and needs a vt switch to help it along */
info->skip_vt_switch = false;
--
2.41.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH 02/17] fbdev: Remove flag FBINFO_DEFAULT from fbdev drivers
2023-07-10 12:50 [PATCH 00/17] fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT flags Thomas Zimmermann
2023-07-10 12:50 ` [PATCH 01/17] drm: Remove flag FBINFO_DEFAULT from fbdev emulation Thomas Zimmermann
@ 2023-07-10 12:50 ` Thomas Zimmermann
2023-07-10 12:50 ` [PATCH 03/17] " Thomas Zimmermann
` (14 subsequent siblings)
16 siblings, 0 replies; 35+ messages in thread
From: Thomas Zimmermann @ 2023-07-10 12:50 UTC (permalink / raw)
To: deller, javierm
Cc: linux-sh, dri-devel, linux-kernel, amd-gfx, linux-input,
linux-media, linux-fbdev, linux-staging, linux-arm-kernel,
linux-geode, linux-nvidia, linux-hyperv, linux-omap, linuxppc-dev,
kvm, Thomas Zimmermann
The flag FBINFO_DEFAULT is 0 and has no effect, as struct fbinfo.flags
has been allocated to zero by a static declaration. So do not set it.
Flags should signal differences from the default values. After cleaning
up all occurences of FBINFO_DEFAULT, the token can be removed.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Helge Deller <deller@gmx.de>
---
drivers/video/fbdev/68328fb.c | 2 +-
drivers/video/fbdev/acornfb.c | 2 +-
drivers/video/fbdev/g364fb.c | 2 +-
drivers/video/fbdev/hpfb.c | 1 -
drivers/video/fbdev/macfb.c | 1 -
drivers/video/fbdev/maxinefb.c | 1 -
6 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/video/fbdev/68328fb.c b/drivers/video/fbdev/68328fb.c
index 07d6e8dc686b..956dd2399cc0 100644
--- a/drivers/video/fbdev/68328fb.c
+++ b/drivers/video/fbdev/68328fb.c
@@ -448,7 +448,7 @@ static 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_DEFAULT | FBINFO_HWACCEL_YPAN;
+ fb_info.flags = FBINFO_HWACCEL_YPAN;
if (fb_alloc_cmap(&fb_info.cmap, 256, 0))
return -ENOMEM;
diff --git a/drivers/video/fbdev/acornfb.c b/drivers/video/fbdev/acornfb.c
index 1b72edc01cfb..8fec21dfca09 100644
--- a/drivers/video/fbdev/acornfb.c
+++ b/drivers/video/fbdev/acornfb.c
@@ -694,7 +694,7 @@ static void acornfb_init_fbinfo(void)
first = 0;
fb_info.fbops = &acornfb_ops;
- fb_info.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
+ fb_info.flags = FBINFO_HWACCEL_YPAN;
fb_info.pseudo_palette = current_par.pseudo_palette;
strcpy(fb_info.fix.id, "Acorn");
diff --git a/drivers/video/fbdev/g364fb.c b/drivers/video/fbdev/g364fb.c
index c5b7673ddc6c..0825cbde116e 100644
--- a/drivers/video/fbdev/g364fb.c
+++ b/drivers/video/fbdev/g364fb.c
@@ -219,7 +219,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_DEFAULT | FBINFO_HWACCEL_YPAN;
+ fb_info.flags = FBINFO_HWACCEL_YPAN;
fb_alloc_cmap(&fb_info.cmap, 255, 0);
diff --git a/drivers/video/fbdev/hpfb.c b/drivers/video/fbdev/hpfb.c
index 77fbff47b1a8..406c1383cbda 100644
--- a/drivers/video/fbdev/hpfb.c
+++ b/drivers/video/fbdev/hpfb.c
@@ -287,7 +287,6 @@ static int hpfb_init_one(unsigned long phys_base, unsigned long virt_base)
else
strcat(fb_info.fix.id, "Catseye");
fb_info.fbops = &hpfb_ops;
- fb_info.flags = FBINFO_DEFAULT;
fb_info.var = hpfb_defined;
fb_info.screen_base = (char *)fb_start;
diff --git a/drivers/video/fbdev/macfb.c b/drivers/video/fbdev/macfb.c
index 44ff860a3f37..5ca208d992cc 100644
--- a/drivers/video/fbdev/macfb.c
+++ b/drivers/video/fbdev/macfb.c
@@ -876,7 +876,6 @@ static int __init macfb_init(void)
fb_info.var = macfb_defined;
fb_info.fix = macfb_fix;
fb_info.pseudo_palette = pseudo_palette;
- fb_info.flags = FBINFO_DEFAULT;
err = fb_alloc_cmap(&fb_info.cmap, video_cmap_len, 0);
if (err)
diff --git a/drivers/video/fbdev/maxinefb.c b/drivers/video/fbdev/maxinefb.c
index 4e6b05232ae2..0ac1873b2acb 100644
--- a/drivers/video/fbdev/maxinefb.c
+++ b/drivers/video/fbdev/maxinefb.c
@@ -155,7 +155,6 @@ 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_DEFAULT;
fb_alloc_cmap(&fb_info.cmap, 256, 0);
--
2.41.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH 03/17] fbdev: Remove flag FBINFO_DEFAULT from fbdev drivers
2023-07-10 12:50 [PATCH 00/17] fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT flags Thomas Zimmermann
2023-07-10 12:50 ` [PATCH 01/17] drm: Remove flag FBINFO_DEFAULT from fbdev emulation Thomas Zimmermann
2023-07-10 12:50 ` [PATCH 02/17] fbdev: Remove flag FBINFO_DEFAULT from fbdev drivers Thomas Zimmermann
@ 2023-07-10 12:50 ` Thomas Zimmermann
2023-07-10 12:50 ` [PATCH 04/17] " Thomas Zimmermann
` (13 subsequent siblings)
16 siblings, 0 replies; 35+ messages in thread
From: Thomas Zimmermann @ 2023-07-10 12:50 UTC (permalink / raw)
To: deller, javierm
Cc: linux-sh, dri-devel, linux-kernel, amd-gfx, linux-input,
linux-media, linux-fbdev, linux-staging, linux-arm-kernel,
linux-geode, linux-nvidia, linux-hyperv, linux-omap, linuxppc-dev,
kvm, Thomas Zimmermann, Russell King
The flag FBINFO_DEFAULT is 0 and has no effect, as struct fbinfo.flags
has been allocated to zero by kzalloc(). So do not set it.
Flags should signal differences from the default values. After cleaning
up all occurences of FBINFO_DEFAULT, the token can be removed.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Helge Deller <deller@gmx.de>
Cc: Russell King <linux@armlinux.org.uk>
---
drivers/video/fbdev/controlfb.c | 2 +-
drivers/video/fbdev/cyber2000fb.c | 2 +-
drivers/video/fbdev/valkyriefb.c | 1 -
drivers/video/fbdev/vermilion/vermilion.c | 2 +-
drivers/video/fbdev/vt8500lcdfb.c | 3 +--
5 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/video/fbdev/controlfb.c b/drivers/video/fbdev/controlfb.c
index 82eeb139c4eb..717134c141ff 100644
--- a/drivers/video/fbdev/controlfb.c
+++ b/drivers/video/fbdev/controlfb.c
@@ -775,7 +775,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_DEFAULT | FBINFO_HWACCEL_YPAN;
+ info->flags = FBINFO_HWACCEL_YPAN;
info->screen_base = p->frame_buffer + CTRLFB_OFF;
fb_alloc_cmap(&info->cmap, 256, 0);
diff --git a/drivers/video/fbdev/cyber2000fb.c b/drivers/video/fbdev/cyber2000fb.c
index 38c0a6866d76..98ea56a9abf1 100644
--- a/drivers/video/fbdev/cyber2000fb.c
+++ b/drivers/video/fbdev/cyber2000fb.c
@@ -1459,7 +1459,7 @@ static struct cfb_info *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_DEFAULT | FBINFO_HWACCEL_YPAN;
+ cfb->fb.flags = FBINFO_HWACCEL_YPAN;
cfb->fb.pseudo_palette = cfb->pseudo_palette;
spin_lock_init(&cfb->reg_b0_lock);
diff --git a/drivers/video/fbdev/valkyriefb.c b/drivers/video/fbdev/valkyriefb.c
index b166b7cfe0e5..fd4488777032 100644
--- a/drivers/video/fbdev/valkyriefb.c
+++ b/drivers/video/fbdev/valkyriefb.c
@@ -535,7 +535,6 @@ static int __init valkyrie_init_info(struct fb_info *info,
{
info->fbops = &valkyriefb_ops;
info->screen_base = p->frame_buffer + 0x1000;
- info->flags = FBINFO_DEFAULT;
info->pseudo_palette = p->pseudo_palette;
info->par = &p->par;
return fb_alloc_cmap(&info->cmap, 256, 0);
diff --git a/drivers/video/fbdev/vermilion/vermilion.c b/drivers/video/fbdev/vermilion/vermilion.c
index 32e74e02a02f..71584c775efd 100644
--- a/drivers/video/fbdev/vermilion/vermilion.c
+++ b/drivers/video/fbdev/vermilion/vermilion.c
@@ -477,7 +477,7 @@ static int vml_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
}
info = &vinfo->info;
- info->flags = FBINFO_DEFAULT | FBINFO_PARTIAL_PAN_OK;
+ info->flags = FBINFO_PARTIAL_PAN_OK;
err = vmlfb_enable_mmio(par);
if (err)
diff --git a/drivers/video/fbdev/vt8500lcdfb.c b/drivers/video/fbdev/vt8500lcdfb.c
index 31d4e85b220c..42d39a9d5130 100644
--- a/drivers/video/fbdev/vt8500lcdfb.c
+++ b/drivers/video/fbdev/vt8500lcdfb.c
@@ -300,8 +300,7 @@ static int vt8500lcd_probe(struct platform_device *pdev)
fbi->fb.var.vmode = FB_VMODE_NONINTERLACED;
fbi->fb.fbops = &vt8500lcd_ops;
- fbi->fb.flags = FBINFO_DEFAULT
- | FBINFO_HWACCEL_COPYAREA
+ fbi->fb.flags = FBINFO_HWACCEL_COPYAREA
| FBINFO_HWACCEL_FILLRECT
| FBINFO_HWACCEL_YPAN
| FBINFO_VIRTFB
--
2.41.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH 04/17] fbdev: Remove flag FBINFO_DEFAULT from fbdev drivers
2023-07-10 12:50 [PATCH 00/17] fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT flags Thomas Zimmermann
` (2 preceding siblings ...)
2023-07-10 12:50 ` [PATCH 03/17] " Thomas Zimmermann
@ 2023-07-10 12:50 ` Thomas Zimmermann
2023-07-10 12:50 ` [PATCH 06/17] fbdev/fsl-diu-fb: Remove flag FBINFO_DEFAULT Thomas Zimmermann
` (12 subsequent siblings)
16 siblings, 0 replies; 35+ messages in thread
From: Thomas Zimmermann @ 2023-07-10 12:50 UTC (permalink / raw)
To: deller, javierm
Cc: linux-sh, dri-devel, linux-kernel, amd-gfx, linux-input,
linux-media, linux-fbdev, linux-staging, linux-arm-kernel,
linux-geode, linux-nvidia, linux-hyperv, linux-omap, linuxppc-dev,
kvm, Thomas Zimmermann
The flag FBINFO_DEFAULT is 0 and has no effect, as struct fbinfo.flags
has been allocated to zero by devm_kzalloc(). So do not set it.
Flags should signal differences from the default values. After cleaning
up all occurences of FBINFO_DEFAULT, the token can be removed.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Helge Deller <deller@gmx.de>
---
drivers/video/fbdev/pxafb.c | 1 -
drivers/video/fbdev/sa1100fb.c | 1 -
drivers/video/fbdev/wm8505fb.c | 3 +--
drivers/video/fbdev/xilinxfb.c | 1 -
4 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c
index 2a8b1dea3a67..c8c4677d06b4 100644
--- a/drivers/video/fbdev/pxafb.c
+++ b/drivers/video/fbdev/pxafb.c
@@ -1826,7 +1826,6 @@ static struct pxafb_info *pxafb_init_fbinfo(struct device *dev,
fbi->fb.var.vmode = FB_VMODE_NONINTERLACED;
fbi->fb.fbops = &pxafb_ops;
- fbi->fb.flags = FBINFO_DEFAULT;
fbi->fb.node = -1;
addr = fbi;
diff --git a/drivers/video/fbdev/sa1100fb.c b/drivers/video/fbdev/sa1100fb.c
index a2408bf00ca0..3d76ce111488 100644
--- a/drivers/video/fbdev/sa1100fb.c
+++ b/drivers/video/fbdev/sa1100fb.c
@@ -1089,7 +1089,6 @@ static struct sa1100fb_info *sa1100fb_init_fbinfo(struct device *dev)
fbi->fb.var.vmode = FB_VMODE_NONINTERLACED;
fbi->fb.fbops = &sa1100fb_ops;
- fbi->fb.flags = FBINFO_DEFAULT;
fbi->fb.monspecs = monspecs;
fbi->fb.pseudo_palette = fbi->pseudo_palette;
diff --git a/drivers/video/fbdev/wm8505fb.c b/drivers/video/fbdev/wm8505fb.c
index 10a8b1250103..5833147aa43d 100644
--- a/drivers/video/fbdev/wm8505fb.c
+++ b/drivers/video/fbdev/wm8505fb.c
@@ -285,8 +285,7 @@ static int wm8505fb_probe(struct platform_device *pdev)
fbi->fb.fix.accel = FB_ACCEL_NONE;
fbi->fb.fbops = &wm8505fb_ops;
- fbi->fb.flags = FBINFO_DEFAULT
- | FBINFO_HWACCEL_COPYAREA
+ fbi->fb.flags = FBINFO_HWACCEL_COPYAREA
| FBINFO_HWACCEL_FILLRECT
| FBINFO_HWACCEL_XPAN
| FBINFO_HWACCEL_YPAN
diff --git a/drivers/video/fbdev/xilinxfb.c b/drivers/video/fbdev/xilinxfb.c
index 2aa3a528277f..768a281a8d2c 100644
--- a/drivers/video/fbdev/xilinxfb.c
+++ b/drivers/video/fbdev/xilinxfb.c
@@ -324,7 +324,6 @@ static int xilinxfb_assign(struct platform_device *pdev,
drvdata->info.fix.line_length = pdata->xvirt * BYTES_PER_PIXEL;
drvdata->info.pseudo_palette = drvdata->pseudo_palette;
- drvdata->info.flags = FBINFO_DEFAULT;
drvdata->info.var = xilinx_fb_var;
drvdata->info.var.height = pdata->screen_height_mm;
drvdata->info.var.width = pdata->screen_width_mm;
--
2.41.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH 06/17] fbdev/fsl-diu-fb: Remove flag FBINFO_DEFAULT
2023-07-10 12:50 [PATCH 00/17] fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT flags Thomas Zimmermann
` (3 preceding siblings ...)
2023-07-10 12:50 ` [PATCH 04/17] " Thomas Zimmermann
@ 2023-07-10 12:50 ` Thomas Zimmermann
2023-07-10 12:50 ` [PATCH 07/17] vfio-mdev: Remove flag FBINFO_DEFAULT from fbdev sample driver Thomas Zimmermann
` (11 subsequent siblings)
16 siblings, 0 replies; 35+ messages in thread
From: Thomas Zimmermann @ 2023-07-10 12:50 UTC (permalink / raw)
To: deller, javierm
Cc: linux-sh, dri-devel, linux-kernel, amd-gfx, linux-input,
linux-media, linux-fbdev, linux-staging, linux-arm-kernel,
linux-geode, linux-nvidia, linux-hyperv, linux-omap, linuxppc-dev,
kvm, Thomas Zimmermann, Timur Tabi
The flag FBINFO_DEFAULT is 0 and has no effect, as struct fbinfo.flags
has been allocated to zero by dmam_alloc_coherent(__GFP_ZERO). So do not
set it.
Flags should signal differences from the default values. After cleaning
up all occurences of FBINFO_DEFAULT, the token can be removed.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Timur Tabi <timur@kernel.org>
Cc: Helge Deller <deller@gmx.de>
---
drivers/video/fbdev/fsl-diu-fb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/fsl-diu-fb.c b/drivers/video/fbdev/fsl-diu-fb.c
index 785eb8a06943..c62b48f27ba9 100644
--- a/drivers/video/fbdev/fsl-diu-fb.c
+++ b/drivers/video/fbdev/fsl-diu-fb.c
@@ -1476,7 +1476,7 @@ static int install_fb(struct fb_info *info)
info->var.activate = FB_ACTIVATE_NOW;
info->fbops = &fsl_diu_ops;
- info->flags = FBINFO_DEFAULT | FBINFO_VIRTFB | FBINFO_PARTIAL_PAN_OK |
+ info->flags = FBINFO_VIRTFB | FBINFO_PARTIAL_PAN_OK |
FBINFO_READS_FAST;
info->pseudo_palette = mfbi->pseudo_palette;
--
2.41.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH 07/17] vfio-mdev: Remove flag FBINFO_DEFAULT from fbdev sample driver
2023-07-10 12:50 [PATCH 00/17] fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT flags Thomas Zimmermann
` (4 preceding siblings ...)
2023-07-10 12:50 ` [PATCH 06/17] fbdev/fsl-diu-fb: Remove flag FBINFO_DEFAULT Thomas Zimmermann
@ 2023-07-10 12:50 ` Thomas Zimmermann
2023-07-10 12:50 ` [PATCH 08/17] arch/sh: Do not assign FBINFO_FLAG_DEFAULT to fb_videomode.flag Thomas Zimmermann
` (10 subsequent siblings)
16 siblings, 0 replies; 35+ messages in thread
From: Thomas Zimmermann @ 2023-07-10 12:50 UTC (permalink / raw)
To: deller, javierm
Cc: linux-sh, dri-devel, linux-kernel, amd-gfx, linux-input,
linux-media, linux-fbdev, linux-staging, linux-arm-kernel,
linux-geode, linux-nvidia, linux-hyperv, linux-omap, linuxppc-dev,
kvm, Thomas Zimmermann, Kirti Wankhede
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 occurences of FBINFO_DEFAULT, the token can be removed.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Kirti Wankhede <kwankhede@nvidia.com>
---
samples/vfio-mdev/mdpy-fb.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/samples/vfio-mdev/mdpy-fb.c b/samples/vfio-mdev/mdpy-fb.c
index 3c8001b9e407..cda477b28685 100644
--- a/samples/vfio-mdev/mdpy-fb.c
+++ b/samples/vfio-mdev/mdpy-fb.c
@@ -162,7 +162,6 @@ static int mdpy_fb_probe(struct pci_dev *pdev,
}
info->fbops = &mdpy_fb_ops;
- info->flags = FBINFO_DEFAULT;
info->pseudo_palette = par->palette;
ret = register_framebuffer(info);
--
2.41.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH 08/17] arch/sh: Do not assign FBINFO_FLAG_DEFAULT to fb_videomode.flag
2023-07-10 12:50 [PATCH 00/17] fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT flags Thomas Zimmermann
` (5 preceding siblings ...)
2023-07-10 12:50 ` [PATCH 07/17] vfio-mdev: Remove flag FBINFO_DEFAULT from fbdev sample driver Thomas Zimmermann
@ 2023-07-10 12:50 ` Thomas Zimmermann
2023-07-10 13:42 ` John Paul Adrian Glaubitz
2023-07-10 12:50 ` [PATCH 09/17] auxdisplay: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers Thomas Zimmermann
` (9 subsequent siblings)
16 siblings, 1 reply; 35+ messages in thread
From: Thomas Zimmermann @ 2023-07-10 12:50 UTC (permalink / raw)
To: deller, javierm
Cc: linux-sh, dri-devel, linux-kernel, amd-gfx, linux-input,
linux-media, linux-fbdev, linux-staging, linux-arm-kernel,
linux-geode, linux-nvidia, linux-hyperv, linux-omap, linuxppc-dev,
kvm, Thomas Zimmermann, Yoshinori Sato, Rich Felker,
John Paul Adrian Glaubitz
FBINFO_FLAG_DEFAULT is a flag for a framebuffer in struct fb_info.
Flags for videomodes are prefixed with FB_MODE_. FBINFO_FLAG_DEFAULT
is 0 and the static declaration already clears the memory area of
sh7763fb_videomode. So remove the assignment.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
---
arch/sh/boards/mach-sh7763rdp/setup.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/sh/boards/mach-sh7763rdp/setup.c b/arch/sh/boards/mach-sh7763rdp/setup.c
index 97e715e4e9b3..345f2b76c85a 100644
--- a/arch/sh/boards/mach-sh7763rdp/setup.c
+++ b/arch/sh/boards/mach-sh7763rdp/setup.c
@@ -119,7 +119,6 @@ static struct fb_videomode sh7763fb_videomode = {
.vsync_len = 1,
.sync = 0,
.vmode = FB_VMODE_NONINTERLACED,
- .flag = FBINFO_FLAG_DEFAULT,
};
static struct sh7760fb_platdata sh7763fb_def_pdata = {
--
2.41.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH 09/17] auxdisplay: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers
2023-07-10 12:50 [PATCH 00/17] fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT flags Thomas Zimmermann
` (6 preceding siblings ...)
2023-07-10 12:50 ` [PATCH 08/17] arch/sh: Do not assign FBINFO_FLAG_DEFAULT to fb_videomode.flag Thomas Zimmermann
@ 2023-07-10 12:50 ` Thomas Zimmermann
2023-07-10 14:24 ` Miguel Ojeda
2023-07-10 12:50 ` [PATCH 10/17] hid/picolcd: Remove flag FBINFO_FLAG_DEFAULT from fbdev driver Thomas Zimmermann
` (8 subsequent siblings)
16 siblings, 1 reply; 35+ messages in thread
From: Thomas Zimmermann @ 2023-07-10 12:50 UTC (permalink / raw)
To: deller, javierm
Cc: linux-sh, dri-devel, linux-kernel, amd-gfx, linux-input,
linux-media, linux-fbdev, linux-staging, linux-arm-kernel,
linux-geode, linux-nvidia, linux-hyperv, linux-omap, linuxppc-dev,
kvm, Thomas Zimmermann, Miguel Ojeda, Robin van der Gracht
The flag FBINFO_FLAG_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 occurences of FBINFO_FLAG_DEFAULT, the token can be removed.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Miguel Ojeda <ojeda@kernel.org>
Cc: Robin van der Gracht <robin@protonic.nl>
---
drivers/auxdisplay/cfag12864bfb.c | 1 -
drivers/auxdisplay/ht16k33.c | 1 -
2 files changed, 2 deletions(-)
diff --git a/drivers/auxdisplay/cfag12864bfb.c b/drivers/auxdisplay/cfag12864bfb.c
index c2cab7e2b126..729845bcc803 100644
--- a/drivers/auxdisplay/cfag12864bfb.c
+++ b/drivers/auxdisplay/cfag12864bfb.c
@@ -79,7 +79,6 @@ static int cfag12864bfb_probe(struct platform_device *device)
info->var = cfag12864bfb_var;
info->pseudo_palette = NULL;
info->par = NULL;
- info->flags = FBINFO_FLAG_DEFAULT;
if (register_framebuffer(info) < 0)
goto fballoced;
diff --git a/drivers/auxdisplay/ht16k33.c b/drivers/auxdisplay/ht16k33.c
index edaf92b7ea77..df3f37651e45 100644
--- a/drivers/auxdisplay/ht16k33.c
+++ b/drivers/auxdisplay/ht16k33.c
@@ -646,7 +646,6 @@ static int ht16k33_fbdev_probe(struct device *dev, struct ht16k33_priv *priv,
fbdev->info->var = ht16k33_fb_var;
fbdev->info->bl_dev = bl;
fbdev->info->pseudo_palette = NULL;
- fbdev->info->flags = FBINFO_FLAG_DEFAULT;
fbdev->info->par = priv;
err = register_framebuffer(fbdev->info);
--
2.41.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH 10/17] hid/picolcd: Remove flag FBINFO_FLAG_DEFAULT from fbdev driver
2023-07-10 12:50 [PATCH 00/17] fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT flags Thomas Zimmermann
` (7 preceding siblings ...)
2023-07-10 12:50 ` [PATCH 09/17] auxdisplay: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers Thomas Zimmermann
@ 2023-07-10 12:50 ` Thomas Zimmermann
2023-07-10 13:05 ` Benjamin Tissoires
2023-07-12 9:43 ` Bruno Prémont
2023-07-10 12:50 ` [PATCH 11/17] media: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers Thomas Zimmermann
` (7 subsequent siblings)
16 siblings, 2 replies; 35+ messages in thread
From: Thomas Zimmermann @ 2023-07-10 12:50 UTC (permalink / raw)
To: deller, javierm
Cc: linux-sh, dri-devel, linux-kernel, amd-gfx, linux-input,
linux-media, linux-fbdev, linux-staging, linux-arm-kernel,
linux-geode, linux-nvidia, linux-hyperv, linux-omap, linuxppc-dev,
kvm, Thomas Zimmermann, Bruno Prémont, Jiri Kosina,
Benjamin Tissoires
The flag FBINFO_FLAG_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 occurences of FBINFO_FLAG_DEFAULT, the token can be removed.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: "Bruno Prémont" <bonbons@linux-vserver.org>
Cc: Jiri Kosina <jikos@kernel.org>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
---
drivers/hid/hid-picolcd_fb.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/hid/hid-picolcd_fb.c b/drivers/hid/hid-picolcd_fb.c
index dabcd054dad9..d726aaafb146 100644
--- a/drivers/hid/hid-picolcd_fb.c
+++ b/drivers/hid/hid-picolcd_fb.c
@@ -527,7 +527,6 @@ int picolcd_init_framebuffer(struct picolcd_data *data)
info->var = picolcdfb_var;
info->fix = picolcdfb_fix;
info->fix.smem_len = PICOLCDFB_SIZE*8;
- info->flags = FBINFO_FLAG_DEFAULT;
fbdata = info->par;
spin_lock_init(&fbdata->lock);
--
2.41.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH 11/17] media: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers
2023-07-10 12:50 [PATCH 00/17] fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT flags Thomas Zimmermann
` (8 preceding siblings ...)
2023-07-10 12:50 ` [PATCH 10/17] hid/picolcd: Remove flag FBINFO_FLAG_DEFAULT from fbdev driver Thomas Zimmermann
@ 2023-07-10 12:50 ` Thomas Zimmermann
2023-07-10 12:50 ` [PATCH 12/17] staging: " Thomas Zimmermann
` (6 subsequent siblings)
16 siblings, 0 replies; 35+ messages in thread
From: Thomas Zimmermann @ 2023-07-10 12:50 UTC (permalink / raw)
To: deller, javierm
Cc: linux-sh, dri-devel, linux-kernel, amd-gfx, linux-input,
linux-media, linux-fbdev, linux-staging, linux-arm-kernel,
linux-geode, linux-nvidia, linux-hyperv, linux-omap, linuxppc-dev,
kvm, Thomas Zimmermann, Andy Walls, Mauro Carvalho Chehab,
Hans Verkuil
The flag FBINFO_FLAG_DEFAULT is 0 and has no effect, as struct
fbinfo.flags has been allocated to zero by kzalloc(). So do not
set it.
Flags should signal differences from the default values. After cleaning
up all occurences of FBINFO_FLAG_DEFAULT, the token can be removed.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Andy Walls <awalls@md.metrocast.net>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Hans Verkuil <hverkuil@xs4all.nl>
---
drivers/media/pci/ivtv/ivtvfb.c | 1 -
drivers/media/test-drivers/vivid/vivid-osd.c | 1 -
2 files changed, 2 deletions(-)
diff --git a/drivers/media/pci/ivtv/ivtvfb.c b/drivers/media/pci/ivtv/ivtvfb.c
index 0aeb9daaee4c..23c8c094e791 100644
--- a/drivers/media/pci/ivtv/ivtvfb.c
+++ b/drivers/media/pci/ivtv/ivtvfb.c
@@ -1048,7 +1048,6 @@ static int ivtvfb_init_vidmode(struct ivtv *itv)
/* Generate valid fb_info */
oi->ivtvfb_info.node = -1;
- oi->ivtvfb_info.flags = FBINFO_FLAG_DEFAULT;
oi->ivtvfb_info.par = itv;
oi->ivtvfb_info.var = oi->ivtvfb_defined;
oi->ivtvfb_info.fix = oi->ivtvfb_fix;
diff --git a/drivers/media/test-drivers/vivid/vivid-osd.c b/drivers/media/test-drivers/vivid/vivid-osd.c
index ec25edc679b3..051f1805a16d 100644
--- a/drivers/media/test-drivers/vivid/vivid-osd.c
+++ b/drivers/media/test-drivers/vivid/vivid-osd.c
@@ -310,7 +310,6 @@ static int vivid_fb_init_vidmode(struct vivid_dev *dev)
/* Generate valid fb_info */
dev->fb_info.node = -1;
- dev->fb_info.flags = FBINFO_FLAG_DEFAULT;
dev->fb_info.par = dev;
dev->fb_info.var = dev->fb_defined;
dev->fb_info.fix = dev->fb_fix;
--
2.41.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH 12/17] staging: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers
2023-07-10 12:50 [PATCH 00/17] fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT flags Thomas Zimmermann
` (9 preceding siblings ...)
2023-07-10 12:50 ` [PATCH 11/17] media: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers Thomas Zimmermann
@ 2023-07-10 12:50 ` Thomas Zimmermann
2023-07-10 12:50 ` [PATCH 13/17] fbdev: " Thomas Zimmermann
` (5 subsequent siblings)
16 siblings, 0 replies; 35+ messages in thread
From: Thomas Zimmermann @ 2023-07-10 12:50 UTC (permalink / raw)
To: deller, javierm
Cc: linux-sh, dri-devel, linux-kernel, amd-gfx, linux-input,
linux-media, linux-fbdev, linux-staging, linux-arm-kernel,
linux-geode, linux-nvidia, linux-hyperv, linux-omap, linuxppc-dev,
kvm, Thomas Zimmermann, Greg Kroah-Hartman, Sudip Mukherjee,
Teddy Wang
The flag FBINFO_FLAG_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 occurences of FBINFO_FLAG_DEFAULT, the token can be removed.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Teddy Wang <teddy.wang@siliconmotion.com>
---
drivers/staging/fbtft/fbtft-core.c | 2 +-
drivers/staging/sm750fb/sm750.c | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c
index 3a4abf3bae40..eac1d570f437 100644
--- a/drivers/staging/fbtft/fbtft-core.c
+++ b/drivers/staging/fbtft/fbtft-core.c
@@ -684,7 +684,7 @@ struct fb_info *fbtft_framebuffer_alloc(struct fbtft_display *display,
info->var.transp.offset = 0;
info->var.transp.length = 0;
- info->flags = FBINFO_FLAG_DEFAULT | FBINFO_VIRTFB;
+ info->flags = FBINFO_VIRTFB;
par = info->par;
par->info = info;
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index c260f73cf570..79bcd5bd4938 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -807,7 +807,6 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
info->screen_base = crtc->v_screen;
pr_debug("screen_base vaddr = %p\n", info->screen_base);
info->screen_size = line_length * var->yres_virtual;
- info->flags = FBINFO_FLAG_DEFAULT | 0;
/* set info->fix */
fix->type = FB_TYPE_PACKED_PIXELS;
--
2.41.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH 13/17] fbdev: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers
2023-07-10 12:50 [PATCH 00/17] fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT flags Thomas Zimmermann
` (10 preceding siblings ...)
2023-07-10 12:50 ` [PATCH 12/17] staging: " Thomas Zimmermann
@ 2023-07-10 12:50 ` Thomas Zimmermann
2023-07-10 12:50 ` [PATCH 14/17] " Thomas Zimmermann
` (4 subsequent siblings)
16 siblings, 0 replies; 35+ messages in thread
From: Thomas Zimmermann @ 2023-07-10 12:50 UTC (permalink / raw)
To: deller, javierm
Cc: linux-sh, dri-devel, linux-kernel, amd-gfx, linux-input,
linux-media, linux-fbdev, linux-staging, linux-arm-kernel,
linux-geode, linux-nvidia, linux-hyperv, linux-omap, linuxppc-dev,
kvm, Thomas Zimmermann
The flag FBINFO_FLAG_DEFAULT is 0 and has no effect, as struct
fbinfo.flags has been allocated to zero by kzalloc(). So do not
set it.
Flags should signal differences from the default values. After cleaning
up all occurences of FBINFO_FLAG_DEFAULT, the token can be removed.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Helge Deller <deller@gmx.de>
---
drivers/video/fbdev/amba-clcd.c | 1 -
drivers/video/fbdev/matrox/matroxfb_crtc2.c | 5 ++---
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/video/fbdev/amba-clcd.c b/drivers/video/fbdev/amba-clcd.c
index e45338227be6..24d89e6fb780 100644
--- a/drivers/video/fbdev/amba-clcd.c
+++ b/drivers/video/fbdev/amba-clcd.c
@@ -461,7 +461,6 @@ static int clcdfb_register(struct clcd_fb *fb)
}
fb->fb.fbops = &clcdfb_ops;
- fb->fb.flags = FBINFO_FLAG_DEFAULT;
fb->fb.pseudo_palette = fb->cmap;
strncpy(fb->fb.fix.id, clcd_name, sizeof(fb->fb.fix.id));
diff --git a/drivers/video/fbdev/matrox/matroxfb_crtc2.c b/drivers/video/fbdev/matrox/matroxfb_crtc2.c
index 7655afa3fd50..372197c124de 100644
--- a/drivers/video/fbdev/matrox/matroxfb_crtc2.c
+++ b/drivers/video/fbdev/matrox/matroxfb_crtc2.c
@@ -603,9 +603,8 @@ static int matroxfb_dh_regit(const struct matrox_fb_info *minfo,
void* oldcrtc2;
m2info->fbcon.fbops = &matroxfb_dh_ops;
- m2info->fbcon.flags = FBINFO_FLAG_DEFAULT;
- m2info->fbcon.flags |= FBINFO_HWACCEL_XPAN |
- FBINFO_HWACCEL_YPAN;
+ m2info->fbcon.flags = FBINFO_HWACCEL_XPAN |
+ FBINFO_HWACCEL_YPAN;
m2info->fbcon.pseudo_palette = m2info->cmap;
fb_alloc_cmap(&m2info->fbcon.cmap, 256, 1);
--
2.41.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH 14/17] fbdev: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers
2023-07-10 12:50 [PATCH 00/17] fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT flags Thomas Zimmermann
` (11 preceding siblings ...)
2023-07-10 12:50 ` [PATCH 13/17] fbdev: " Thomas Zimmermann
@ 2023-07-10 12:50 ` Thomas Zimmermann
2023-07-10 12:50 ` [PATCH 15/17] fbdev/atafb: Remove flag FBINFO_FLAG_DEFAULT Thomas Zimmermann
` (3 subsequent siblings)
16 siblings, 0 replies; 35+ messages in thread
From: Thomas Zimmermann @ 2023-07-10 12:50 UTC (permalink / raw)
To: deller, javierm
Cc: linux-sh, dri-devel, linux-kernel, amd-gfx, linux-input,
linux-media, linux-fbdev, linux-staging, linux-arm-kernel,
linux-geode, linux-nvidia, linux-hyperv, linux-omap, linuxppc-dev,
kvm, Thomas Zimmermann, Jaya Kumar, Peter Jones, Sascha Hauer,
Pengutronix Kernel Team, Shawn Guo, Fabio Estevam, NXP Linux Team,
Maik Broemme, Jingoo Han, Sudip Mukherjee, Teddy Wang,
Michal Januszewski
The flag FBINFO_FLAG_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 occurences of FBINFO_FLAG_DEFAULT, the token can be removed.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Jaya Kumar <jayalk@intworks.biz>
Cc: Helge Deller <deller@gmx.de>
Cc: Peter Jones <pjones@redhat.com>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP Linux Team <linux-imx@nxp.com>
Cc: Maik Broemme <mbroemme@libmpq.org>
Cc: Jingoo Han <jingoohan1@gmail.com>
Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Teddy Wang <teddy.wang@siliconmotion.com>
Cc: Michal Januszewski <spock@gentoo.org>
---
drivers/video/fbdev/arcfb.c | 1 -
drivers/video/fbdev/aty/aty128fb.c | 1 -
drivers/video/fbdev/broadsheetfb.c | 2 +-
drivers/video/fbdev/da8xx-fb.c | 1 -
drivers/video/fbdev/efifb.c | 1 -
drivers/video/fbdev/goldfishfb.c | 1 -
drivers/video/fbdev/gxt4500.c | 3 +--
drivers/video/fbdev/hecubafb.c | 2 +-
drivers/video/fbdev/imxfb.c | 3 +--
drivers/video/fbdev/intelfb/intelfbdrv.c | 1 -
drivers/video/fbdev/metronomefb.c | 2 +-
drivers/video/fbdev/mx3fb.c | 1 -
drivers/video/fbdev/omap/omapfb_main.c | 1 -
drivers/video/fbdev/omap2/omapfb/omapfb-main.c | 1 -
drivers/video/fbdev/s3c-fb.c | 1 -
drivers/video/fbdev/sh_mobile_lcdcfb.c | 2 --
drivers/video/fbdev/sis/sis_main.c | 2 --
drivers/video/fbdev/sm501fb.c | 2 +-
drivers/video/fbdev/sm712fb.c | 1 -
drivers/video/fbdev/uvesafb.c | 3 +--
drivers/video/fbdev/vesafb.c | 2 +-
drivers/video/fbdev/vfb.c | 1 -
drivers/video/fbdev/vga16fb.c | 2 +-
drivers/video/fbdev/xen-fbfront.c | 2 +-
24 files changed, 10 insertions(+), 29 deletions(-)
diff --git a/drivers/video/fbdev/arcfb.c b/drivers/video/fbdev/arcfb.c
index 9aaea3be8281..cff11cb04a55 100644
--- a/drivers/video/fbdev/arcfb.c
+++ b/drivers/video/fbdev/arcfb.c
@@ -546,7 +546,6 @@ static int arcfb_probe(struct platform_device *dev)
par->c2io_addr = c2io_addr;
par->cslut[0] = 0x00;
par->cslut[1] = 0x06;
- info->flags = FBINFO_FLAG_DEFAULT;
spin_lock_init(&par->lock);
if (irq) {
par->irq = irq;
diff --git a/drivers/video/fbdev/aty/aty128fb.c b/drivers/video/fbdev/aty/aty128fb.c
index 2d9320a52e51..b44fc78ccd4f 100644
--- a/drivers/video/fbdev/aty/aty128fb.c
+++ b/drivers/video/fbdev/aty/aty128fb.c
@@ -1927,7 +1927,6 @@ static int aty128_init(struct pci_dev *pdev, const struct pci_device_id *ent)
/* fill in info */
info->fbops = &aty128fb_ops;
- info->flags = FBINFO_FLAG_DEFAULT;
par->lcd_on = default_lcd_on;
par->crt_on = default_crt_on;
diff --git a/drivers/video/fbdev/broadsheetfb.c b/drivers/video/fbdev/broadsheetfb.c
index cb725a91b6bb..e51e14c29c55 100644
--- a/drivers/video/fbdev/broadsheetfb.c
+++ b/drivers/video/fbdev/broadsheetfb.c
@@ -1069,7 +1069,7 @@ static int broadsheetfb_probe(struct platform_device *dev)
mutex_init(&par->io_lock);
- info->flags = FBINFO_FLAG_DEFAULT | FBINFO_VIRTFB;
+ info->flags = FBINFO_VIRTFB;
info->fbdefio = &broadsheetfb_defio;
fb_deferred_io_init(info);
diff --git a/drivers/video/fbdev/da8xx-fb.c b/drivers/video/fbdev/da8xx-fb.c
index 60cd1286370f..988dedcf6be8 100644
--- a/drivers/video/fbdev/da8xx-fb.c
+++ b/drivers/video/fbdev/da8xx-fb.c
@@ -1463,7 +1463,6 @@ static int fb_probe(struct platform_device *device)
da8xx_fb_var.bits_per_pixel = lcd_cfg->bpp;
/* Initialize fbinfo */
- da8xx_fb_info->flags = FBINFO_FLAG_DEFAULT;
da8xx_fb_info->fix = da8xx_fb_fix;
da8xx_fb_info->var = da8xx_fb_var;
da8xx_fb_info->fbops = &da8xx_fb_ops;
diff --git a/drivers/video/fbdev/efifb.c b/drivers/video/fbdev/efifb.c
index 3d7be69ab593..3391c8e84210 100644
--- a/drivers/video/fbdev/efifb.c
+++ b/drivers/video/fbdev/efifb.c
@@ -555,7 +555,6 @@ static int efifb_probe(struct platform_device *dev)
info->fbops = &efifb_ops;
info->var = efifb_defined;
info->fix = efifb_fix;
- info->flags = FBINFO_FLAG_DEFAULT;
orientation = drm_get_panel_orientation_quirk(efifb_defined.xres,
efifb_defined.yres);
diff --git a/drivers/video/fbdev/goldfishfb.c b/drivers/video/fbdev/goldfishfb.c
index 6fa2108fd912..ef2528c3faa9 100644
--- a/drivers/video/fbdev/goldfishfb.c
+++ b/drivers/video/fbdev/goldfishfb.c
@@ -212,7 +212,6 @@ static int goldfish_fb_probe(struct platform_device *pdev)
height = readl(fb->reg_base + FB_GET_HEIGHT);
fb->fb.fbops = &goldfish_fb_ops;
- fb->fb.flags = FBINFO_FLAG_DEFAULT;
fb->fb.pseudo_palette = fb->cmap;
fb->fb.fix.type = FB_TYPE_PACKED_PIXELS;
fb->fb.fix.visual = FB_VISUAL_TRUECOLOR;
diff --git a/drivers/video/fbdev/gxt4500.c b/drivers/video/fbdev/gxt4500.c
index 5f42d3d9d6ce..8d0976578ddf 100644
--- a/drivers/video/fbdev/gxt4500.c
+++ b/drivers/video/fbdev/gxt4500.c
@@ -690,8 +690,7 @@ static int gxt4500_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
#endif
info->fbops = &gxt4500_ops;
- info->flags = FBINFO_FLAG_DEFAULT | FBINFO_HWACCEL_XPAN |
- FBINFO_HWACCEL_YPAN;
+ info->flags = FBINFO_HWACCEL_XPAN | FBINFO_HWACCEL_YPAN;
err = fb_alloc_cmap(&info->cmap, 256, 0);
if (err) {
diff --git a/drivers/video/fbdev/hecubafb.c b/drivers/video/fbdev/hecubafb.c
index 5043d08ade54..c4938554ea45 100644
--- a/drivers/video/fbdev/hecubafb.c
+++ b/drivers/video/fbdev/hecubafb.c
@@ -189,7 +189,7 @@ static int hecubafb_probe(struct platform_device *dev)
par->send_command = apollo_send_command;
par->send_data = apollo_send_data;
- info->flags = FBINFO_FLAG_DEFAULT | FBINFO_VIRTFB;
+ info->flags = FBINFO_VIRTFB;
info->fbdefio = &hecubafb_defio;
fb_deferred_io_init(info);
diff --git a/drivers/video/fbdev/imxfb.c b/drivers/video/fbdev/imxfb.c
index adf36690c342..5b1ddce1f9d3 100644
--- a/drivers/video/fbdev/imxfb.c
+++ b/drivers/video/fbdev/imxfb.c
@@ -698,8 +698,7 @@ static int imxfb_init_fbinfo(struct platform_device *pdev)
info->var.vmode = FB_VMODE_NONINTERLACED;
info->fbops = &imxfb_ops;
- info->flags = FBINFO_FLAG_DEFAULT |
- FBINFO_READS_FAST;
+ info->flags = FBINFO_READS_FAST;
np = pdev->dev.of_node;
info->var.grayscale = of_property_read_bool(np,
diff --git a/drivers/video/fbdev/intelfb/intelfbdrv.c b/drivers/video/fbdev/intelfb/intelfbdrv.c
index 85a6341b8ac0..3d334f171959 100644
--- a/drivers/video/fbdev/intelfb/intelfbdrv.c
+++ b/drivers/video/fbdev/intelfb/intelfbdrv.c
@@ -1098,7 +1098,6 @@ static int intelfb_set_fbinfo(struct intelfb_info *dinfo)
DBG_MSG("intelfb_set_fbinfo\n");
- info->flags = FBINFO_FLAG_DEFAULT;
info->fbops = &intel_fb_ops;
info->pseudo_palette = dinfo->pseudo_palette;
diff --git a/drivers/video/fbdev/metronomefb.c b/drivers/video/fbdev/metronomefb.c
index 667bef10738c..857e56fbb56f 100644
--- a/drivers/video/fbdev/metronomefb.c
+++ b/drivers/video/fbdev/metronomefb.c
@@ -642,7 +642,7 @@ static int metronomefb_probe(struct platform_device *dev)
if (retval < 0)
goto err_free_irq;
- info->flags = FBINFO_FLAG_DEFAULT | FBINFO_VIRTFB;
+ info->flags = FBINFO_VIRTFB;
info->fbdefio = &metronomefb_defio;
fb_deferred_io_init(info);
diff --git a/drivers/video/fbdev/mx3fb.c b/drivers/video/fbdev/mx3fb.c
index 63c186e0364a..3a053005d2b9 100644
--- a/drivers/video/fbdev/mx3fb.c
+++ b/drivers/video/fbdev/mx3fb.c
@@ -1406,7 +1406,6 @@ static struct fb_info *mx3fb_init_fbinfo(struct device *dev,
fbi->var.activate = FB_ACTIVATE_NOW;
fbi->fbops = ops;
- fbi->flags = FBINFO_FLAG_DEFAULT;
fbi->pseudo_palette = mx3fbi->pseudo_palette;
mutex_init(&mx3fbi->mutex);
diff --git a/drivers/video/fbdev/omap/omapfb_main.c b/drivers/video/fbdev/omap/omapfb_main.c
index ad65554b33c3..783bbe026207 100644
--- a/drivers/video/fbdev/omap/omapfb_main.c
+++ b/drivers/video/fbdev/omap/omapfb_main.c
@@ -1451,7 +1451,6 @@ static int fbinfo_init(struct omapfb_device *fbdev, struct fb_info *info)
int r = 0;
info->fbops = &omapfb_ops;
- info->flags = FBINFO_FLAG_DEFAULT;
strscpy(fix->id, MODULE_NAME, sizeof(fix->id));
diff --git a/drivers/video/fbdev/omap2/omapfb/omapfb-main.c b/drivers/video/fbdev/omap2/omapfb/omapfb-main.c
index c0538069eb48..b5acad8eb279 100644
--- a/drivers/video/fbdev/omap2/omapfb/omapfb-main.c
+++ b/drivers/video/fbdev/omap2/omapfb/omapfb-main.c
@@ -1732,7 +1732,6 @@ static int omapfb_fb_init(struct omapfb2_device *fbdev, struct fb_info *fbi)
int r = 0;
fbi->fbops = &omapfb_ops;
- fbi->flags = FBINFO_FLAG_DEFAULT;
fbi->pseudo_palette = fbdev->pseudo_palette;
if (ofbi->region->size == 0) {
diff --git a/drivers/video/fbdev/s3c-fb.c b/drivers/video/fbdev/s3c-fb.c
index 1ce707e4cfd0..c50b92c06c5d 100644
--- a/drivers/video/fbdev/s3c-fb.c
+++ b/drivers/video/fbdev/s3c-fb.c
@@ -1244,7 +1244,6 @@ static int s3c_fb_probe_win(struct s3c_fb *sfb, unsigned int win_no,
fbinfo->var.vmode = FB_VMODE_NONINTERLACED;
fbinfo->var.bits_per_pixel = windata->default_bpp;
fbinfo->fbops = &s3c_fb_ops;
- fbinfo->flags = FBINFO_FLAG_DEFAULT;
fbinfo->pseudo_palette = &win->pseudo_palette;
/* prepare to actually start the framebuffer */
diff --git a/drivers/video/fbdev/sh_mobile_lcdcfb.c b/drivers/video/fbdev/sh_mobile_lcdcfb.c
index 093f035d1246..8f9bbbe77d8c 100644
--- a/drivers/video/fbdev/sh_mobile_lcdcfb.c
+++ b/drivers/video/fbdev/sh_mobile_lcdcfb.c
@@ -1565,7 +1565,6 @@ sh_mobile_lcdc_overlay_fb_init(struct sh_mobile_lcdc_overlay *ovl)
ovl->info = info;
- info->flags = FBINFO_FLAG_DEFAULT;
info->fbops = &sh_mobile_lcdc_overlay_ops;
info->device = priv->dev;
info->screen_buffer = ovl->fb_mem;
@@ -2052,7 +2051,6 @@ sh_mobile_lcdc_channel_fb_init(struct sh_mobile_lcdc_chan *ch,
ch->info = info;
- info->flags = FBINFO_FLAG_DEFAULT;
info->fbops = &sh_mobile_lcdc_ops;
info->device = priv->dev;
info->screen_buffer = ch->fb_mem;
diff --git a/drivers/video/fbdev/sis/sis_main.c b/drivers/video/fbdev/sis/sis_main.c
index 2beb3512a853..0f5374f6ef05 100644
--- a/drivers/video/fbdev/sis/sis_main.c
+++ b/drivers/video/fbdev/sis/sis_main.c
@@ -6477,8 +6477,6 @@ error_3: vfree(ivideo->bios_abase);
FBINFO_HWACCEL_COPYAREA |
FBINFO_HWACCEL_FILLRECT |
((ivideo->accel) ? 0 : FBINFO_HWACCEL_DISABLED);
-#else
- sis_fb_info->flags = FBINFO_FLAG_DEFAULT;
#endif
sis_fb_info->var = ivideo->default_var;
sis_fb_info->fix = ivideo->sisfb_fix;
diff --git a/drivers/video/fbdev/sm501fb.c b/drivers/video/fbdev/sm501fb.c
index 46951a095274..65c799ac5604 100644
--- a/drivers/video/fbdev/sm501fb.c
+++ b/drivers/video/fbdev/sm501fb.c
@@ -1731,7 +1731,7 @@ static int sm501fb_init_fb(struct fb_info *fb, enum sm501_controller head,
par->ops.fb_cursor = NULL;
fb->fbops = &par->ops;
- fb->flags = FBINFO_FLAG_DEFAULT | FBINFO_READS_FAST |
+ fb->flags = FBINFO_READS_FAST |
FBINFO_HWACCEL_COPYAREA | FBINFO_HWACCEL_FILLRECT |
FBINFO_HWACCEL_XPAN | FBINFO_HWACCEL_YPAN;
diff --git a/drivers/video/fbdev/sm712fb.c b/drivers/video/fbdev/sm712fb.c
index f929091da4e7..db129ed3b2f7 100644
--- a/drivers/video/fbdev/sm712fb.c
+++ b/drivers/video/fbdev/sm712fb.c
@@ -1528,7 +1528,6 @@ static int smtcfb_pci_probe(struct pci_dev *pdev,
sfb->fb = info;
sfb->chip_id = ent->device;
sfb->pdev = pdev;
- info->flags = FBINFO_FLAG_DEFAULT;
info->fbops = &smtcfb_ops;
info->fix = smtcfb_fix;
info->var = smtcfb_var;
diff --git a/drivers/video/fbdev/uvesafb.c b/drivers/video/fbdev/uvesafb.c
index 78d85dae8ec8..df2574d4ff30 100644
--- a/drivers/video/fbdev/uvesafb.c
+++ b/drivers/video/fbdev/uvesafb.c
@@ -1508,8 +1508,7 @@ static void uvesafb_init_info(struct fb_info *info, struct vbe_mode_ib *mode)
par->ypan = 0;
}
- info->flags = FBINFO_FLAG_DEFAULT |
- (par->ypan ? FBINFO_HWACCEL_YPAN : 0);
+ info->flags = (par->ypan ? FBINFO_HWACCEL_YPAN : 0);
if (!par->ypan)
uvesafb_ops.fb_pan_display = NULL;
diff --git a/drivers/video/fbdev/vesafb.c b/drivers/video/fbdev/vesafb.c
index 7451c607dc50..422a1c53decd 100644
--- a/drivers/video/fbdev/vesafb.c
+++ b/drivers/video/fbdev/vesafb.c
@@ -457,7 +457,7 @@ static int vesafb_probe(struct platform_device *dev)
info->fbops = &vesafb_ops;
info->var = vesafb_defined;
info->fix = vesafb_fix;
- info->flags = FBINFO_FLAG_DEFAULT | (ypan ? FBINFO_HWACCEL_YPAN : 0);
+ info->flags = (ypan ? FBINFO_HWACCEL_YPAN : 0);
if (fb_alloc_cmap(&info->cmap, 256, 0) < 0) {
err = -ENOMEM;
diff --git a/drivers/video/fbdev/vfb.c b/drivers/video/fbdev/vfb.c
index cf3c72754ce7..1b7c338f9956 100644
--- a/drivers/video/fbdev/vfb.c
+++ b/drivers/video/fbdev/vfb.c
@@ -455,7 +455,6 @@ static int vfb_probe(struct platform_device *dev)
info->fix = vfb_fix;
info->pseudo_palette = info->par;
info->par = NULL;
- info->flags = FBINFO_FLAG_DEFAULT;
retval = fb_alloc_cmap(&info->cmap, 256, 0);
if (retval < 0)
diff --git a/drivers/video/fbdev/vga16fb.c b/drivers/video/fbdev/vga16fb.c
index 34d00347ad58..b43c874c199f 100644
--- a/drivers/video/fbdev/vga16fb.c
+++ b/drivers/video/fbdev/vga16fb.c
@@ -1359,7 +1359,7 @@ static int vga16fb_probe(struct platform_device *dev)
info->fix = vga16fb_fix;
/* supports rectangles with widths of multiples of 8 */
info->pixmap.blit_x = 1 << 7 | 1 << 15 | 1 << 23 | 1 << 31;
- info->flags = FBINFO_FLAG_DEFAULT | FBINFO_HWACCEL_YPAN;
+ info->flags = FBINFO_HWACCEL_YPAN;
i = (info->var.bits_per_pixel == 8) ? 256 : 16;
ret = fb_alloc_cmap(&info->cmap, i, 0);
diff --git a/drivers/video/fbdev/xen-fbfront.c b/drivers/video/fbdev/xen-fbfront.c
index 6664dc7a5a41..9a4c29cb1a80 100644
--- a/drivers/video/fbdev/xen-fbfront.c
+++ b/drivers/video/fbdev/xen-fbfront.c
@@ -432,7 +432,7 @@ static int xenfb_probe(struct xenbus_device *dev,
fb_info->fix.type = FB_TYPE_PACKED_PIXELS;
fb_info->fix.accel = FB_ACCEL_NONE;
- fb_info->flags = FBINFO_FLAG_DEFAULT | FBINFO_VIRTFB;
+ fb_info->flags = FBINFO_VIRTFB;
ret = fb_alloc_cmap(&fb_info->cmap, 256, 0);
if (ret < 0) {
--
2.41.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH 15/17] fbdev/atafb: Remove flag FBINFO_FLAG_DEFAULT
2023-07-10 12:50 [PATCH 00/17] fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT flags Thomas Zimmermann
` (12 preceding siblings ...)
2023-07-10 12:50 ` [PATCH 14/17] " Thomas Zimmermann
@ 2023-07-10 12:50 ` Thomas Zimmermann
2023-07-10 12:50 ` [PATCH 16/17] fbdev/pxafb: " Thomas Zimmermann
` (2 subsequent siblings)
16 siblings, 0 replies; 35+ messages in thread
From: Thomas Zimmermann @ 2023-07-10 12:50 UTC (permalink / raw)
To: deller, javierm
Cc: linux-sh, dri-devel, linux-kernel, amd-gfx, linux-input,
linux-media, linux-fbdev, linux-staging, linux-arm-kernel,
linux-geode, linux-nvidia, linux-hyperv, linux-omap, linuxppc-dev,
kvm, Thomas Zimmermann
The flag FBINFO_FLAG_DEFAULT is 0 and has no effect, as struct
fbinfo.flags has been allocated to zero by a static declaration. So do
not set it.
Flags should signal differences from the default values. After cleaning
up all occurences of FBINFO_FLAG_DEFAULT, the token can be removed.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Helge Deller <deller@gmx.de>
---
drivers/video/fbdev/atafb.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/video/fbdev/atafb.c b/drivers/video/fbdev/atafb.c
index 2bc4089865e6..c4a420b791b9 100644
--- a/drivers/video/fbdev/atafb.c
+++ b/drivers/video/fbdev/atafb.c
@@ -3112,7 +3112,6 @@ static int __init atafb_probe(struct platform_device *pdev)
#ifdef ATAFB_FALCON
fb_info.pseudo_palette = current_par.hw.falcon.pseudo_palette;
#endif
- fb_info.flags = FBINFO_FLAG_DEFAULT;
if (!fb_find_mode(&fb_info.var, &fb_info, mode_option, atafb_modedb,
NUM_TOTAL_MODES, &atafb_modedb[defmode],
--
2.41.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH 16/17] fbdev/pxafb: Remove flag FBINFO_FLAG_DEFAULT
2023-07-10 12:50 [PATCH 00/17] fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT flags Thomas Zimmermann
` (13 preceding siblings ...)
2023-07-10 12:50 ` [PATCH 15/17] fbdev/atafb: Remove flag FBINFO_FLAG_DEFAULT Thomas Zimmermann
@ 2023-07-10 12:50 ` Thomas Zimmermann
2023-07-10 12:50 ` [PATCH 17/17] fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT Thomas Zimmermann
2023-07-10 17:19 ` [PATCH 00/17] fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT flags Sam Ravnborg
16 siblings, 0 replies; 35+ messages in thread
From: Thomas Zimmermann @ 2023-07-10 12:50 UTC (permalink / raw)
To: deller, javierm
Cc: linux-sh, dri-devel, linux-kernel, amd-gfx, linux-input,
linux-media, linux-fbdev, linux-staging, linux-arm-kernel,
linux-geode, linux-nvidia, linux-hyperv, linux-omap, linuxppc-dev,
kvm, Thomas Zimmermann
The flag FBINFO_FLAG_DEFAULT is 0 and has no effect, as struct
fbinfo.flags has been allocated to zero by devm_kzalloc(). So do not
set it.
Flags should signal differences from the default values. After cleaning
up all occurences of FBINFO_FLAG_DEFAULT, the token can be removed.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Helge Deller <deller@gmx.de>
---
drivers/video/fbdev/pxafb.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c
index c8c4677d06b4..beffb0602a2c 100644
--- a/drivers/video/fbdev/pxafb.c
+++ b/drivers/video/fbdev/pxafb.c
@@ -888,7 +888,6 @@ static void init_pxafb_overlay(struct pxafb_info *fbi, struct pxafb_layer *ofb,
ofb->fb.var.vmode = FB_VMODE_NONINTERLACED;
ofb->fb.fbops = &overlay_fb_ops;
- ofb->fb.flags = FBINFO_FLAG_DEFAULT;
ofb->fb.node = -1;
ofb->fb.pseudo_palette = NULL;
--
2.41.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH 17/17] fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT
2023-07-10 12:50 [PATCH 00/17] fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT flags Thomas Zimmermann
` (14 preceding siblings ...)
2023-07-10 12:50 ` [PATCH 16/17] fbdev/pxafb: " Thomas Zimmermann
@ 2023-07-10 12:50 ` Thomas Zimmermann
2023-07-10 17:19 ` [PATCH 00/17] fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT flags Sam Ravnborg
16 siblings, 0 replies; 35+ messages in thread
From: Thomas Zimmermann @ 2023-07-10 12:50 UTC (permalink / raw)
To: deller, javierm
Cc: linux-sh, dri-devel, linux-kernel, amd-gfx, linux-input,
linux-media, linux-fbdev, linux-staging, linux-arm-kernel,
linux-geode, linux-nvidia, linux-hyperv, linux-omap, linuxppc-dev,
kvm, Thomas Zimmermann
Remove the unused flags FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT. No
functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Helge Deller <deller@gmx.de>
---
include/linux/fb.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 1d5c13f34b09..43458f582f35 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -383,7 +383,6 @@ struct fb_tile_ops {
#endif /* CONFIG_FB_TILEBLITTING */
/* FBINFO_* = fb_info.flags bit flags */
-#define FBINFO_DEFAULT 0
#define FBINFO_HWACCEL_DISABLED 0x0002
/* When FBINFO_HWACCEL_DISABLED is set:
* Hardware acceleration is turned off. Software implementations
@@ -504,8 +503,6 @@ struct fb_info {
bool skip_vt_switch; /* no VT switch on suspend/resume required */
};
-#define FBINFO_FLAG_DEFAULT FBINFO_DEFAULT
-
/* This will go away
* fbset currently hacks in FB_ACCELF_TEXT into var.accel_flags
* when it wants to turn the acceleration engine on. This is
--
2.41.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 35+ messages in thread
* Re: [PATCH 10/17] hid/picolcd: Remove flag FBINFO_FLAG_DEFAULT from fbdev driver
2023-07-10 12:50 ` [PATCH 10/17] hid/picolcd: Remove flag FBINFO_FLAG_DEFAULT from fbdev driver Thomas Zimmermann
@ 2023-07-10 13:05 ` Benjamin Tissoires
2023-07-12 9:43 ` Bruno Prémont
1 sibling, 0 replies; 35+ messages in thread
From: Benjamin Tissoires @ 2023-07-10 13:05 UTC (permalink / raw)
To: Thomas Zimmermann
Cc: deller, javierm, linux-sh, dri-devel, linux-kernel, amd-gfx,
linux-input, linux-media, linux-fbdev, linux-staging,
linux-arm-kernel, linux-geode, linux-nvidia, linux-hyperv,
linux-omap, linuxppc-dev, kvm, Bruno Prémont, Jiri Kosina
On Mon, Jul 10, 2023 at 3:01 PM Thomas Zimmermann <tzimmermann@suse.de> wrote:
>
> The flag FBINFO_FLAG_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 occurences of FBINFO_FLAG_DEFAULT, the token can be removed.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> Cc: "Bruno Prémont" <bonbons@linux-vserver.org>
> Cc: Jiri Kosina <jikos@kernel.org>
> Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Feel free to take this through the DRI tree (or any other that handles
FB) with the rest of the series if you want.
Cheers,
Benjamin
> ---
> drivers/hid/hid-picolcd_fb.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/hid/hid-picolcd_fb.c b/drivers/hid/hid-picolcd_fb.c
> index dabcd054dad9..d726aaafb146 100644
> --- a/drivers/hid/hid-picolcd_fb.c
> +++ b/drivers/hid/hid-picolcd_fb.c
> @@ -527,7 +527,6 @@ int picolcd_init_framebuffer(struct picolcd_data *data)
> info->var = picolcdfb_var;
> info->fix = picolcdfb_fix;
> info->fix.smem_len = PICOLCDFB_SIZE*8;
> - info->flags = FBINFO_FLAG_DEFAULT;
>
> fbdata = info->par;
> spin_lock_init(&fbdata->lock);
> --
> 2.41.0
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 08/17] arch/sh: Do not assign FBINFO_FLAG_DEFAULT to fb_videomode.flag
2023-07-10 12:50 ` [PATCH 08/17] arch/sh: Do not assign FBINFO_FLAG_DEFAULT to fb_videomode.flag Thomas Zimmermann
@ 2023-07-10 13:42 ` John Paul Adrian Glaubitz
2023-07-10 13:52 ` Thomas Zimmermann
0 siblings, 1 reply; 35+ messages in thread
From: John Paul Adrian Glaubitz @ 2023-07-10 13:42 UTC (permalink / raw)
To: Thomas Zimmermann, deller, javierm
Cc: linux-sh, dri-devel, linux-kernel, amd-gfx, linux-input,
linux-media, linux-fbdev, linux-staging, linux-arm-kernel,
linux-geode, linux-nvidia, linux-hyperv, linux-omap, linuxppc-dev,
kvm, Yoshinori Sato, Rich Felker
Hi Thomas!
On Mon, 2023-07-10 at 14:50 +0200, Thomas Zimmermann wrote:
> FBINFO_FLAG_DEFAULT is a flag for a framebuffer in struct fb_info.
> Flags for videomodes are prefixed with FB_MODE_. FBINFO_FLAG_DEFAULT
> is 0 and the static declaration already clears the memory area of
> sh7763fb_videomode. So remove the assignment.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
> Cc: Rich Felker <dalias@libc.org>
> Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
> ---
> arch/sh/boards/mach-sh7763rdp/setup.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/arch/sh/boards/mach-sh7763rdp/setup.c b/arch/sh/boards/mach-sh7763rdp/setup.c
> index 97e715e4e9b3..345f2b76c85a 100644
> --- a/arch/sh/boards/mach-sh7763rdp/setup.c
> +++ b/arch/sh/boards/mach-sh7763rdp/setup.c
> @@ -119,7 +119,6 @@ static struct fb_videomode sh7763fb_videomode = {
> .vsync_len = 1,
> .sync = 0,
> .vmode = FB_VMODE_NONINTERLACED,
> - .flag = FBINFO_FLAG_DEFAULT,
> };
>
> static struct sh7760fb_platdata sh7763fb_def_pdata = {
I would argue that the current code is more readable that your proposed change.
I agree that it's a no-op, but code is not just about functionality but also
readability, isn't it?
Also, I prefer "sh:" as the architecture prefix, not "arch/sh:".
Thanks,
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 08/17] arch/sh: Do not assign FBINFO_FLAG_DEFAULT to fb_videomode.flag
2023-07-10 13:42 ` John Paul Adrian Glaubitz
@ 2023-07-10 13:52 ` Thomas Zimmermann
2023-07-10 13:59 ` John Paul Adrian Glaubitz
0 siblings, 1 reply; 35+ messages in thread
From: Thomas Zimmermann @ 2023-07-10 13:52 UTC (permalink / raw)
To: John Paul Adrian Glaubitz, deller, javierm
Cc: linux-sh, dri-devel, linux-kernel, amd-gfx, linux-input,
linux-media, linux-fbdev, linux-staging, linux-arm-kernel,
linux-geode, linux-nvidia, linux-hyperv, linux-omap, linuxppc-dev,
kvm, Yoshinori Sato, Rich Felker
[-- Attachment #1.1.1: Type: text/plain, Size: 2151 bytes --]
Hi
Am 10.07.23 um 15:42 schrieb John Paul Adrian Glaubitz:
> Hi Thomas!
>
> On Mon, 2023-07-10 at 14:50 +0200, Thomas Zimmermann wrote:
>> FBINFO_FLAG_DEFAULT is a flag for a framebuffer in struct fb_info.
>> Flags for videomodes are prefixed with FB_MODE_. FBINFO_FLAG_DEFAULT
>> is 0 and the static declaration already clears the memory area of
>> sh7763fb_videomode. So remove the assignment.
>>
>> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>> Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
>> Cc: Rich Felker <dalias@libc.org>
>> Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
>> ---
>> arch/sh/boards/mach-sh7763rdp/setup.c | 1 -
>> 1 file changed, 1 deletion(-)
>>
>> diff --git a/arch/sh/boards/mach-sh7763rdp/setup.c b/arch/sh/boards/mach-sh7763rdp/setup.c
>> index 97e715e4e9b3..345f2b76c85a 100644
>> --- a/arch/sh/boards/mach-sh7763rdp/setup.c
>> +++ b/arch/sh/boards/mach-sh7763rdp/setup.c
>> @@ -119,7 +119,6 @@ static struct fb_videomode sh7763fb_videomode = {
>> .vsync_len = 1,
>> .sync = 0,
>> .vmode = FB_VMODE_NONINTERLACED,
>> - .flag = FBINFO_FLAG_DEFAULT,
>> };
>>
>> static struct sh7760fb_platdata sh7763fb_def_pdata = {
>
> I would argue that the current code is more readable that your proposed change.
>
> I agree that it's a no-op, but code is not just about functionality but also
> readability, isn't it?
I won't argue with that, but the flag itself is wrong.
FBINFO_FLAG_DEFAULT is/was for struct fb_info.flags. You have struct
fb_videomode.flag. The valid flags for this field are at [1]. If
anything, the field could be initialized to FB_MODE_IS_UNKNOWN, which
has the same value.
[1] https://elixir.bootlin.com/linux/latest/source/include/linux/fb.h#L681
>
> Also, I prefer "sh:" as the architecture prefix, not "arch/sh:".
Ok.
Best regards
Thomas
>
> Thanks,
> Adrian
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 08/17] arch/sh: Do not assign FBINFO_FLAG_DEFAULT to fb_videomode.flag
2023-07-10 13:52 ` Thomas Zimmermann
@ 2023-07-10 13:59 ` John Paul Adrian Glaubitz
2023-07-10 14:04 ` Thomas Zimmermann
0 siblings, 1 reply; 35+ messages in thread
From: John Paul Adrian Glaubitz @ 2023-07-10 13:59 UTC (permalink / raw)
To: Thomas Zimmermann, deller, javierm
Cc: linux-sh, dri-devel, linux-kernel, amd-gfx, linux-input,
linux-media, linux-fbdev, linux-staging, linux-arm-kernel,
linux-geode, linux-nvidia, linux-hyperv, linux-omap, linuxppc-dev,
kvm, Yoshinori Sato, Rich Felker
Hi Thomas!
On Mon, 2023-07-10 at 15:52 +0200, Thomas Zimmermann wrote:
> > I would argue that the current code is more readable that your proposed change.
> >
> > I agree that it's a no-op, but code is not just about functionality but also
> > readability, isn't it?
>
> I won't argue with that, but the flag itself is wrong.
> FBINFO_FLAG_DEFAULT is/was for struct fb_info.flags. You have struct
> fb_videomode.flag. The valid flags for this field are at [1]. If
> anything, the field could be initialized to FB_MODE_IS_UNKNOWN, which
> has the same value.
>
> [1] https://elixir.bootlin.com/linux/latest/source/include/linux/fb.h#L681
FB_MODE_IS_UNKNOWN sounds very reasonable to me. Would you agree using that instead?
> >
> > Also, I prefer "sh:" as the architecture prefix, not "arch/sh:".
>
> Ok.
Thanks.
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 08/17] arch/sh: Do not assign FBINFO_FLAG_DEFAULT to fb_videomode.flag
2023-07-10 13:59 ` John Paul Adrian Glaubitz
@ 2023-07-10 14:04 ` Thomas Zimmermann
2023-07-10 14:08 ` John Paul Adrian Glaubitz
0 siblings, 1 reply; 35+ messages in thread
From: Thomas Zimmermann @ 2023-07-10 14:04 UTC (permalink / raw)
To: John Paul Adrian Glaubitz, deller, javierm
Cc: linux-sh, dri-devel, linux-kernel, amd-gfx, linux-input,
linux-media, linux-fbdev, linux-staging, linux-arm-kernel,
linux-geode, linux-nvidia, linux-hyperv, linux-omap, linuxppc-dev,
kvm, Yoshinori Sato, Rich Felker
[-- Attachment #1.1.1: Type: text/plain, Size: 1242 bytes --]
Hi
Am 10.07.23 um 15:59 schrieb John Paul Adrian Glaubitz:
> Hi Thomas!
>
> On Mon, 2023-07-10 at 15:52 +0200, Thomas Zimmermann wrote:
>>> I would argue that the current code is more readable that your proposed change.
>>>
>>> I agree that it's a no-op, but code is not just about functionality but also
>>> readability, isn't it?
>>
>> I won't argue with that, but the flag itself is wrong.
>> FBINFO_FLAG_DEFAULT is/was for struct fb_info.flags. You have struct
>> fb_videomode.flag. The valid flags for this field are at [1]. If
>> anything, the field could be initialized to FB_MODE_IS_UNKNOWN, which
>> has the same value.
>>
>> [1] https://elixir.bootlin.com/linux/latest/source/include/linux/fb.h#L681
>
> FB_MODE_IS_UNKNOWN sounds very reasonable to me. Would you agree using that instead?
Sure, I'll update the patch accordingly.
Best regards
Thomas
>
>>>
>>> Also, I prefer "sh:" as the architecture prefix, not "arch/sh:".
>>
>> Ok.
>
> Thanks.
>
> Adrian
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 08/17] arch/sh: Do not assign FBINFO_FLAG_DEFAULT to fb_videomode.flag
2023-07-10 14:04 ` Thomas Zimmermann
@ 2023-07-10 14:08 ` John Paul Adrian Glaubitz
0 siblings, 0 replies; 35+ messages in thread
From: John Paul Adrian Glaubitz @ 2023-07-10 14:08 UTC (permalink / raw)
To: Thomas Zimmermann, deller, javierm
Cc: linux-sh, dri-devel, linux-kernel, amd-gfx, linux-input,
linux-media, linux-fbdev, linux-staging, linux-arm-kernel,
linux-geode, linux-nvidia, linux-hyperv, linux-omap, linuxppc-dev,
kvm, Yoshinori Sato, Rich Felker
Hi!
On Mon, 2023-07-10 at 16:04 +0200, Thomas Zimmermann wrote:
> > > I won't argue with that, but the flag itself is wrong.
> > > FBINFO_FLAG_DEFAULT is/was for struct fb_info.flags. You have struct
> > > fb_videomode.flag. The valid flags for this field are at [1]. If
> > > anything, the field could be initialized to FB_MODE_IS_UNKNOWN, which
> > > has the same value.
> > >
> > > [1] https://elixir.bootlin.com/linux/latest/source/include/linux/fb.h#L681
> >
> > FB_MODE_IS_UNKNOWN sounds very reasonable to me. Would you agree using that instead?
>
> Sure, I'll update the patch accordingly.
Thanks! I'll ack the updated patch.
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 09/17] auxdisplay: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers
2023-07-10 12:50 ` [PATCH 09/17] auxdisplay: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers Thomas Zimmermann
@ 2023-07-10 14:24 ` Miguel Ojeda
2023-07-10 15:22 ` Thomas Zimmermann
0 siblings, 1 reply; 35+ messages in thread
From: Miguel Ojeda @ 2023-07-10 14:24 UTC (permalink / raw)
To: Thomas Zimmermann
Cc: deller, javierm, linux-sh, dri-devel, linux-kernel, amd-gfx,
linux-input, linux-media, linux-fbdev, linux-staging,
linux-arm-kernel, linux-geode, linux-nvidia, linux-hyperv,
linux-omap, linuxppc-dev, kvm, Miguel Ojeda, Robin van der Gracht
On Mon, Jul 10, 2023 at 3:01 PM Thomas Zimmermann <tzimmermann@suse.de> wrote:
>
> The flag FBINFO_FLAG_DEFAULT is 0 and has no effect, as struct
> fbinfo.flags has been allocated to zero by framebuffer_alloc(). So do
> not set it.
`framebuffer_alloc()` does indeed use `kzalloc()`, but the docs do not
mention the zeroing. Should that guarantee be documented?
> Flags should signal differences from the default values. After cleaning
> up all occurences of FBINFO_FLAG_DEFAULT, the token can be removed.
occurences -> occurrences
can -> will maybe? Since the intention of the patch series is to
remove it (them) altogether).
Thanks!
Cheers,
Miguel
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 09/17] auxdisplay: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers
2023-07-10 14:24 ` Miguel Ojeda
@ 2023-07-10 15:22 ` Thomas Zimmermann
2023-07-10 16:25 ` Miguel Ojeda
0 siblings, 1 reply; 35+ messages in thread
From: Thomas Zimmermann @ 2023-07-10 15:22 UTC (permalink / raw)
To: Miguel Ojeda
Cc: deller, javierm, linux-sh, dri-devel, linux-kernel, amd-gfx,
linux-input, linux-media, linux-fbdev, linux-staging,
linux-arm-kernel, linux-geode, linux-nvidia, linux-hyperv,
linux-omap, linuxppc-dev, kvm, Miguel Ojeda, Robin van der Gracht
[-- Attachment #1.1.1: Type: text/plain, Size: 1085 bytes --]
Hi
Am 10.07.23 um 16:24 schrieb Miguel Ojeda:
> On Mon, Jul 10, 2023 at 3:01 PM Thomas Zimmermann <tzimmermann@suse.de> wrote:
>>
>> The flag FBINFO_FLAG_DEFAULT is 0 and has no effect, as struct
>> fbinfo.flags has been allocated to zero by framebuffer_alloc(). So do
>> not set it.
>
> `framebuffer_alloc()` does indeed use `kzalloc()`, but the docs do not
> mention the zeroing. Should that guarantee be documented?
I'll append a patch to the series that documents this.
>
>> Flags should signal differences from the default values. After cleaning
>> up all occurences of FBINFO_FLAG_DEFAULT, the token can be removed.
>
> occurences -> occurrences
>
> can -> will maybe? Since the intention of the patch series is to
> remove it (them) altogether).
Sure.
Best regards
Thomas
>
> Thanks!
>
> Cheers,
> Miguel
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 09/17] auxdisplay: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers
2023-07-10 15:22 ` Thomas Zimmermann
@ 2023-07-10 16:25 ` Miguel Ojeda
2023-07-11 6:10 ` Thomas Zimmermann
0 siblings, 1 reply; 35+ messages in thread
From: Miguel Ojeda @ 2023-07-10 16:25 UTC (permalink / raw)
To: Thomas Zimmermann
Cc: deller, javierm, linux-sh, dri-devel, linux-kernel, amd-gfx,
linux-input, linux-media, linux-fbdev, linux-staging,
linux-arm-kernel, linux-geode, linux-nvidia, linux-hyperv,
linux-omap, linuxppc-dev, kvm, Miguel Ojeda, Robin van der Gracht
On Mon, Jul 10, 2023 at 5:22 PM Thomas Zimmermann <tzimmermann@suse.de> wrote:
>
> I'll append a patch to the series that documents this.
>
> Sure.
Thanks!
If you are planning to take it into some other tree:
Acked-by: Miguel Ojeda <ojeda@kernel.org>
Otherwise, I can take it into the `auxdisplay` tree.
Cheers,
Miguel
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 00/17] fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT flags
2023-07-10 12:50 [PATCH 00/17] fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT flags Thomas Zimmermann
` (15 preceding siblings ...)
2023-07-10 12:50 ` [PATCH 17/17] fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT Thomas Zimmermann
@ 2023-07-10 17:19 ` Sam Ravnborg
2023-07-11 6:24 ` Thomas Zimmermann
16 siblings, 1 reply; 35+ messages in thread
From: Sam Ravnborg @ 2023-07-10 17:19 UTC (permalink / raw)
To: Thomas Zimmermann
Cc: deller, javierm, linux-fbdev, kvm, linux-hyperv, linux-sh,
linux-staging, linux-kernel, amd-gfx, linux-geode, dri-devel,
linux-input, linux-nvidia, linux-omap, linuxppc-dev,
linux-arm-kernel, linux-media
Hi Thomas,
On Mon, Jul 10, 2023 at 02:50:04PM +0200, Thomas Zimmermann wrote:
> Remove the unused flags FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT from
> fbdev and drivers, as briefly discussed at [1]. Both flags were maybe
> useful when fbdev had special handling for driver modules. With
> commit 376b3ff54c9a ("fbdev: Nuke FBINFO_MODULE"), they are both 0
> and have no further effect.
>
> Patches 1 to 7 remove FBINFO_DEFAULT from drivers. Patches 2 to 5
> split this by the way the fb_info struct is being allocated. All flags
> are cleared to zero during the allocation.
>
> Patches 8 to 16 do the same for FBINFO_FLAG_DEFAULT. Patch 8 fixes
> an actual bug in how arch/sh uses the tokne for struct fb_videomode,
> which is unrelated.
>
> Patch 17 removes both flag constants from <linux/fb.h>
We have a few more flags that are unused - should they be nuked too?
FBINFO_HWACCEL_FILLRECT
FBINFO_HWACCEL_ROTATE
FBINFO_HWACCEL_XPAN
Unused as in no references from fbdev/core/*
I would rather see one series nuke all unused FBINFO flags in one go.
Assuming my quick grep are right and the above can be dropped.
Sam
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 09/17] auxdisplay: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers
2023-07-10 16:25 ` Miguel Ojeda
@ 2023-07-11 6:10 ` Thomas Zimmermann
2023-07-11 10:03 ` Miguel Ojeda
0 siblings, 1 reply; 35+ messages in thread
From: Thomas Zimmermann @ 2023-07-11 6:10 UTC (permalink / raw)
To: Miguel Ojeda
Cc: deller, javierm, linux-sh, dri-devel, linux-kernel, amd-gfx,
linux-input, linux-media, linux-fbdev, linux-staging,
linux-arm-kernel, linux-geode, linux-nvidia, linux-hyperv,
linux-omap, linuxppc-dev, kvm, Miguel Ojeda, Robin van der Gracht
[-- Attachment #1.1.1: Type: text/plain, Size: 806 bytes --]
Hi
Am 10.07.23 um 18:25 schrieb Miguel Ojeda:
> On Mon, Jul 10, 2023 at 5:22 PM Thomas Zimmermann <tzimmermann@suse.de> wrote:
>>
>> I'll append a patch to the series that documents this.
>>
>> Sure.
>
> Thanks!
>
> If you are planning to take it into some other tree:
>
> Acked-by: Miguel Ojeda <ojeda@kernel.org>
Thanks.
>
> Otherwise, I can take it into the `auxdisplay` tree.
I'd like to take the patchset into drm-misc. It's part of a larger
cleanup of the fbdev modules and its interfaces.
Best regards
Thomas
>
> Cheers,
> Miguel
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 00/17] fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT flags
2023-07-10 17:19 ` [PATCH 00/17] fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT flags Sam Ravnborg
@ 2023-07-11 6:24 ` Thomas Zimmermann
2023-07-11 14:47 ` Sam Ravnborg
0 siblings, 1 reply; 35+ messages in thread
From: Thomas Zimmermann @ 2023-07-11 6:24 UTC (permalink / raw)
To: Sam Ravnborg
Cc: deller, javierm, linux-fbdev, kvm, linux-hyperv, linux-sh,
linux-staging, linux-kernel, amd-gfx, linux-geode, dri-devel,
linux-input, linux-nvidia, linux-omap, linuxppc-dev,
linux-arm-kernel, linux-media
[-- Attachment #1.1.1: Type: text/plain, Size: 2076 bytes --]
Hi Sam
Am 10.07.23 um 19:19 schrieb Sam Ravnborg:
> Hi Thomas,
>
> On Mon, Jul 10, 2023 at 02:50:04PM +0200, Thomas Zimmermann wrote:
>> Remove the unused flags FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT from
>> fbdev and drivers, as briefly discussed at [1]. Both flags were maybe
>> useful when fbdev had special handling for driver modules. With
>> commit 376b3ff54c9a ("fbdev: Nuke FBINFO_MODULE"), they are both 0
>> and have no further effect.
>>
>> Patches 1 to 7 remove FBINFO_DEFAULT from drivers. Patches 2 to 5
>> split this by the way the fb_info struct is being allocated. All flags
>> are cleared to zero during the allocation.
>>
>> Patches 8 to 16 do the same for FBINFO_FLAG_DEFAULT. Patch 8 fixes
>> an actual bug in how arch/sh uses the tokne for struct fb_videomode,
>> which is unrelated.
>>
>> Patch 17 removes both flag constants from <linux/fb.h>
>
> We have a few more flags that are unused - should they be nuked too?
> FBINFO_HWACCEL_FILLRECT
> FBINFO_HWACCEL_ROTATE
> FBINFO_HWACCEL_XPAN
It seems those are there for completeness. Nothing sets _ROTATE, the
others are simply never checked. According to the comments, some are
required, some are optional. I don't know what that means.
IIRC there were complains about performance when Daniel tried to remove
fbcon acceleration, so not all _HWACCEL_ flags are unneeded.
Leaving them in for reference/completeness might be an option; or not. I
have no strong feelings about those flags.
>
> Unused as in no references from fbdev/core/*
>
> I would rather see one series nuke all unused FBINFO flags in one go.
> Assuming my quick grep are right and the above can be dropped.
I would not want to extend this series. I'm removing _DEFAULT as it's
absolutely pointless and confusing.
Best regards
Thomas
>
> Sam
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 09/17] auxdisplay: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers
2023-07-11 6:10 ` Thomas Zimmermann
@ 2023-07-11 10:03 ` Miguel Ojeda
0 siblings, 0 replies; 35+ messages in thread
From: Miguel Ojeda @ 2023-07-11 10:03 UTC (permalink / raw)
To: Thomas Zimmermann
Cc: deller, javierm, linux-sh, dri-devel, linux-kernel, amd-gfx,
linux-input, linux-media, linux-fbdev, linux-staging,
linux-arm-kernel, linux-geode, linux-nvidia, linux-hyperv,
linux-omap, linuxppc-dev, kvm, Miguel Ojeda, Robin van der Gracht
On Tue, Jul 11, 2023 at 8:10 AM Thomas Zimmermann <tzimmermann@suse.de> wrote:
>
> I'd like to take the patchset into drm-misc. It's part of a larger
> cleanup of the fbdev modules and its interfaces.
Sounds good, thanks!
Cheers,
Miguel
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 00/17] fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT flags
2023-07-11 6:24 ` Thomas Zimmermann
@ 2023-07-11 14:47 ` Sam Ravnborg
2023-07-11 15:24 ` Helge Deller
2023-07-12 6:44 ` Thomas Zimmermann
0 siblings, 2 replies; 35+ messages in thread
From: Sam Ravnborg @ 2023-07-11 14:47 UTC (permalink / raw)
To: Thomas Zimmermann
Cc: deller, javierm, linux-fbdev, kvm, linux-hyperv, linux-sh,
linux-staging, linux-kernel, amd-gfx, linux-geode, dri-devel,
linux-input, linux-nvidia, linux-omap, linuxppc-dev,
linux-arm-kernel, linux-media
Hi Thomas,
On Tue, Jul 11, 2023 at 08:24:40AM +0200, Thomas Zimmermann wrote:
> Hi Sam
>
> Am 10.07.23 um 19:19 schrieb Sam Ravnborg:
> > Hi Thomas,
> >
> > On Mon, Jul 10, 2023 at 02:50:04PM +0200, Thomas Zimmermann wrote:
> > > Remove the unused flags FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT from
> > > fbdev and drivers, as briefly discussed at [1]. Both flags were maybe
> > > useful when fbdev had special handling for driver modules. With
> > > commit 376b3ff54c9a ("fbdev: Nuke FBINFO_MODULE"), they are both 0
> > > and have no further effect.
> > >
> > > Patches 1 to 7 remove FBINFO_DEFAULT from drivers. Patches 2 to 5
> > > split this by the way the fb_info struct is being allocated. All flags
> > > are cleared to zero during the allocation.
> > >
> > > Patches 8 to 16 do the same for FBINFO_FLAG_DEFAULT. Patch 8 fixes
> > > an actual bug in how arch/sh uses the tokne for struct fb_videomode,
> > > which is unrelated.
> > >
> > > Patch 17 removes both flag constants from <linux/fb.h>
> >
> > We have a few more flags that are unused - should they be nuked too?
> > FBINFO_HWACCEL_FILLRECT
> > FBINFO_HWACCEL_ROTATE
> > FBINFO_HWACCEL_XPAN
>
> It seems those are there for completeness. Nothing sets _ROTATE, the others
> are simply never checked. According to the comments, some are required, some
> are optional. I don't know what that means.
>
> IIRC there were complains about performance when Daniel tried to remove
> fbcon acceleration, so not all _HWACCEL_ flags are unneeded.
>
> Leaving them in for reference/completeness might be an option; or not. I
> have no strong feelings about those flags.
>
> >
> > Unused as in no references from fbdev/core/*
> >
> > I would rather see one series nuke all unused FBINFO flags in one go.
> > Assuming my quick grep are right and the above can be dropped.
>
> I would not want to extend this series. I'm removing _DEFAULT as it's
> absolutely pointless and confusing.
OK, makes sense and thanks for the explanation.
The series is:
Acked-by: Sam Ravnborg <sam@ravnborg.org>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 00/17] fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT flags
2023-07-11 14:47 ` Sam Ravnborg
@ 2023-07-11 15:24 ` Helge Deller
2023-07-11 16:04 ` Geert Uytterhoeven
2023-07-12 6:44 ` Thomas Zimmermann
1 sibling, 1 reply; 35+ messages in thread
From: Helge Deller @ 2023-07-11 15:24 UTC (permalink / raw)
To: Sam Ravnborg, Thomas Zimmermann
Cc: javierm, linux-fbdev, kvm, linux-hyperv, linux-sh, linux-staging,
linux-kernel, amd-gfx, linux-geode, dri-devel, linux-input,
linux-nvidia, linux-omap, linuxppc-dev, linux-arm-kernel,
linux-media
On 7/11/23 16:47, Sam Ravnborg wrote:
> Hi Thomas,
>
> On Tue, Jul 11, 2023 at 08:24:40AM +0200, Thomas Zimmermann wrote:
>> Hi Sam
>>
>> Am 10.07.23 um 19:19 schrieb Sam Ravnborg:
>>> Hi Thomas,
>>>
>>> On Mon, Jul 10, 2023 at 02:50:04PM +0200, Thomas Zimmermann wrote:
>>>> Remove the unused flags FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT from
>>>> fbdev and drivers, as briefly discussed at [1]. Both flags were maybe
>>>> useful when fbdev had special handling for driver modules. With
>>>> commit 376b3ff54c9a ("fbdev: Nuke FBINFO_MODULE"), they are both 0
>>>> and have no further effect.
>>>>
>>>> Patches 1 to 7 remove FBINFO_DEFAULT from drivers. Patches 2 to 5
>>>> split this by the way the fb_info struct is being allocated. All flags
>>>> are cleared to zero during the allocation.
>>>>
>>>> Patches 8 to 16 do the same for FBINFO_FLAG_DEFAULT. Patch 8 fixes
>>>> an actual bug in how arch/sh uses the tokne for struct fb_videomode,
>>>> which is unrelated.
>>>>
>>>> Patch 17 removes both flag constants from <linux/fb.h>
>>>
>>> We have a few more flags that are unused - should they be nuked too?
>>> FBINFO_HWACCEL_FILLRECT
>>> FBINFO_HWACCEL_ROTATE
>>> FBINFO_HWACCEL_XPAN
>>
>> It seems those are there for completeness. Nothing sets _ROTATE,
I think some fbdev drivers had hardware acceleration for ROTATE in the
past. HWACCEL_XPAN is still in some drivers.
>> the others are simply never checked. According to the comments,
>> some are required, some are optional. I don't know what that
>> means.
I think it's OK if you remove those flags which aren't used anywhere,
e.g. FBINFO_HWACCEL_ROTATE.
>> IIRC there were complains about performance when Daniel tried to remove
>> fbcon acceleration, so not all _HWACCEL_ flags are unneeded.
Correct. I think COPYAREA and FILLRECT are the bare minimum to accelerate
fbcon, IMAGEBLIT is for showing the tux penguin (?),
XPAN/YPAN and YWRAP for some hardware screen panning needed by some drivers
(not sure if this is still used as I don't have such hardware, Geert?).
>> Leaving them in for reference/completeness might be an option; or not. I
>> have no strong feelings about those flags.
I'd say drop FBINFO_HWACCEL_ROTATE at least ?
>>> Unused as in no references from fbdev/core/*
>>>
>>> I would rather see one series nuke all unused FBINFO flags in one go.
>>> Assuming my quick grep are right and the above can be dropped.
>>
>> I would not want to extend this series. I'm removing _DEFAULT as it's
>> absolutely pointless and confusing.
Yes, Ok.
Helge
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 00/17] fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT flags
2023-07-11 15:24 ` Helge Deller
@ 2023-07-11 16:04 ` Geert Uytterhoeven
0 siblings, 0 replies; 35+ messages in thread
From: Geert Uytterhoeven @ 2023-07-11 16:04 UTC (permalink / raw)
To: Helge Deller
Cc: Sam Ravnborg, Thomas Zimmermann, javierm, linux-fbdev, kvm,
linux-hyperv, linux-sh, linux-staging, linux-kernel, amd-gfx,
linux-geode, dri-devel, linux-input, linux-nvidia, linux-omap,
linuxppc-dev, linux-arm-kernel, linux-media
Hi Helge,
On Tue, Jul 11, 2023 at 5:26 PM Helge Deller <deller@gmx.de> wrote:
> On 7/11/23 16:47, Sam Ravnborg wrote:
> > On Tue, Jul 11, 2023 at 08:24:40AM +0200, Thomas Zimmermann wrote:
> >> Am 10.07.23 um 19:19 schrieb Sam Ravnborg:
> >>> On Mon, Jul 10, 2023 at 02:50:04PM +0200, Thomas Zimmermann wrote:
> >>>> Remove the unused flags FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT from
> >>>> fbdev and drivers, as briefly discussed at [1]. Both flags were maybe
> >>>> useful when fbdev had special handling for driver modules. With
> >>>> commit 376b3ff54c9a ("fbdev: Nuke FBINFO_MODULE"), they are both 0
> >>>> and have no further effect.
> >>>>
> >>>> Patches 1 to 7 remove FBINFO_DEFAULT from drivers. Patches 2 to 5
> >>>> split this by the way the fb_info struct is being allocated. All flags
> >>>> are cleared to zero during the allocation.
> >>>>
> >>>> Patches 8 to 16 do the same for FBINFO_FLAG_DEFAULT. Patch 8 fixes
> >>>> an actual bug in how arch/sh uses the tokne for struct fb_videomode,
> >>>> which is unrelated.
> >>>>
> >>>> Patch 17 removes both flag constants from <linux/fb.h>
> >>>
> >>> We have a few more flags that are unused - should they be nuked too?
> >>> FBINFO_HWACCEL_FILLRECT
> >>> FBINFO_HWACCEL_ROTATE
> >>> FBINFO_HWACCEL_XPAN
> >>
> >> It seems those are there for completeness. Nothing sets _ROTATE,
>
> I think some fbdev drivers had hardware acceleration for ROTATE in the
> past. HWACCEL_XPAN is still in some drivers.
>
> >> the others are simply never checked. According to the comments,
> >> some are required, some are optional. I don't know what that
> >> means.
>
> I think it's OK if you remove those flags which aren't used anywhere,
> e.g. FBINFO_HWACCEL_ROTATE.
Indeed.
> >> IIRC there were complains about performance when Daniel tried to remove
> >> fbcon acceleration, so not all _HWACCEL_ flags are unneeded.
>
> Correct. I think COPYAREA and FILLRECT are the bare minimum to accelerate
> fbcon, IMAGEBLIT is for showing the tux penguin (?),
> XPAN/YPAN and YWRAP for some hardware screen panning needed by some drivers
> (not sure if this is still used as I don't have such hardware, Geert?).
Yes, they are used. Anything that is handled in drivers/video/fbdev/core/
is used:
$ git grep HWACCEL_ -- drivers/video/fbdev/core/
drivers/video/fbdev/core/fbcon.c: if ((info->flags &
FBINFO_HWACCEL_COPYAREA) &&
drivers/video/fbdev/core/fbcon.c: !(info->flags &
FBINFO_HWACCEL_DISABLED))
drivers/video/fbdev/core/fbcon.c: int good_pan = (cap &
FBINFO_HWACCEL_YPAN) &&
drivers/video/fbdev/core/fbcon.c: int good_wrap = (cap &
FBINFO_HWACCEL_YWRAP) &&
drivers/video/fbdev/core/fbcon.c: int fast_copyarea = (cap &
FBINFO_HWACCEL_COPYAREA) &&
drivers/video/fbdev/core/fbcon.c: !(cap &
FBINFO_HWACCEL_DISABLED);
drivers/video/fbdev/core/fbcon.c: int fast_imageblit = (cap &
FBINFO_HWACCEL_IMAGEBLIT) &&
drivers/video/fbdev/core/fbcon.c: !(cap &
FBINFO_HWACCEL_DISABLED);
BTW, I'm surprised FBINFO_HWACCEL_FILLRECT is not handled.
But looking at the full history, it never was...
> >> Leaving them in for reference/completeness might be an option; or not. I
> >> have no strong feelings about those flags.
>
> I'd say drop FBINFO_HWACCEL_ROTATE at least ?
Agreed.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 00/17] fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT flags
2023-07-11 14:47 ` Sam Ravnborg
2023-07-11 15:24 ` Helge Deller
@ 2023-07-12 6:44 ` Thomas Zimmermann
1 sibling, 0 replies; 35+ messages in thread
From: Thomas Zimmermann @ 2023-07-12 6:44 UTC (permalink / raw)
To: Sam Ravnborg
Cc: linux-arm-kernel, linux-hyperv, kvm, linux-sh, deller,
linux-staging, javierm, amd-gfx, linux-kernel, dri-devel,
linux-fbdev, linux-input, linux-nvidia, linux-omap, linuxppc-dev,
linux-geode, linux-media
[-- Attachment #1.1.1: Type: text/plain, Size: 2411 bytes --]
Am 11.07.23 um 16:47 schrieb Sam Ravnborg:
> Hi Thomas,
>
> On Tue, Jul 11, 2023 at 08:24:40AM +0200, Thomas Zimmermann wrote:
>> Hi Sam
>>
>> Am 10.07.23 um 19:19 schrieb Sam Ravnborg:
>>> Hi Thomas,
>>>
>>> On Mon, Jul 10, 2023 at 02:50:04PM +0200, Thomas Zimmermann wrote:
>>>> Remove the unused flags FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT from
>>>> fbdev and drivers, as briefly discussed at [1]. Both flags were maybe
>>>> useful when fbdev had special handling for driver modules. With
>>>> commit 376b3ff54c9a ("fbdev: Nuke FBINFO_MODULE"), they are both 0
>>>> and have no further effect.
>>>>
>>>> Patches 1 to 7 remove FBINFO_DEFAULT from drivers. Patches 2 to 5
>>>> split this by the way the fb_info struct is being allocated. All flags
>>>> are cleared to zero during the allocation.
>>>>
>>>> Patches 8 to 16 do the same for FBINFO_FLAG_DEFAULT. Patch 8 fixes
>>>> an actual bug in how arch/sh uses the tokne for struct fb_videomode,
>>>> which is unrelated.
>>>>
>>>> Patch 17 removes both flag constants from <linux/fb.h>
>>>
>>> We have a few more flags that are unused - should they be nuked too?
>>> FBINFO_HWACCEL_FILLRECT
>>> FBINFO_HWACCEL_ROTATE
>>> FBINFO_HWACCEL_XPAN
>>
>> It seems those are there for completeness. Nothing sets _ROTATE, the others
>> are simply never checked. According to the comments, some are required, some
>> are optional. I don't know what that means.
>>
>> IIRC there were complains about performance when Daniel tried to remove
>> fbcon acceleration, so not all _HWACCEL_ flags are unneeded.
>>
>> Leaving them in for reference/completeness might be an option; or not. I
>> have no strong feelings about those flags.
>>
>>>
>>> Unused as in no references from fbdev/core/*
>>>
>>> I would rather see one series nuke all unused FBINFO flags in one go.
>>> Assuming my quick grep are right and the above can be dropped.
>>
>> I would not want to extend this series. I'm removing _DEFAULT as it's
>> absolutely pointless and confusing.
>
> OK, makes sense and thanks for the explanation.
>
> The series is:
> Acked-by: Sam Ravnborg <sam@ravnborg.org>
Thanks a lot.
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 10/17] hid/picolcd: Remove flag FBINFO_FLAG_DEFAULT from fbdev driver
2023-07-10 12:50 ` [PATCH 10/17] hid/picolcd: Remove flag FBINFO_FLAG_DEFAULT from fbdev driver Thomas Zimmermann
2023-07-10 13:05 ` Benjamin Tissoires
@ 2023-07-12 9:43 ` Bruno Prémont
1 sibling, 0 replies; 35+ messages in thread
From: Bruno Prémont @ 2023-07-12 9:43 UTC (permalink / raw)
To: Thomas Zimmermann
Cc: deller, javierm, linux-sh, dri-devel, linux-kernel, amd-gfx,
linux-input, linux-media, linux-fbdev, linux-staging,
linux-arm-kernel, linux-geode, linux-nvidia, linux-hyperv,
linux-omap, linuxppc-dev, kvm, Jiri Kosina, Benjamin Tissoires
On Mon, 10 Jul 2023 14:50:14 +0200 Thomas Zimmermann wrote:
> The flag FBINFO_FLAG_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 occurences of FBINFO_FLAG_DEFAULT, the token can be removed.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> Cc: "Bruno Prémont" <bonbons@linux-vserver.org>
> Cc: Jiri Kosina <jikos@kernel.org>
> Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Acked-by: Bruno Prémont <bonbons@linux-vserver.org>
Cheers,
Bruno
> ---
> drivers/hid/hid-picolcd_fb.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/hid/hid-picolcd_fb.c b/drivers/hid/hid-picolcd_fb.c
> index dabcd054dad9..d726aaafb146 100644
> --- a/drivers/hid/hid-picolcd_fb.c
> +++ b/drivers/hid/hid-picolcd_fb.c
> @@ -527,7 +527,6 @@ int picolcd_init_framebuffer(struct picolcd_data *data)
> info->var = picolcdfb_var;
> info->fix = picolcdfb_fix;
> info->fix.smem_len = PICOLCDFB_SIZE*8;
> - info->flags = FBINFO_FLAG_DEFAULT;
>
> fbdata = info->par;
> spin_lock_init(&fbdata->lock);
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 35+ messages in thread
end of thread, other threads:[~2023-07-12 9:50 UTC | newest]
Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-10 12:50 [PATCH 00/17] fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT flags Thomas Zimmermann
2023-07-10 12:50 ` [PATCH 01/17] drm: Remove flag FBINFO_DEFAULT from fbdev emulation Thomas Zimmermann
2023-07-10 12:50 ` [PATCH 02/17] fbdev: Remove flag FBINFO_DEFAULT from fbdev drivers Thomas Zimmermann
2023-07-10 12:50 ` [PATCH 03/17] " Thomas Zimmermann
2023-07-10 12:50 ` [PATCH 04/17] " Thomas Zimmermann
2023-07-10 12:50 ` [PATCH 06/17] fbdev/fsl-diu-fb: Remove flag FBINFO_DEFAULT Thomas Zimmermann
2023-07-10 12:50 ` [PATCH 07/17] vfio-mdev: Remove flag FBINFO_DEFAULT from fbdev sample driver Thomas Zimmermann
2023-07-10 12:50 ` [PATCH 08/17] arch/sh: Do not assign FBINFO_FLAG_DEFAULT to fb_videomode.flag Thomas Zimmermann
2023-07-10 13:42 ` John Paul Adrian Glaubitz
2023-07-10 13:52 ` Thomas Zimmermann
2023-07-10 13:59 ` John Paul Adrian Glaubitz
2023-07-10 14:04 ` Thomas Zimmermann
2023-07-10 14:08 ` John Paul Adrian Glaubitz
2023-07-10 12:50 ` [PATCH 09/17] auxdisplay: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers Thomas Zimmermann
2023-07-10 14:24 ` Miguel Ojeda
2023-07-10 15:22 ` Thomas Zimmermann
2023-07-10 16:25 ` Miguel Ojeda
2023-07-11 6:10 ` Thomas Zimmermann
2023-07-11 10:03 ` Miguel Ojeda
2023-07-10 12:50 ` [PATCH 10/17] hid/picolcd: Remove flag FBINFO_FLAG_DEFAULT from fbdev driver Thomas Zimmermann
2023-07-10 13:05 ` Benjamin Tissoires
2023-07-12 9:43 ` Bruno Prémont
2023-07-10 12:50 ` [PATCH 11/17] media: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers Thomas Zimmermann
2023-07-10 12:50 ` [PATCH 12/17] staging: " Thomas Zimmermann
2023-07-10 12:50 ` [PATCH 13/17] fbdev: " Thomas Zimmermann
2023-07-10 12:50 ` [PATCH 14/17] " Thomas Zimmermann
2023-07-10 12:50 ` [PATCH 15/17] fbdev/atafb: Remove flag FBINFO_FLAG_DEFAULT Thomas Zimmermann
2023-07-10 12:50 ` [PATCH 16/17] fbdev/pxafb: " Thomas Zimmermann
2023-07-10 12:50 ` [PATCH 17/17] fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT Thomas Zimmermann
2023-07-10 17:19 ` [PATCH 00/17] fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT flags Sam Ravnborg
2023-07-11 6:24 ` Thomas Zimmermann
2023-07-11 14:47 ` Sam Ravnborg
2023-07-11 15:24 ` Helge Deller
2023-07-11 16:04 ` Geert Uytterhoeven
2023-07-12 6:44 ` Thomas Zimmermann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).