diff options
author | Maxime Ripard <maxime@cerno.tech> | 2022-07-11 20:38:32 +0300 |
---|---|---|
committer | Maxime Ripard <maxime@cerno.tech> | 2022-07-13 11:46:05 +0300 |
commit | 917dd05418148f05d8860b8106da8dcd1d258aaf (patch) | |
tree | 502a8180e3cd60b368a25e1e44a5274d1f2c7f5f /include | |
parent | 668a8f17b5290d04ef7343636a5588a0692731a1 (diff) | |
download | linux-917dd05418148f05d8860b8106da8dcd1d258aaf.tar.xz |
drm/crtc: Introduce drmm_crtc_init_with_planes
The DRM-managed function to register a CRTC is
drmm_crtc_alloc_with_planes(), which will allocate the underlying
structure and initialisation the CRTC.
However, we might want to separate the structure creation and the CRTC
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 a CRTC 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-3-maxime@cerno.tech
Diffstat (limited to 'include')
-rw-r--r-- | include/drm/drm_crtc.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index ffc1cde331d3..8e1cbc75143e 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -1216,6 +1216,15 @@ int drm_crtc_init_with_planes(struct drm_device *dev, struct drm_plane *cursor, const struct drm_crtc_funcs *funcs, const char *name, ...); + +__printf(6, 7) +int drmm_crtc_init_with_planes(struct drm_device *dev, + struct drm_crtc *crtc, + struct drm_plane *primary, + struct drm_plane *cursor, + const struct drm_crtc_funcs *funcs, + const char *name, ...); + void drm_crtc_cleanup(struct drm_crtc *crtc); __printf(7, 8) |