OSDN Git Service

drm/encoder: Introduce drmm_encoder_init
authorMaxime Ripard <maxime@cerno.tech>
Mon, 11 Jul 2022 17:38:33 +0000 (19:38 +0200)
committerMaxime Ripard <maxime@cerno.tech>
Wed, 13 Jul 2022 08:46:05 +0000 (10:46 +0200)
commitf134c9cd9ce829cc66d4d32c57b76de1aab54fe9
tree4915b58527ded9b4609781e8d14b645d771aaa17
parent917dd05418148f05d8860b8106da8dcd1d258aaf
drm/encoder: Introduce drmm_encoder_init

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.

Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20220711173939.1132294-4-maxime@cerno.tech
drivers/gpu/drm/drm_encoder.c
include/drm/drm_encoder.h