[PATCH v4 2/4] drm/panel: Add refcount support
Maxime Ripard
mripard at kernel.org
Tue May 27 14:57:51 UTC 2025
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 <mripard at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 273 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20250527/bf9eadfd/attachment.sig>
More information about the dri-devel
mailing list