aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/bridge/panel.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2019-01-17 18:20:10 -0500
committerDave Airlie <airlied@redhat.com>2019-01-17 18:31:28 -0500
commitf164a94c2c87752caeb1a3cbe068c440e7f7921f (patch)
treee914296ef0ce1df83e506a12bf4306d5aa468b24 /drivers/gpu/drm/bridge/panel.c
parentb122153c7198e35fcb981ca9efd63b0df8ef3eab (diff)
parent94520db52fc0e931327bb77fe79a952a0e9dd2b0 (diff)
Merge tag 'drm-misc-next-2019-01-16' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
drm-misc-next for 5.1: UAPI Changes: - New fourcc identifier for ARM Framebuffer Compression v1.3 Cross-subsystem Changes: Core Changes: - Reorganisation of drm_device and drm_framebuffer headers - Cleanup of the drmP inclusion - Fix leaks in the fb-helpers - Allow for depth different from bpp in fb-helper fbdev emulation - Remove drm_mode_object from drm_display_mode Driver Changes: - Add reflection properties to rockchip - a bunch of fixes for virtio - a bunch of fixes for dp_mst and drivers using it, and introduction of a new refcounting scheme - Convertion of bochs to atomic and generic fbdev emulation - Allow meson to remove the firmware framebuffers [airlied: patch rcar-du to add drm_modes.h] Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maxime Ripard <maxime.ripard@bootlin.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190116200428.u2n4jbk4mzza7n6e@flea
Diffstat (limited to 'drivers/gpu/drm/bridge/panel.c')
-rw-r--r--drivers/gpu/drm/bridge/panel.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/drivers/gpu/drm/bridge/panel.c b/drivers/gpu/drm/bridge/panel.c
index 7cbaba213ef6..37baa79e95c3 100644
--- a/drivers/gpu/drm/bridge/panel.c
+++ b/drivers/gpu/drm/bridge/panel.c
@@ -134,8 +134,8 @@ static const struct drm_bridge_funcs panel_bridge_bridge_funcs = {
134}; 134};
135 135
136/** 136/**
137 * drm_panel_bridge_add - Creates a drm_bridge and drm_connector that 137 * drm_panel_bridge_add - Creates a &drm_bridge and &drm_connector that
138 * just calls the appropriate functions from drm_panel. 138 * just calls the appropriate functions from &drm_panel.
139 * 139 *
140 * @panel: The drm_panel being wrapped. Must be non-NULL. 140 * @panel: The drm_panel being wrapped. Must be non-NULL.
141 * @connector_type: The DRM_MODE_CONNECTOR_* for the connector to be 141 * @connector_type: The DRM_MODE_CONNECTOR_* for the connector to be
@@ -149,9 +149,12 @@ static const struct drm_bridge_funcs panel_bridge_bridge_funcs = {
149 * passed to drm_bridge_attach(). The drm_panel_prepare() and related 149 * passed to drm_bridge_attach(). The drm_panel_prepare() and related
150 * functions can be dropped from the encoder driver (they're now 150 * functions can be dropped from the encoder driver (they're now
151 * called by the KMS helpers before calling into the encoder), along 151 * called by the KMS helpers before calling into the encoder), along
152 * with connector creation. When done with the bridge, 152 * with connector creation. When done with the bridge (after
153 * drm_bridge_detach() should be called as normal, then 153 * drm_mode_config_cleanup() if the bridge has already been attached), then
154 * drm_panel_bridge_remove() to free it. 154 * drm_panel_bridge_remove() to free it.
155 *
156 * See devm_drm_panel_bridge_add() for an automatically manged version of this
157 * function.
155 */ 158 */
156struct drm_bridge *drm_panel_bridge_add(struct drm_panel *panel, 159struct drm_bridge *drm_panel_bridge_add(struct drm_panel *panel,
157 u32 connector_type) 160 u32 connector_type)
@@ -210,6 +213,17 @@ static void devm_drm_panel_bridge_release(struct device *dev, void *res)
210 drm_panel_bridge_remove(*bridge); 213 drm_panel_bridge_remove(*bridge);
211} 214}
212 215
216/**
217 * devm_drm_panel_bridge_add - Creates a managed &drm_bridge and &drm_connector
218 * that just calls the appropriate functions from &drm_panel.
219 * @dev: device to tie the bridge lifetime to
220 * @panel: The drm_panel being wrapped. Must be non-NULL.
221 * @connector_type: The DRM_MODE_CONNECTOR_* for the connector to be
222 * created.
223 *
224 * This is the managed version of drm_panel_bridge_add() which automatically
225 * calls drm_panel_bridge_remove() when @dev is unbound.
226 */
213struct drm_bridge *devm_drm_panel_bridge_add(struct device *dev, 227struct drm_bridge *devm_drm_panel_bridge_add(struct device *dev,
214 struct drm_panel *panel, 228 struct drm_panel *panel,
215 u32 connector_type) 229 u32 connector_type)