Unmappable DRM client buffers for fbdev emulation
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest6 patches 16 repliesIn review
- v15 patches 22 repliesSuperseded
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | drm/client: Support unmapping of DRM client buffersdrivers/ include/ | +60 | 0 replies | |
| 1/6 | drm/client: Support unmapping of DRM client buffersdrivers/ include/ | +60 | 2 replies | |
| 2/6 | drm/fb-helper: Map DRM client buffer only when requireddrivers/ drivers/ | +29 | 0 replies | |
| 2/6 | drm/fb-helper: Map DRM client buffer only when requireddrivers/ drivers/ | +29 | 2 replies | |
| 3/6 | drm/fb-helper: Instanciate shadow FB if configured in device's mode_configdrivers/ include/ | +19 | 0 replies | |
| 3/6 | drm/fb-helper: Instanciate shadow FB if configured in device's mode_configdrivers/ include/ | +19 | 6 replies | |
| 4/6 | drm/ast: Replace struct ast_fbdev with generic framebuffer emulationdrivers/ drivers/ drivers/ +3 more | +5 | 0 replies | |
| 4/6 | drm/ast: Replace struct ast_fbdev with generic framebuffer emulationdrivers/ drivers/ drivers/ +3 more | +5 | 0 replies | |
| 5/6 | drm/bochs: Use shadow buffer for bochs framebuffer consoledrivers/ | +1 | 0 replies | |
| 5/6 | drm/bochs: Use shadow buffer for bochs framebuffer consoledrivers/ | +1 | 0 replies | |
| 6/6 | drm/mgag200: Replace struct mga_fbdev with generic framebuffer emulationdrivers/ drivers/ drivers/ +2 more | +6 | 0 replies | |
| 6/6 | drm/mgag200: Replace struct mga_fbdev with generic framebuffer emulationdrivers/ drivers/ drivers/ +2 more | +6 | 0 replies |
Reviews trailers per patch
All 12 patches have a Reviewed-by or Acked-by.
| Patch | Noralf Trønnes |
|---|---|
| 1/6 | R-b R-b |
| 1/6 | R-b R-b |
| 2/6 | R-b R-b |
| 2/6 | R-b R-b |
| 3/6 | R-b T-b R-b T-b |
| 3/6 | R-b T-b R-b T-b |
| 4/6 | A-b A-b |
| 4/6 | A-b A-b |
| 5/6 | A-b A-b |
| 5/6 | A-b A-b |
| 6/6 | A-b A-b |
| 6/6 | A-b A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/6] Unmappable DRM client buffers for fbdev emulation
DRM client buffers are permanently mapped throughout their lifetime. This prevents us from using generic framebuffer emulation for devices with small dedicated video memory, such as ast or mgag200. With fb buffers permanently mapped, such devices often won't have enough space left to display other content (e.g., X11).
This patch set introduces unmappable DRM client buffers for framebuffer emulation with shadow buffers. While the shadow buffer remains in system memory permanently, the respective buffer object will only be mapped briefly during updates from the shadow buffer. Hence, the driver can relocate he buffer object among memory regions as needed.
HW-based framebuffer consoles will still map the buffer permanently. This is a special case required by the fbdev interface, which allows for mmaping video memory to userspace. Some userspace clients rely on this functionality. Hence, the patch set also changes DRM clients to not map the buffer by default. Future DRM clients are expected to map buffers as needed.
The patch set converts ast and mgag200 to generic framebuffer emulation and removes a large amount of framebuffer code from these drivers. For bochs, a problem was reported where the driver could not display the console because it was pinned in system memory. [1] The patch set fixes this bug by converting bochs to use the shadow fb.
The patch set has been tested on ast and mga200 HW.
[1] https://lists.freedesktop.org/archives/dri-devel/2019-June/224423.html
Thomas Zimmermann (6):
drm/client: Support unmapping of DRM client buffers drm/fb-helper: Map DRM client buffer only when required drm/fb-helper: Instanciate shadow FB if configured in device's
mode_config
drm/ast: Replace struct ast_fbdev with generic framebuffer emulation drm/bochs: Use shadow buffer for bochs framebuffer console drm/mgag200: Replace struct mga_fbdev with generic framebuffer
emulation
drivers/gpu/drm/ast/Makefile | 2 +- drivers/gpu/drm/ast/ast_drv.c | 13 +- drivers/gpu/drm/ast/ast_drv.h | 17 -- drivers/gpu/drm/ast/ast_fb.c | 341 ------------------------- drivers/gpu/drm/ast/ast_main.c | 3 +- drivers/gpu/drm/ast/ast_mode.c | 21 -- drivers/gpu/drm/bochs/bochs_kms.c | 1 + drivers/gpu/drm/drm_client.c | 61 ++++- drivers/gpu/drm/drm_fb_helper.c | 52 +++- drivers/gpu/drm/mgag200/Makefile | 2 +- drivers/gpu/drm/mgag200/mgag200_drv.h | 19 -- drivers/gpu/drm/mgag200/mgag200_fb.c | 309 ---------------------- drivers/gpu/drm/mgag200/mgag200_main.c | 31 +-- drivers/gpu/drm/mgag200/mgag200_mode.c | 27 -- include/drm/drm_client.h | 3 + include/drm/drm_mode_config.h | 5 + 16 files changed, 109 insertions(+), 798 deletions(-) delete mode 100644 drivers/gpu/drm/ast/ast_fb.c delete mode 100644 drivers/gpu/drm/mgag200/mgag200_fb.c
--
2.21.0