linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/19] drm,fbdev: Use fbdev's I/O helpers
@ 2023-04-28 12:24 Thomas Zimmermann
  2023-04-28 12:24 ` [PATCH v2 01/19] auxdisplay/cfag12864bfb: Use struct fb_info.screen_buffer Thomas Zimmermann
                   ` (18 more replies)
  0 siblings, 19 replies; 40+ messages in thread
From: Thomas Zimmermann @ 2023-04-28 12:24 UTC (permalink / raw)
  To: maarten.lankhorst, mripard, airlied, daniel, javierm, deller,
	geert, sudipm.mukherjee, teddy.wang
  Cc: dri-devel, linux-fbdev, Thomas Zimmermann

Make fbdev's built-in helpers for reading and writing I/O and system
memory available to DRM. Replace DRM's internal helpers.

The first 13 patches and patch 15 fix the use of screen_base and
screen_buffer. A number of drivers mix them up.

Patch 14 resolves a bug that's been in the fbdev code for more than
15 years. Makes the read/write helpers work successfully with the IGT
tests.

Patches 16 and 17 streamline fbdev's file-I/O code and remove a few
duplicate checks.

Patch 18 moves the default-I/O code into the new helpers fb_io_read()
and fb_io_write(); patch 19 uses them in DRM. This allows us to remove
quite a bit of code from DRM's internal fbdev helpers.

Tested with i915 and simpledrm.

The next step here is to remove the drm_fb_helper_{cfb,sys}_*()
entirely. They where mostly introduced because fbdev doesn't protect
it's public interfaces with an CONFIG_FB preprocessor guards. But all
of DRM driver's fbdev emulation won't be build without CONFIG_FB, so
this is not an issue in practice. Removing the DRM wrappers will
further simplify the DRM code.

v2:
	* fix screen_base vs. screen_buffer usage
	* fix copy_{from,to}_user() return value (Geert)
	* use fb_io_() prefix (Geert)
	* improved commit messages

Thomas Zimmermann (19):
  auxdisplay/cfag12864bfb: Use struct fb_info.screen_buffer
  auxdisplay/ht16k33: Use struct fb_info.screen_buffer
  hid/hid-picolcd_fb: Use struct fb_info.screen_buffer
  fbdev/arcfb: Use struct fb_info.screen_buffer
  fbdev/au1200fb: Use struct fb_info.screen_buffer
  fbdev/broadsheetfb: Use struct fb_info.screen_buffer
  fbdev/hecubafb: Use struct fb_info.screen_buffer
  fbdev/metronomefb: Use struct fb_info.screen_buffer
  fbdev/ps3fb: Use struct fb_info.screen_buffer
  fbdev/smscufx: Use struct fb_info.screen_buffer
  fbdev/udlfb: Use struct fb_info.screen_buffer
  fbdev/vfb: Use struct fb_info.screen_buffer
  fbdev/xen-fbfront: Use struct fb_info.screen_buffer
  fbdev: Return number of bytes read or written
  fbdev: Use screen_buffer in fb_sys_{read,write}()
  fbdev: Don't re-validate info->state in fb_ops implementations
  fbdev: Validate info->screen_{base,buffer} in fb_ops implementations
  fbdev: Move I/O read and write code into helper functions
  drm/fb-helper: Use fb_{cfb,sys}_{read, write}()

 drivers/auxdisplay/cfag12864bfb.c      |   2 +-
 drivers/auxdisplay/ht16k33.c           |   2 +-
 drivers/gpu/drm/drm_fb_helper.c        | 174 +------------------------
 drivers/hid/hid-picolcd_fb.c           |   4 +-
 drivers/media/pci/ivtv/ivtvfb.c        |   4 +-
 drivers/video/fbdev/arcfb.c            |  11 +-
 drivers/video/fbdev/au1200fb.c         |   2 +-
 drivers/video/fbdev/broadsheetfb.c     |  16 +--
 drivers/video/fbdev/cobalt_lcdfb.c     |   6 +
 drivers/video/fbdev/core/Makefile      |   2 +-
 drivers/video/fbdev/core/fb_io_fops.c  | 133 +++++++++++++++++++
 drivers/video/fbdev/core/fb_sys_fops.c |  36 ++---
 drivers/video/fbdev/core/fbmem.c       | 111 +---------------
 drivers/video/fbdev/hecubafb.c         |  12 +-
 drivers/video/fbdev/metronomefb.c      |  16 +--
 drivers/video/fbdev/ps3fb.c            |   4 +-
 drivers/video/fbdev/pvr2fb.c           |   3 +
 drivers/video/fbdev/sm712fb.c          |  10 +-
 drivers/video/fbdev/smscufx.c          |  14 +-
 drivers/video/fbdev/ssd1307fb.c        |   3 +
 drivers/video/fbdev/udlfb.c            |  12 +-
 drivers/video/fbdev/vfb.c              |   2 +-
 drivers/video/fbdev/xen-fbfront.c      |   2 +-
 include/linux/fb.h                     |  10 ++
 24 files changed, 239 insertions(+), 352 deletions(-)
 create mode 100644 drivers/video/fbdev/core/fb_io_fops.c

-- 
2.40.0


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

end of thread, other threads:[~2023-05-03 18:21 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-28 12:24 [PATCH v2 00/19] drm,fbdev: Use fbdev's I/O helpers Thomas Zimmermann
2023-04-28 12:24 ` [PATCH v2 01/19] auxdisplay/cfag12864bfb: Use struct fb_info.screen_buffer Thomas Zimmermann
2023-04-28 13:33   ` Javier Martinez Canillas
2023-04-28 12:24 ` [PATCH v2 02/19] auxdisplay/ht16k33: " Thomas Zimmermann
2023-04-28 13:34   ` Javier Martinez Canillas
2023-04-28 12:24 ` [PATCH v2 03/19] hid/hid-picolcd_fb: " Thomas Zimmermann
2023-04-28 13:34   ` Javier Martinez Canillas
2023-04-28 12:24 ` [PATCH v2 04/19] fbdev/arcfb: " Thomas Zimmermann
2023-04-28 13:35   ` Javier Martinez Canillas
2023-04-28 12:24 ` [PATCH v2 05/19] fbdev/au1200fb: " Thomas Zimmermann
2023-04-28 14:27   ` Javier Martinez Canillas
2023-04-28 12:24 ` [PATCH v2 06/19] fbdev/broadsheetfb: " Thomas Zimmermann
2023-04-28 14:31   ` Javier Martinez Canillas
2023-04-28 12:24 ` [PATCH v2 07/19] fbdev/hecubafb: " Thomas Zimmermann
2023-04-28 14:32   ` Javier Martinez Canillas
2023-04-28 12:24 ` [PATCH v2 08/19] fbdev/metronomefb: " Thomas Zimmermann
2023-04-28 14:36   ` Javier Martinez Canillas
2023-04-28 12:24 ` [PATCH v2 09/19] fbdev/ps3fb: " Thomas Zimmermann
2023-04-28 14:55   ` Javier Martinez Canillas
2023-04-28 12:24 ` [PATCH v2 10/19] fbdev/smscufx: " Thomas Zimmermann
2023-04-28 15:08   ` Javier Martinez Canillas
2023-04-28 12:24 ` [PATCH v2 11/19] fbdev/udlfb: " Thomas Zimmermann
2023-04-28 15:12   ` Javier Martinez Canillas
2023-04-28 12:24 ` [PATCH v2 12/19] fbdev/vfb: " Thomas Zimmermann
2023-04-28 15:12   ` Javier Martinez Canillas
2023-04-28 12:24 ` [PATCH v2 13/19] fbdev/xen-fbfront: " Thomas Zimmermann
2023-04-28 15:13   ` Javier Martinez Canillas
2023-04-28 12:24 ` [PATCH v2 14/19] fbdev: Return number of bytes read or written Thomas Zimmermann
2023-04-28 12:24 ` [PATCH v2 15/19] fbdev: Use screen_buffer in fb_sys_{read,write}() Thomas Zimmermann
2023-04-28 12:24 ` [PATCH v2 16/19] fbdev: Don't re-validate info->state in fb_ops implementations Thomas Zimmermann
2023-04-28 12:24 ` [PATCH v2 17/19] fbdev: Validate info->screen_{base,buffer} " Thomas Zimmermann
2023-05-03  9:51   ` Geert Uytterhoeven
2023-05-03 14:30     ` Thomas Zimmermann
2023-05-03 15:02       ` Geert Uytterhoeven
2023-05-03 18:21         ` Thomas Zimmermann
2023-04-28 12:24 ` [PATCH v2 18/19] fbdev: Move I/O read and write code into helper functions Thomas Zimmermann
2023-04-30 18:14   ` Sam Ravnborg
2023-05-02 16:42     ` Thomas Zimmermann
2023-04-28 12:24 ` [PATCH v2 19/19] drm/fb-helper: Use fb_{cfb,sys}_{read, write}() Thomas Zimmermann
2023-04-30 18:15   ` Sam Ravnborg

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).