On Tue, May 20, 2025 at 01:09:47PM +0300, Jani Nikula wrote: > > Maxime - > > I'm cutting a lot of context here. Not because I don't think it deserves > an answer, but because I seem to be failing at communication. > > On Mon, 19 May 2025, Maxime Ripard <mrip...@kernel.org> wrote: > > You still haven't explained why it would take anything more than > > registering a dumb device at probe time though. > > With that, do you mean a dumb struct device, or any struct device with a > suitable lifetime, that we'd pass to devm_drm_panel_alloc()? > > Is using devm_drm_panel_alloc() like that instead of our own allocation > with drm_panel_init() the main point of contention for you? If yes, we > can do that.
Yeah, I was thinking of something along the lines of: const struct drm_panel_funcs dummy_funcs = {}; struct drm_panel *register_panel() { struct faux_device *faux; struct drm_panel *panel; int ret; faux = faux_device_create(...); if IS_ERR(faux) return ERR_CAST(faux); return __devm_drm_panel_alloc(&faux->dev, sizeof(*panel), 0, &dummy_funcs, $CONNECTOR_TYPE); } And you have a panel, under your control, with exactly the same setup than anyone else. Maxime
signature.asc
Description: PGP signature