diff options
author | Maxime Ripard <maxime@cerno.tech> | 2022-07-11 19:38:33 +0200 |
---|---|---|
committer | Maxime Ripard <maxime@cerno.tech> | 2022-07-13 10:46:05 +0200 |
commit | f134c9cd9ce829cc66d4d32c57b76de1aab54fe9 (patch) | |
tree | 4915b58527ded9b4609781e8d14b645d771aaa17 /include/drm/drm_encoder.h | |
parent | drm/crtc: Introduce drmm_crtc_init_with_planes (diff) | |
download | linux-f134c9cd9ce829cc66d4d32c57b76de1aab54fe9.tar.xz linux-f134c9cd9ce829cc66d4d32c57b76de1aab54fe9.zip |
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
Diffstat (limited to 'include/drm/drm_encoder.h')
-rw-r--r-- | include/drm/drm_encoder.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/drm/drm_encoder.h b/include/drm/drm_encoder.h index 6e91a0280f31..3a09682af685 100644 --- a/include/drm/drm_encoder.h +++ b/include/drm/drm_encoder.h @@ -194,6 +194,12 @@ int drm_encoder_init(struct drm_device *dev, const struct drm_encoder_funcs *funcs, int encoder_type, const char *name, ...); +__printf(5, 6) +int drmm_encoder_init(struct drm_device *dev, + struct drm_encoder *encoder, + const struct drm_encoder_funcs *funcs, + int encoder_type, const char *name, ...); + __printf(6, 7) void *__drmm_encoder_alloc(struct drm_device *dev, size_t size, size_t offset, |