Hi Noralf, On Mon, Aug 28, 2017 at 07:17:42PM +0200, Noralf Trønnes wrote: > This adds device unplug support to drm_fb_helper, drm_fb_cma_helper > (fbdev) and tinydrm. > > My motivation for doing this is to make tinydrm useable with USB > devices. This discussion gave insight into the problem: > [PATCH v5 2/6] drm/bridge: Add a devm_ allocator for panel bridge. > https://lists.freedesktop.org/archives/dri-devel/2017-August/149376.html Looks a lot less scary than I thought, but I think needs a bit more polish. I think it'd be also great if you could co-evolve the udl driver to get this right, since it looks like right now it'll just oops when you unplug when userspace is using the fbdev emulation. That way we'd be at least somewhat consistent with unpluggable drivers, and since it's only 1 other it should be doable. Unplugging is already hard, having 2 drivers do stuff differently (when we only have 2 with unplug support) pretty much guarnatees we'll never get this right. But maybe good to first develop this using your own driver only. Cheers, Daniel > > Noralf. > > Noralf Trønnes (6): > drm/fb-helper: Avoid NULL ptr dereference in fb_set_suspend() > drm/fb-helper: Support device unplug > drm/fb-cma-helper: Support device unplug > drm/tinydrm: Embed drm_device in tinydrm_device > drm/tinydrm/mi0283qt: Let the display pipe handle power > drm/tinydrm: Support device unplug > > drivers/gpu/drm/drm_fb_cma_helper.c | 139 +++++++++---------- > drivers/gpu/drm/drm_fb_helper.c | 207 +++++++++++++++++++++++++++- > drivers/gpu/drm/tinydrm/core/tinydrm-core.c | 109 ++++++++++----- > drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c | 2 +- > drivers/gpu/drm/tinydrm/mi0283qt.c | 77 +++-------- > drivers/gpu/drm/tinydrm/mipi-dbi.c | 27 ++-- > drivers/gpu/drm/tinydrm/repaper.c | 19 ++- > drivers/gpu/drm/tinydrm/st7586.c | 25 ++-- > include/drm/drm_fb_cma_helper.h | 1 + > include/drm/drm_fb_helper.h | 35 +++++ > include/drm/tinydrm/tinydrm.h | 14 +- > 11 files changed, 460 insertions(+), 195 deletions(-) > > -- > 2.7.4 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel