]> git.baikalelectronics.ru Git - kernel.git/commit
drm/simple-kms: Add drm_simple_encoder_{init,create}()
authorThomas Zimmermann <tzimmermann@suse.de>
Fri, 28 Feb 2020 08:18:25 +0000 (09:18 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Mon, 2 Mar 2020 08:22:35 +0000 (09:22 +0100)
commitd65c057a0d88eb051d01c9407242f70db02350b6
tree3d07c351c2685d0d82d116fe8689bcb2f4e7d1a9
parentc3db1b4f2b2bdab12e5963c32f20ed8f70780038
drm/simple-kms: Add drm_simple_encoder_{init,create}()

This patch makes the internal encoder implementation of the simple
KMS helpers available to drivers.

These simple-encoder helpers initialize an encoder with an empty
implementation. This covers the requirements of most of the existing
DRM drivers. A call to drm_simple_encoder_create() allocates and
initializes an encoder instance, a call to drm_simple_encoder_init()
initializes a pre-allocated instance.

v3:
* remove drm_simple_encoder_create(); not required yet
* provide more precise documentation
v2:
* move simple encoder to KMS helpers
* remove name argument; simplifies implementation
* don't allocate with devm_ interfaces; unsafe with DRM

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200228081828.18463-2-tzimmermann@suse.de
drivers/gpu/drm/drm_simple_kms_helper.c
include/drm/drm_simple_kms_helper.h