[PATCH v3 03/71] drm/encoder: Introduce drmm_encoder_init

Philipp Zabel p.zabel at pengutronix.de
Wed Jun 29 13:32:12 UTC 2022


On Mi, 2022-06-29 at 14:34 +0200, Maxime Ripard wrote:
> The DRM-managed function to register an encoder is
> drmm_encoder_alloc() and its variants, which will allocate the underlying
> structure and initialisation the encoder.
> 
> However, we might want to separate the structure creation and the encoder
> initialisation, for example if the structure is shared across multiple DRM
> entities, for example an encoder and a connector.
> 
> Let's create an helper to only initialise an encoder that would be passed
> as an argument.

Daniel pointed out here [1], that it might be good to check the passed
encoders are actually in drmm managed memory.

[1] https://lore.kernel.org/dri-devel/CAKMK7uGaAtk4AY5y=jbC7nDduRYFBfLSdHE8wykJ602Lk-3n+Q@mail.gmail.com/


regards
Philipp


More information about the dri-devel mailing list