Skip to content

fbdev: Modularize helpers for struct fb_ops

Thomas Zimmermann dri-devel linux-arm-kernel linux-fbdev linux-input linux-media linux-staging linuxppc-dev stable 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest32 patches 2 repliesIn review
  2. v132 patches 44 repliesSuperseded

Changes in v2 from the cover letter

* warn once if I/O callbacks are missing (Javier)

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/32fbdev/acornfb: Fix name of fb_ops initializer macrodrivers/video/fbdev/acornfb.c+1 -10 replies
2/32fbdev/sm712fb: Use correct initializer macros for struct fb_opsdrivers/video/fbdev/sm712fb.c+2 -40 replies
3/32fbdev/vfb: Set FBINFO_VIRTFB flagdrivers/video/fbdev/vfb.c+1 -00 replies
4/32fbdev/vfb: Initialize fb_ops with fbdev macrosdrivers/video/fbdev/Kconfig drivers/video/fbdev/vfb.c+3 -90 replies
5/32fbdev/arcfb: Set FBINFO_VIRTFB flagdrivers/video/fbdev/arcfb.c+1 -00 replies
6/32fbdev/arcfb: Use generator macros for deferred I/Odrivers/video/fbdev/Kconfig drivers/video/fbdev/arcfb.c+27 -910 replies
7/32auxdisplay/cfag12864bfb: Set FBINFO_VIRTFB flagdrivers/auxdisplay/cfag12864bfb.c+1 -00 replies
8/32auxdisplay/cfag12864bfb: Initialize fb_ops with fbdev macrosdrivers/auxdisplay/Kconfig drivers/auxdisplay/cfag12864bfb.c+3 -90 replies
9/32auxdisplay/ht16k33: Set FBINFO_VIRTFB flagdrivers/auxdisplay/ht16k33.c+1 -00 replies
10/32auxdisplay/ht16k33: Initialize fb_ops with fbdev macrosdrivers/auxdisplay/Kconfig drivers/auxdisplay/ht16k33.c+3 -90 replies
11/32hid/picolcd_fb: Set FBINFO_VIRTFB flagdrivers/hid/hid-picolcd_fb.c+1 -00 replies
12/32fbdev/sh_mobile_lcdcfb: Set FBINFO_VIRTFB flagdrivers/video/fbdev/sh_mobile_lcdcfb.c+2 -00 replies
13/32fbdev/sh_mobile_lcdcfb: Initialize fb_ops with fbdev macrosdrivers/video/fbdev/Kconfig drivers/video/fbdev/sh_mobile_lcdcfb.c+5 -120 replies
14/32fbdev/smscufx: Select correct helpersdrivers/video/fbdev/Kconfig+1 -50 replies
15/32fbdev/udlfb: Select correct helpersdrivers/video/fbdev/Kconfig+1 -50 replies
16/32fbdev/au1200fb: Set FBINFO_VIRTFB flagdrivers/video/fbdev/au1200fb.c+2 -00 replies
17/32fbdev/au1200fb: Initialize fb_ops with fbdev macrosdrivers/video/fbdev/Kconfig drivers/video/fbdev/au1200fb.c+3 -90 replies
18/32fbdev/ps3fb: Set FBINFO_VIRTFB flagdrivers/video/fbdev/ps3fb.c+1 -10 replies
19/32fbdev/ps3fb: Initialize fb_ops with fbdev macrosdrivers/video/fbdev/Kconfig drivers/video/fbdev/ps3fb.c+3 -90 replies
20/32media/ivtvfb: Initialize fb_ops to fbdev I/O-memory helpersdrivers/media/pci/ivtv/Kconfig drivers/media/pci/ivtv/ivtvfb.c+4 -60 replies
21/32fbdev/clps711x-fb: Initialize fb_ops with fbdev macrosdrivers/video/fbdev/Kconfig drivers/video/fbdev/clps711x-fb.c+2 -60 replies
22/32fbdev/vt8500lcdfb: Initialize fb_ops with fbdev macrosdrivers/video/fbdev/Kconfig drivers/video/fbdev/vt8500lcdfb.c+4 -10 replies
23/32fbdev/wm8505fb: Initialize fb_ops to fbdev I/O-memory helpersdrivers/video/fbdev/Kconfig drivers/video/fbdev/wm8505fb.c+3 -00 replies
24/32fbdev/cyber2000fb: Initialize fb_ops with fbdev macrosdrivers/video/fbdev/Kconfig drivers/video/fbdev/cyber2000fb.c+2 -120 replies
25/32staging/sm750fb: Declare fb_ops as constantdrivers/staging/sm750fb/sm750.c+49 -101 reply
26/32staging/sm750fb: Initialize fb_ops with fbdev macrosdrivers/staging/sm750fb/sm750.c+6 -61 reply
27/32fbdev: Rename FB_SYS_FOPS token to FB_SYSMEM_FOPSdrivers/video/fbdev/Kconfig drivers/video/fbdev/core/Kconfig drivers/video/fbdev/core/Makefile+6 -60 replies
28/32fbdev: Remove trailing whitespacesdrivers/video/fbdev/sbuslib.c+2 -20 replies
29/32fbdev: Push pgprot_decrypted() into mmap implementationsdrivers/auxdisplay/cfag12864bfb.c drivers/auxdisplay/ht16k33.c drivers/video/fbdev/amba-clcd.c +16 more+37 -50 replies
30/32fbdev: Move default fb_mmap code into helper functiondrivers/video/fbdev/core/fb_chrdev.c drivers/video/fbdev/core/fb_io_fops.c include/linux/fb.h+35 -310 replies
31/32fbdev: Warn on incorrect framebuffer accessdrivers/video/fbdev/core/cfbcopyarea.c drivers/video/fbdev/core/cfbfillrect.c drivers/video/fbdev/core/cfbimgblt.c +6 more+40 -10 replies
32/32fbdev: Remove default file-I/O implementationsdrivers/video/fbdev/core/Kconfig drivers/video/fbdev/core/fb_chrdev.c include/linux/fb.h+17 -260 replies

Reviews trailers per patch

All 32 patches have a Reviewed-by or Acked-by.

PatchJavier Martinez CanillasMiguel OjedaRobin van der GrachtBruno PrémontJiri KosinaHans VerkuilGreg Kroah-Hartman
1/32R-b
2/32R-b
3/32R-b
4/32R-b
5/32R-b
6/32A-b
7/32R-b A-b
8/32R-b A-b
9/32R-b A-b A-b
10/32R-b A-b R-b
11/32R-b A-b A-b
12/32R-b
13/32R-b
14/32R-b
15/32R-b
16/32R-b
17/32R-b
18/32R-b
19/32R-b
20/32R-b R-b
21/32R-b
22/32R-b
23/32R-b
24/32R-b
25/32A-b A-b
26/32R-b A-b
27/32R-b
28/32R-b
29/32R-b
30/32R-b
31/32R-b
32/32R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 7 reviewers.

Read the v2 thread

Cover letter [PATCH v2 00/32] fbdev: Modularize helpers for struct fb_ops

Convert the remaining fbdev drivers to use fbdev's helpers macros for struct fb_ops. Then push the current default code for file-I/O operations into a module and remove it as default. Each driver now selects the helpers its needs for file I/O and drawing to its framebuffer. If no helper has been set for an operation in struct fb_ops, the operation is unsupported. Once applied, fbdev drivers will not include unnecessary helper code. The helpers will also be more robust against mis-use.

The first 2 patches are bug fixes. Patches 3 to 26 modify fbdev drivers to set up their fb_ops structures correctly and select the necessary helpers.

Patches 27 and 28 do a few additional minor cleanups.

Patches 29 to 32 move all helpers for struct fb_ops into modules and drop the default. Helpers also warn if they operate on the wrong type of framebuffer memory. Framebuffers in I/O memory and system memory can only be used with the correct helper functions.

v2:
* warn once if I/O callbacks are missing (Javier)

Thomas Zimmermann (32):
fbdev/acornfb: Fix name of fb_ops initializer macro fbdev/sm712fb: Use correct initializer macros for struct fb_ops fbdev/vfb: Set FBINFO_VIRTFB flag
fbdev/vfb: Initialize fb_ops with fbdev macros fbdev/arcfb: Set FBINFO_VIRTFB flag
fbdev/arcfb: Use generator macros for deferred I/O auxdisplay/cfag12864bfb: Set FBINFO_VIRTFB flag auxdisplay/cfag12864bfb: Initialize fb_ops with fbdev macros auxdisplay/ht16k33: Set FBINFO_VIRTFB flag auxdisplay/ht16k33: Initialize fb_ops with fbdev macros hid/picolcd_fb: Set FBINFO_VIRTFB flag fbdev/sh_mobile_lcdcfb: Set FBINFO_VIRTFB flag fbdev/sh_mobile_lcdcfb: Initialize fb_ops with fbdev macros fbdev/smscufx: Select correct helpers
fbdev/udlfb: Select correct helpers
fbdev/au1200fb: Set FBINFO_VIRTFB flag fbdev/au1200fb: Initialize fb_ops with fbdev macros fbdev/ps3fb: Set FBINFO_VIRTFB flag
fbdev/ps3fb: Initialize fb_ops with fbdev macros media/ivtvfb: Initialize fb_ops to fbdev I/O-memory helpers fbdev/clps711x-fb: Initialize fb_ops with fbdev macros fbdev/vt8500lcdfb: Initialize fb_ops with fbdev macros fbdev/wm8505fb: Initialize fb_ops to fbdev I/O-memory helpers fbdev/cyber2000fb: Initialize fb_ops with fbdev macros staging/sm750fb: Declare fb_ops as constant staging/sm750fb: Initialize fb_ops with fbdev macros
fbdev: Rename FB_SYS_FOPS token to FB_SYSMEM_FOPS
fbdev: Remove trailing whitespaces
fbdev: Push pgprot_decrypted() into mmap implementations
fbdev: Move default fb_mmap code into helper function
fbdev: Warn on incorrect framebuffer access
fbdev: Remove default file-I/O implementations

 drivers/auxdisplay/Kconfig                    |  10 +-
 drivers/auxdisplay/cfag12864bfb.c             |  10 +-
 drivers/auxdisplay/ht16k33.c                  |  10 +-
 drivers/hid/hid-picolcd_fb.c                  |   1 +
 drivers/media/pci/ivtv/Kconfig                |   4 +-
 drivers/media/pci/ivtv/ivtvfb.c               |   6 +-
 drivers/staging/sm750fb/sm750.c               |  65 ++++++++--
 drivers/video/fbdev/Kconfig                   |  50 ++------
 drivers/video/fbdev/acornfb.c                 |   2 +-
 drivers/video/fbdev/amba-clcd.c               |   2 +
 drivers/video/fbdev/arcfb.c                   | 114 +++++-------------
 drivers/video/fbdev/au1100fb.c                |   2 +
 drivers/video/fbdev/au1200fb.c                |  11 +-
 drivers/video/fbdev/clps711x-fb.c             |   4 +-
 drivers/video/fbdev/core/Kconfig              |   7 +-
 drivers/video/fbdev/core/Makefile             |   2 +-
 drivers/video/fbdev/core/cfbcopyarea.c        |   3 +
 drivers/video/fbdev/core/cfbfillrect.c        |   3 +
 drivers/video/fbdev/core/cfbimgblt.c          |   3 +
 drivers/video/fbdev/core/fb_chrdev.c          |  68 ++---------
 drivers/video/fbdev/core/fb_defio.c           |   2 +
 drivers/video/fbdev/core/fb_io_fops.c         |  36 ++++++
 drivers/video/fbdev/core/fb_sys_fops.c        |   6 +
 drivers/video/fbdev/core/syscopyarea.c        |   3 +
 drivers/video/fbdev/core/sysfillrect.c        |   3 +
 drivers/video/fbdev/core/sysimgblt.c          |   3 +
 drivers/video/fbdev/cyber2000fb.c             |   9 +-
 drivers/video/fbdev/ep93xx-fb.c               |   2 +
 drivers/video/fbdev/gbefb.c                   |   2 +
 drivers/video/fbdev/omap/omapfb_main.c        |   2 +
 .../video/fbdev/omap2/omapfb/omapfb-main.c    |   2 +
 drivers/video/fbdev/ps3fb.c                   |  11 +-
 drivers/video/fbdev/sa1100fb.c                |   2 +
 drivers/video/fbdev/sbuslib.c                 |   5 +-
 drivers/video/fbdev/sh_mobile_lcdcfb.c        |  16 +--
 drivers/video/fbdev/sm712fb.c                 |   6 +-
 drivers/video/fbdev/smscufx.c                 |   2 +
 drivers/video/fbdev/udlfb.c                   |   2 +
 drivers/video/fbdev/vermilion/vermilion.c     |   2 +
 drivers/video/fbdev/vfb.c                     |  10 +-
 drivers/video/fbdev/vt8500lcdfb.c             |   4 +-
 drivers/video/fbdev/wm8505fb.c                |   2 +
 include/linux/fb.h                            |  16 ++-
 43 files changed, 259 insertions(+), 266 deletions(-)
Signature · 1 line
2.43.0