[RFC v2 0/8] drm: Add generic fbdev emulation

Noralf Trønnes
2018-01-03T22:21:02Z

This patchset explores the possibility of having generic fbdev emulation
in DRM for drivers that supports dumb buffers which they can export.

Chris pointed out a bug in the previous version. I've solved this by
deferring buffer creation until fb_ops->fb_open. This works fine for
fbcon as well, since the first thing it does is to call fb_open.

I also had to export some functions for modular builds.

Noralf.

Changes since version 1:
- Don't add drm_fb_helper_fb_open() and drm_fb_helper_fb_release() to
DRM_FB_HELPER_DEFAULT_OPS(). (Fi.CI.STATIC)
The following uses that macro and sets fb_open/close: udlfb_ops,
amdgpufb_ops, drm_fb_helper_generic_fbdev_ops, nouveau_fbcon_ops,
nouveau_fbcon_sw_ops, radeonfb_ops.
This results in: warning: Initializer entry defined twice
- Support CONFIG_DRM_KMS_HELPER=m (kbuild test robot)
ERROR: <function> [drivers/gpu/drm/drm_kms_helper.ko] undefined!
- Drop buggy patch: (Chris Wilson)
drm/prime: Clear drm_gem_object->dma_buf on release
- Defer buffer creation until fb_open.

David Herrmann (1):
drm: provide management functions for drm_file

Noralf Trønnes (7):
drm/ioctl: Remove trailing whitespace
drm: Export some ioctl functions
drm/fb-helper: Ensure driver module is pinned in fb_open()
drm/fb-helper: Don't restore if fbdev is not in use
drm: Handle fbdev emulation in core
drm/fb-helper: Add generic fbdev emulation
drm/vc4: Test generic fbdev emulation

drivers/gpu/drm/drm_auth.c | 1 +
drivers/gpu/drm/drm_crtc_internal.h | 4 -
drivers/gpu/drm/drm_dumb_buffers.c | 1 +
drivers/gpu/drm/drm_fb_helper.c | 356 +++++++++++++++++++++++++++++++++++-
drivers/gpu/drm/drm_file.c | 323 ++++++++++++++++++--------------
drivers/gpu/drm/drm_framebuffer.c | 1 +
drivers/gpu/drm/drm_internal.h | 4 -
drivers/gpu/drm/drm_ioctl.c | 5 +-
drivers/gpu/drm/drm_mode_config.c | 10 +
drivers/gpu/drm/drm_prime.c | 1 +
drivers/gpu/drm/drm_probe_helper.c | 4 +
drivers/gpu/drm/vc4/vc4_drv.c | 3 -
drivers/gpu/drm/vc4/vc4_kms.c | 3 +-
include/drm/drm_auth.h | 3 +
include/drm/drm_dumb_buffers.h | 10 +
include/drm/drm_fb_helper.h | 93 ++++++++++
include/drm/drm_file.h | 2 +
include/drm/drm_framebuffer.h | 3 +
include/drm/drm_prime.h | 2 +
19 files changed, 680 insertions(+), 149 deletions(-)
create mode 100644 include/drm/drm_dumb_buffers.h

--
2.14.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org