linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] drm,fbdev: Use fbdev's I/O helpers
@ 2023-04-25 14:28 Thomas Zimmermann
  2023-04-25 14:28 ` [PATCH 1/6] fbdev: Return number of bytes read or written Thomas Zimmermann
                   ` (7 more replies)
  0 siblings, 8 replies; 41+ messages in thread
From: Thomas Zimmermann @ 2023-04-25 14:28 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 patch 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 2 to 4 streamline fbdev's file-I/O code and remove a few
duplicate checks.

Patch 5 moves the default-I/O code into the new helpers fb_cfb_read()
and fb_cfb_write(); patch 6 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.

Thomas Zimmermann (6):
  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 CFB read and write code into helper functions
  drm/fb-helper: Use fb_{cfb,sys}_{read, write}()

 drivers/gpu/drm/drm_fb_helper.c        | 174 +------------------------
 drivers/video/fbdev/cobalt_lcdfb.c     |   6 +
 drivers/video/fbdev/core/Makefile      |   2 +-
 drivers/video/fbdev/core/fb_cfb_fops.c | 126 ++++++++++++++++++
 drivers/video/fbdev/core/fb_sys_fops.c |  36 ++---
 drivers/video/fbdev/core/fbmem.c       | 111 +---------------
 drivers/video/fbdev/sm712fb.c          |  10 +-
 include/linux/fb.h                     |  10 ++
 8 files changed, 173 insertions(+), 302 deletions(-)
 create mode 100644 drivers/video/fbdev/core/fb_cfb_fops.c

-- 
2.40.0


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

end of thread, other threads:[~2023-04-28 12:20 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-25 14:28 [PATCH 0/6] drm,fbdev: Use fbdev's I/O helpers Thomas Zimmermann
2023-04-25 14:28 ` [PATCH 1/6] fbdev: Return number of bytes read or written Thomas Zimmermann
2023-04-25 16:15   ` Javier Martinez Canillas
2023-04-26  9:43   ` [1/6] " Sui Jingfeng
2023-04-26 14:41   ` [PATCH 1/6] " Geert Uytterhoeven
2023-04-26 15:01     ` Thomas Zimmermann
2023-04-25 14:28 ` [PATCH 2/6] fbdev: Use screen_buffer in fb_sys_{read,write}() Thomas Zimmermann
2023-04-25 16:35   ` Javier Martinez Canillas
2023-04-26 14:14     ` Thomas Zimmermann
2023-04-26 14:43     ` Geert Uytterhoeven
2023-04-26  9:47   ` [2/6] " Sui Jingfeng
2023-04-25 14:28 ` [PATCH 3/6] fbdev: Don't re-validate info->state in fb_ops implementations Thomas Zimmermann
2023-04-25 16:38   ` Javier Martinez Canillas
2023-04-26  9:49   ` [3/6] " Sui Jingfeng
2023-04-26 14:49   ` [PATCH 3/6] " Geert Uytterhoeven
2023-04-26 15:07     ` Thomas Zimmermann
2023-04-25 14:28 ` [PATCH 4/6] fbdev: Validate info->screen_{base,buffer} " Thomas Zimmermann
2023-04-25 16:39   ` Javier Martinez Canillas
2023-04-26 10:24   ` [4/6] fbdev: Validate info->screen_{base, buffer} " Sui Jingfeng
2023-04-26 14:56   ` [PATCH 4/6] fbdev: Validate info->screen_{base,buffer} " Geert Uytterhoeven
2023-04-27 13:54     ` Thomas Zimmermann
2023-04-25 14:28 ` [PATCH 5/6] fbdev: Move CFB read and write code into helper functions Thomas Zimmermann
2023-04-25 16:47   ` Javier Martinez Canillas
2023-04-26  5:16   ` kernel test robot
2023-04-26 14:24     ` Thomas Zimmermann
2023-04-26  6:07   ` kernel test robot
2023-04-26  6:47   ` kernel test robot
2023-04-26 10:25   ` [5/6] " Sui Jingfeng
2023-04-26 15:01   ` [PATCH 5/6] " Geert Uytterhoeven
2023-04-26 15:06     ` Thomas Zimmermann
2023-04-26 15:21       ` Geert Uytterhoeven
2023-04-28 11:20         ` Thomas Zimmermann
2023-04-28 12:20           ` Geert Uytterhoeven
2023-04-25 14:28 ` [PATCH 6/6] drm/fb-helper: Use fb_{cfb,sys}_{read, write}() Thomas Zimmermann
2023-04-25 16:50   ` Javier Martinez Canillas
2023-04-26 10:26   ` [6/6] " Sui Jingfeng
2023-04-26 15:15   ` [PATCH 6/6] " Geert Uytterhoeven
2023-04-28 11:25     ` Thomas Zimmermann
2023-04-25 19:17 ` [PATCH 0/6] drm,fbdev: Use fbdev's I/O helpers Helge Deller
2023-04-26 10:33 ` Sui Jingfeng
2023-04-26 11:22   ` 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).