This patchset explores the possibility of having generic fbdev emulation in DRM for drivers that supports dumb buffers which they can export. The change this time is that I have tried to do an in-kernel client API. The intention was to have callbacks on the drm_file, but I gave up on that mainly because I have to take a ref on the driver module since drm_driver->postclose is called in drm_file_free(). This blocks DRM driver module unload. Another reason is that the callback signalling new drm_devices would have to be out-of-band so I put all the callbacks together. The patchset includes 3 different clients that I have done to see how it is to use the API: - fbdev - bootsplash - VT console There is still work left to be done, but it would be nice to get some feedback about the direction I have taken. For readers I suggest to first look at the bootsplash client to see the API in use. The client is very simple so it's an easy read. Noralf. Changes since version 2: - Don't set drm master for in-kernel clients. (Daniel Vetter) - Add in-kernel client API 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 (11): drm/file: Don't set master on in-kernel clients drm: Make ioctls available for in-kernel clients part 1 drm: Make ioctls available for in-kernel clients part 2 drm: Add _ioctl suffix to some functions drm: Add DRM device iterator drm/modes: Add drm_umode_equal() drm/framebuffer: Add drm_mode_can_dirtyfb() drm: Add API for in-kernel clients drm/client: Add fbdev emulation client drm/client: Add bootsplash client drm/client: Add VT console client drivers/gpu/drm/Kconfig | 2 + drivers/gpu/drm/Makefile | 3 +- drivers/gpu/drm/client/Kconfig | 30 + drivers/gpu/drm/client/Makefile | 5 + drivers/gpu/drm/client/drm_bootsplash.c | 205 ++++ drivers/gpu/drm/client/drm_client.c | 1612 +++++++++++++++++++++++++++++++ drivers/gpu/drm/client/drm_fbdev.c | 997 +++++++++++++++++++ drivers/gpu/drm/client/drm_vtcon.c | 760 +++++++++++++++ drivers/gpu/drm/drm_connector.c | 50 +- drivers/gpu/drm/drm_crtc.c | 47 +- drivers/gpu/drm/drm_crtc_internal.h | 80 +- drivers/gpu/drm/drm_drv.c | 66 ++ drivers/gpu/drm/drm_dumb_buffers.c | 33 +- drivers/gpu/drm/drm_encoder.c | 10 +- drivers/gpu/drm/drm_file.c | 304 +++--- drivers/gpu/drm/drm_framebuffer.c | 149 ++- drivers/gpu/drm/drm_internal.h | 7 + drivers/gpu/drm/drm_ioc32.c | 2 +- drivers/gpu/drm/drm_ioctl.c | 24 +- drivers/gpu/drm/drm_mode_config.c | 81 +- drivers/gpu/drm/drm_mode_object.c | 12 +- drivers/gpu/drm/drm_modes.c | 50 + drivers/gpu/drm/drm_plane.c | 24 +- drivers/gpu/drm/drm_prime.c | 13 +- drivers/gpu/drm/drm_probe_helper.c | 3 + drivers/gpu/drm/drm_vblank.c | 11 +- include/drm/drm_client.h | 192 ++++ include/drm/drm_device.h | 1 + include/drm/drm_drv.h | 34 + include/drm/drm_file.h | 7 + include/drm/drm_framebuffer.h | 2 + include/drm/drm_modes.h | 2 + 32 files changed, 4515 insertions(+), 303 deletions(-) create mode 100644 drivers/gpu/drm/client/Kconfig create mode 100644 drivers/gpu/drm/client/Makefile create mode 100644 drivers/gpu/drm/client/drm_bootsplash.c create mode 100644 drivers/gpu/drm/client/drm_client.c create mode 100644 drivers/gpu/drm/client/drm_fbdev.c create mode 100644 drivers/gpu/drm/client/drm_vtcon.c create mode 100644 include/drm/drm_client.h -- 2.15.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx