OSDN Git Service

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)
commit63170ac6f2e8b047118885b35a49b717ebff5f70
tree3d07c351c2685d0d82d116fe8689bcb2f4e7d1a9
parent4a1d0dbc8332231d1d500d7a1d13c45457262a97
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