linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/11] fbdev/sbus: Initializers for struct fb_ops
@ 2023-08-06 11:58 Thomas Zimmermann
  2023-08-06 11:58 ` [PATCH 01/11] fbdev/sbus: Build sbuslib.o if CONFIG_FB_SBUS has been selected Thomas Zimmermann
                   ` (11 more replies)
  0 siblings, 12 replies; 14+ messages in thread
From: Thomas Zimmermann @ 2023-08-06 11:58 UTC (permalink / raw)
  To: deller, sam, javierm, davem
  Cc: sparclinux, linux-fbdev, dri-devel, Thomas Zimmermann

Add initializer macros for struct fb_ops of drivers that operate
on SBUS-based framebuffers. Also add a Kconfig token to select the
correct dependencies.

All drivers for SBUS-based framebuffers use the regular helpers
for framebuffers in I/O memory (fb_io_*() and cfb_*()). Each driver
provides its own implementation of mmap and ioctls around common
helpers from sbuslib.o. Patches 1 to 3 clean up the code a bit and
add a initializer macros that set up struct fb_ops correctly.

Patches 4 to 11 convert the drivers. Each patch slightly renames
the driver's mmap and ioctl functions so that it matches the name
pattern of sbuslib.o.

Like the other fbdev initializer macros, the SBUS helpers are
easily grep-able. In a later patch, they can be left to empty values
if the rsp. functionality, such as file I/O or console, has been
disabled.

There are no functional changes. The helpers set the defaults that
the drivers already use. The fb_io_*() functions that the initializer
macro sets are the defaults if struct fb_ops.fb_read or .fb_write are
NULL. After all drivers have been updated to set them explicitly, the
defaults can be dropped and the functions can be made optional.

Build-tested on sparc64.

Thomas Zimmermann (11):
  fbdev/sbus: Build sbuslib.o if CONFIG_FB_SBUS has been selected
  fbdev/sbus: Forward declare all necessary structures in header
  fbdev/sbus: Add initializer macros and Kconfig tokens for SBUS support
  fbdev/bw2: Use initializer macro for struct fb_ops
  fbdev/cg14: Use initializer macro for struct fb_ops
  fbdev/cg3: Use initializer macro for struct fb_ops
  fbdev/cg6: Use initializer macro for struct fb_ops
  fbdev/ffb: Use initializer macro for struct fb_ops
  fbdev/leo: Use initializer macro for struct fb_ops
  fbdev/p9100: Use initializer macro for struct fb_ops
  fbdev/tcx: Use initializer macro for struct fb_ops

 drivers/video/fbdev/Kconfig   | 30 ++++++++++++----------------
 drivers/video/fbdev/Makefile  | 17 ++++++++--------
 drivers/video/fbdev/bw2.c     | 17 +++++-----------
 drivers/video/fbdev/cg14.c    | 19 ++++++------------
 drivers/video/fbdev/cg3.c     | 17 +++++-----------
 drivers/video/fbdev/cg6.c     | 17 ++++++++--------
 drivers/video/fbdev/ffb.c     | 17 ++++++++--------
 drivers/video/fbdev/leo.c     | 19 ++++++------------
 drivers/video/fbdev/p9100.c   | 18 +++++------------
 drivers/video/fbdev/sbuslib.h | 37 ++++++++++++++++++++++++++++++++++-
 drivers/video/fbdev/tcx.c     | 20 ++++++-------------
 11 files changed, 106 insertions(+), 122 deletions(-)

-- 
2.41.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2023-08-28  8:52 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-06 11:58 [PATCH 00/11] fbdev/sbus: Initializers for struct fb_ops Thomas Zimmermann
2023-08-06 11:58 ` [PATCH 01/11] fbdev/sbus: Build sbuslib.o if CONFIG_FB_SBUS has been selected Thomas Zimmermann
2023-08-06 11:58 ` [PATCH 02/11] fbdev/sbus: Forward declare all necessary structures in header Thomas Zimmermann
2023-08-06 11:58 ` [PATCH 03/11] fbdev/sbus: Add initializer macros and Kconfig tokens for SBUS support Thomas Zimmermann
2023-08-06 11:58 ` [PATCH 04/11] fbdev/bw2: Use initializer macro for struct fb_ops Thomas Zimmermann
2023-08-06 11:58 ` [PATCH 05/11] fbdev/cg14: " Thomas Zimmermann
2023-08-06 11:58 ` [PATCH 06/11] fbdev/cg3: " Thomas Zimmermann
2023-08-06 11:58 ` [PATCH 07/11] fbdev/cg6: " Thomas Zimmermann
2023-08-06 11:58 ` [PATCH 08/11] fbdev/ffb: " Thomas Zimmermann
2023-08-06 11:59 ` [PATCH 09/11] fbdev/leo: " Thomas Zimmermann
2023-08-06 11:59 ` [PATCH 10/11] fbdev/p9100: " Thomas Zimmermann
2023-08-06 11:59 ` [PATCH 11/11] fbdev/tcx: " Thomas Zimmermann
2023-08-07 17:11 ` [PATCH 00/11] fbdev/sbus: Initializers " Sam Ravnborg
2023-08-28  8:51   ` 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).