blob: bd78c256b1edf3bd8f87f8290bee3542072b6ef5 [file] [log] [blame]
Daniel Vetter199e4e92016-08-31 18:09:05 +02001/*
2 * Copyright (c) 2016 Intel Corporation
3 *
4 * Permission to use, copy, modify, distribute, and sell this software and its
5 * documentation for any purpose is hereby granted without fee, provided that
6 * the above copyright notice appear in all copies and that both that copyright
7 * notice and this permission notice appear in supporting documentation, and
8 * that the name of the copyright holders not be used in advertising or
9 * publicity pertaining to distribution of the software without specific,
10 * written prior permission. The copyright holders make no representations
11 * about the suitability of this software for any purpose. It is provided "as
12 * is" without express or implied warranty.
13 *
14 * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16 * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
20 * OF THIS SOFTWARE.
21 */
22
23#ifndef __DRM_BRIDGE_H__
24#define __DRM_BRIDGE_H__
25
26#include <linux/list.h>
27#include <linux/ctype.h>
Boris Brezillon35a61fe2019-12-03 15:15:07 +010028#include <drm/drm_encoder.h>
Daniel Vetter199e4e92016-08-31 18:09:05 +020029#include <drm/drm_mode_object.h>
30#include <drm/drm_modes.h>
31
32struct drm_bridge;
Linus Walleij36a776d2018-01-12 08:48:52 +010033struct drm_bridge_timings;
Eric Anholt13dfc052017-06-02 13:25:14 -070034struct drm_panel;
Daniel Vetter199e4e92016-08-31 18:09:05 +020035
36/**
37 * struct drm_bridge_funcs - drm_bridge control functions
38 */
39struct drm_bridge_funcs {
40 /**
41 * @attach:
42 *
43 * This callback is invoked whenever our bridge is being attached to a
44 * &drm_encoder.
45 *
Laurent Pinchartfe9e5572019-08-22 02:55:02 +030046 * The @attach callback is optional.
Daniel Vetter199e4e92016-08-31 18:09:05 +020047 *
48 * RETURNS:
49 *
50 * Zero on success, error code on failure.
51 */
52 int (*attach)(struct drm_bridge *bridge);
53
54 /**
55 * @detach:
56 *
57 * This callback is invoked whenever our bridge is being detached from a
58 * &drm_encoder.
59 *
Laurent Pinchartfe9e5572019-08-22 02:55:02 +030060 * The @detach callback is optional.
Daniel Vetter199e4e92016-08-31 18:09:05 +020061 */
62 void (*detach)(struct drm_bridge *bridge);
63
64 /**
Jose Abreu3eb220a2017-05-15 11:33:47 +020065 * @mode_valid:
66 *
67 * This callback is used to check if a specific mode is valid in this
68 * bridge. This should be implemented if the bridge has some sort of
69 * restriction in the modes it can display. For example, a given bridge
70 * may be responsible to set a clock value. If the clock can not
71 * produce all the values for the available modes then this callback
72 * can be used to restrict the number of modes to only the ones that
73 * can be displayed.
74 *
75 * This hook is used by the probe helpers to filter the mode list in
76 * drm_helper_probe_single_connector_modes(), and it is used by the
77 * atomic helpers to validate modes supplied by userspace in
78 * drm_atomic_helper_check_modeset().
79 *
Laurent Pinchartfe9e5572019-08-22 02:55:02 +030080 * The @mode_valid callback is optional.
Jose Abreu3eb220a2017-05-15 11:33:47 +020081 *
82 * NOTE:
83 *
84 * Since this function is both called from the check phase of an atomic
85 * commit, and the mode validation in the probe paths it is not allowed
86 * to look at anything else but the passed-in mode, and validate it
87 * against configuration-invariant hardward constraints. Any further
88 * limits which depend upon the configuration can only be checked in
89 * @mode_fixup.
90 *
91 * RETURNS:
92 *
93 * drm_mode_status Enum
94 */
Linus Walleij312924d2018-01-29 10:55:31 +010095 enum drm_mode_status (*mode_valid)(struct drm_bridge *bridge,
Jose Abreu3eb220a2017-05-15 11:33:47 +020096 const struct drm_display_mode *mode);
97
98 /**
Daniel Vetter199e4e92016-08-31 18:09:05 +020099 * @mode_fixup:
100 *
Philippe Cornu5d435b42018-05-15 22:37:36 +0200101 * This callback is used to validate and adjust a mode. The parameter
Daniel Vetter199e4e92016-08-31 18:09:05 +0200102 * mode is the display mode that should be fed to the next element in
103 * the display chain, either the final &drm_connector or the next
104 * &drm_bridge. The parameter adjusted_mode is the input mode the bridge
105 * requires. It can be modified by this callback and does not need to
Daniel Vetter9de5d4a2017-05-15 11:11:35 +0200106 * match mode. See also &drm_crtc_state.adjusted_mode for more details.
Daniel Vetter199e4e92016-08-31 18:09:05 +0200107 *
108 * This is the only hook that allows a bridge to reject a modeset. If
109 * this function passes all other callbacks must succeed for this
110 * configuration.
111 *
Laurent Pinchartfe9e5572019-08-22 02:55:02 +0300112 * The @mode_fixup callback is optional.
Daniel Vetter199e4e92016-08-31 18:09:05 +0200113 *
114 * NOTE:
115 *
116 * This function is called in the check phase of atomic modesets, which
117 * can be aborted for any reason (including on userspace's request to
118 * just check whether a configuration would be possible). Drivers MUST
119 * NOT touch any persistent state (hardware or software) or data
120 * structures except the passed in @state parameter.
121 *
Jose Abreu3eb220a2017-05-15 11:33:47 +0200122 * Also beware that userspace can request its own custom modes, neither
123 * core nor helpers filter modes to the list of probe modes reported by
124 * the GETCONNECTOR IOCTL and stored in &drm_connector.modes. To ensure
125 * that modes are filtered consistently put any bridge constraints and
126 * limits checks into @mode_valid.
127 *
Daniel Vetter199e4e92016-08-31 18:09:05 +0200128 * RETURNS:
129 *
130 * True if an acceptable configuration is possible, false if the modeset
131 * operation should be rejected.
132 */
133 bool (*mode_fixup)(struct drm_bridge *bridge,
134 const struct drm_display_mode *mode,
135 struct drm_display_mode *adjusted_mode);
136 /**
137 * @disable:
138 *
139 * This callback should disable the bridge. It is called right before
140 * the preceding element in the display pipe is disabled. If the
141 * preceding element is a bridge this means it's called before that
Daniel Vetter4541d312017-01-02 09:17:26 +0100142 * bridge's @disable vfunc. If the preceding element is a &drm_encoder
143 * it's called right before the &drm_encoder_helper_funcs.disable,
144 * &drm_encoder_helper_funcs.prepare or &drm_encoder_helper_funcs.dpms
145 * hook.
Daniel Vetter199e4e92016-08-31 18:09:05 +0200146 *
147 * The bridge can assume that the display pipe (i.e. clocks and timing
148 * signals) feeding it is still running when this callback is called.
149 *
Laurent Pinchartfe9e5572019-08-22 02:55:02 +0300150 * The @disable callback is optional.
Daniel Vetter199e4e92016-08-31 18:09:05 +0200151 */
152 void (*disable)(struct drm_bridge *bridge);
153
154 /**
155 * @post_disable:
156 *
Daniel Vetter4541d312017-01-02 09:17:26 +0100157 * This callback should disable the bridge. It is called right after the
158 * preceding element in the display pipe is disabled. If the preceding
159 * element is a bridge this means it's called after that bridge's
160 * @post_disable function. If the preceding element is a &drm_encoder
161 * it's called right after the encoder's
162 * &drm_encoder_helper_funcs.disable, &drm_encoder_helper_funcs.prepare
163 * or &drm_encoder_helper_funcs.dpms hook.
Daniel Vetter199e4e92016-08-31 18:09:05 +0200164 *
165 * The bridge must assume that the display pipe (i.e. clocks and timing
166 * singals) feeding it is no longer running when this callback is
167 * called.
168 *
Laurent Pinchartfe9e5572019-08-22 02:55:02 +0300169 * The @post_disable callback is optional.
Daniel Vetter199e4e92016-08-31 18:09:05 +0200170 */
171 void (*post_disable)(struct drm_bridge *bridge);
172
173 /**
174 * @mode_set:
175 *
176 * This callback should set the given mode on the bridge. It is called
Daniel Vetter4541d312017-01-02 09:17:26 +0100177 * after the @mode_set callback for the preceding element in the display
178 * pipeline has been called already. If the bridge is the first element
179 * then this would be &drm_encoder_helper_funcs.mode_set. The display
180 * pipe (i.e. clocks and timing signals) is off when this function is
181 * called.
Philippe Cornu584a0142018-04-09 17:24:27 +0200182 *
183 * The adjusted_mode parameter is the mode output by the CRTC for the
184 * first bridge in the chain. It can be different from the mode
185 * parameter that contains the desired mode for the connector at the end
186 * of the bridges chain, for instance when the first bridge in the chain
187 * performs scaling. The adjusted mode is mostly useful for the first
188 * bridge in the chain and is likely irrelevant for the other bridges.
189 *
190 * For atomic drivers the adjusted_mode is the mode stored in
191 * &drm_crtc_state.adjusted_mode.
192 *
193 * NOTE:
194 *
195 * If a need arises to store and access modes adjusted for other
196 * locations than the connection between the CRTC and the first bridge,
197 * the DRM framework will have to be extended with DRM bridge states.
Daniel Vetter199e4e92016-08-31 18:09:05 +0200198 */
199 void (*mode_set)(struct drm_bridge *bridge,
Laurent Pinchart63f8f3b2018-04-06 17:39:01 +0300200 const struct drm_display_mode *mode,
201 const struct drm_display_mode *adjusted_mode);
Daniel Vetter199e4e92016-08-31 18:09:05 +0200202 /**
203 * @pre_enable:
204 *
205 * This callback should enable the bridge. It is called right before
206 * the preceding element in the display pipe is enabled. If the
207 * preceding element is a bridge this means it's called before that
Daniel Vetter4541d312017-01-02 09:17:26 +0100208 * bridge's @pre_enable function. If the preceding element is a
209 * &drm_encoder it's called right before the encoder's
210 * &drm_encoder_helper_funcs.enable, &drm_encoder_helper_funcs.commit or
211 * &drm_encoder_helper_funcs.dpms hook.
Daniel Vetter199e4e92016-08-31 18:09:05 +0200212 *
213 * The display pipe (i.e. clocks and timing signals) feeding this bridge
214 * will not yet be running when this callback is called. The bridge must
215 * not enable the display link feeding the next bridge in the chain (if
216 * there is one) when this callback is called.
217 *
Laurent Pinchartfe9e5572019-08-22 02:55:02 +0300218 * The @pre_enable callback is optional.
Daniel Vetter199e4e92016-08-31 18:09:05 +0200219 */
220 void (*pre_enable)(struct drm_bridge *bridge);
221
222 /**
223 * @enable:
224 *
225 * This callback should enable the bridge. It is called right after
226 * the preceding element in the display pipe is enabled. If the
227 * preceding element is a bridge this means it's called after that
Daniel Vetter4541d312017-01-02 09:17:26 +0100228 * bridge's @enable function. If the preceding element is a
229 * &drm_encoder it's called right after the encoder's
230 * &drm_encoder_helper_funcs.enable, &drm_encoder_helper_funcs.commit or
231 * &drm_encoder_helper_funcs.dpms hook.
Daniel Vetter199e4e92016-08-31 18:09:05 +0200232 *
233 * The bridge can assume that the display pipe (i.e. clocks and timing
234 * signals) feeding it is running when this callback is called. This
235 * callback must enable the display link feeding the next bridge in the
236 * chain if there is one.
237 *
Laurent Pinchartfe9e5572019-08-22 02:55:02 +0300238 * The @enable callback is optional.
Daniel Vetter199e4e92016-08-31 18:09:05 +0200239 */
240 void (*enable)(struct drm_bridge *bridge);
Sean Paul5ade0712019-06-11 12:08:17 -0400241
242 /**
243 * @atomic_pre_enable:
244 *
245 * This callback should enable the bridge. It is called right before
246 * the preceding element in the display pipe is enabled. If the
247 * preceding element is a bridge this means it's called before that
248 * bridge's @atomic_pre_enable or @pre_enable function. If the preceding
249 * element is a &drm_encoder it's called right before the encoder's
250 * &drm_encoder_helper_funcs.atomic_enable hook.
251 *
252 * The display pipe (i.e. clocks and timing signals) feeding this bridge
253 * will not yet be running when this callback is called. The bridge must
254 * not enable the display link feeding the next bridge in the chain (if
255 * there is one) when this callback is called.
256 *
257 * Note that this function will only be invoked in the context of an
Boris Brezillonea099ad2019-12-03 15:15:05 +0100258 * atomic commit. It will not be invoked from
259 * &drm_bridge_chain_pre_enable. It would be prudent to also provide an
260 * implementation of @pre_enable if you are expecting driver calls into
261 * &drm_bridge_chain_pre_enable.
Sean Paul5ade0712019-06-11 12:08:17 -0400262 *
263 * The @atomic_pre_enable callback is optional.
264 */
265 void (*atomic_pre_enable)(struct drm_bridge *bridge,
266 struct drm_atomic_state *state);
267
268 /**
269 * @atomic_enable:
270 *
271 * This callback should enable the bridge. It is called right after
272 * the preceding element in the display pipe is enabled. If the
273 * preceding element is a bridge this means it's called after that
274 * bridge's @atomic_enable or @enable function. If the preceding element
275 * is a &drm_encoder it's called right after the encoder's
276 * &drm_encoder_helper_funcs.atomic_enable hook.
277 *
278 * The bridge can assume that the display pipe (i.e. clocks and timing
279 * signals) feeding it is running when this callback is called. This
280 * callback must enable the display link feeding the next bridge in the
281 * chain if there is one.
282 *
283 * Note that this function will only be invoked in the context of an
Boris Brezillonea099ad2019-12-03 15:15:05 +0100284 * atomic commit. It will not be invoked from &drm_bridge_chain_enable.
285 * It would be prudent to also provide an implementation of @enable if
286 * you are expecting driver calls into &drm_bridge_chain_enable.
Sean Paul5ade0712019-06-11 12:08:17 -0400287 *
Laurent Pinchartfe9e5572019-08-22 02:55:02 +0300288 * The @atomic_enable callback is optional.
Sean Paul5ade0712019-06-11 12:08:17 -0400289 */
290 void (*atomic_enable)(struct drm_bridge *bridge,
291 struct drm_atomic_state *state);
292 /**
293 * @atomic_disable:
294 *
295 * This callback should disable the bridge. It is called right before
296 * the preceding element in the display pipe is disabled. If the
297 * preceding element is a bridge this means it's called before that
298 * bridge's @atomic_disable or @disable vfunc. If the preceding element
299 * is a &drm_encoder it's called right before the
300 * &drm_encoder_helper_funcs.atomic_disable hook.
301 *
302 * The bridge can assume that the display pipe (i.e. clocks and timing
303 * signals) feeding it is still running when this callback is called.
304 *
305 * Note that this function will only be invoked in the context of an
Boris Brezillonea099ad2019-12-03 15:15:05 +0100306 * atomic commit. It will not be invoked from
307 * &drm_bridge_chain_disable. It would be prudent to also provide an
308 * implementation of @disable if you are expecting driver calls into
309 * &drm_bridge_chain_disable.
Sean Paul5ade0712019-06-11 12:08:17 -0400310 *
Laurent Pinchartfe9e5572019-08-22 02:55:02 +0300311 * The @atomic_disable callback is optional.
Sean Paul5ade0712019-06-11 12:08:17 -0400312 */
313 void (*atomic_disable)(struct drm_bridge *bridge,
314 struct drm_atomic_state *state);
315
316 /**
317 * @atomic_post_disable:
318 *
319 * This callback should disable the bridge. It is called right after the
320 * preceding element in the display pipe is disabled. If the preceding
321 * element is a bridge this means it's called after that bridge's
322 * @atomic_post_disable or @post_disable function. If the preceding
323 * element is a &drm_encoder it's called right after the encoder's
324 * &drm_encoder_helper_funcs.atomic_disable hook.
325 *
326 * The bridge must assume that the display pipe (i.e. clocks and timing
327 * signals) feeding it is no longer running when this callback is
328 * called.
329 *
330 * Note that this function will only be invoked in the context of an
Boris Brezillonea099ad2019-12-03 15:15:05 +0100331 * atomic commit. It will not be invoked from
332 * &drm_bridge_chain_post_disable.
Sean Paul5ade0712019-06-11 12:08:17 -0400333 * It would be prudent to also provide an implementation of
334 * @post_disable if you are expecting driver calls into
Boris Brezillonea099ad2019-12-03 15:15:05 +0100335 * &drm_bridge_chain_post_disable.
Sean Paul5ade0712019-06-11 12:08:17 -0400336 *
Laurent Pinchartfe9e5572019-08-22 02:55:02 +0300337 * The @atomic_post_disable callback is optional.
Sean Paul5ade0712019-06-11 12:08:17 -0400338 */
339 void (*atomic_post_disable)(struct drm_bridge *bridge,
340 struct drm_atomic_state *state);
Daniel Vetter199e4e92016-08-31 18:09:05 +0200341};
342
343/**
Linus Walleij36a776d2018-01-12 08:48:52 +0100344 * struct drm_bridge_timings - timing information for the bridge
345 */
346struct drm_bridge_timings {
347 /**
Stefan Agnerd23286f2018-09-04 22:21:08 -0700348 * @input_bus_flags:
Linus Walleij36a776d2018-01-12 08:48:52 +0100349 *
Stefan Agnerd23286f2018-09-04 22:21:08 -0700350 * Tells what additional settings for the pixel data on the bus
351 * this bridge requires (like pixel signal polarity). See also
352 * &drm_display_info->bus_flags.
Linus Walleij36a776d2018-01-12 08:48:52 +0100353 */
Stefan Agnerd23286f2018-09-04 22:21:08 -0700354 u32 input_bus_flags;
Linus Walleij36a776d2018-01-12 08:48:52 +0100355 /**
356 * @setup_time_ps:
357 *
358 * Defines the time in picoseconds the input data lines must be
359 * stable before the clock edge.
360 */
361 u32 setup_time_ps;
362 /**
363 * @hold_time_ps:
364 *
365 * Defines the time in picoseconds taken for the bridge to sample the
366 * input signal after the clock edge.
367 */
368 u32 hold_time_ps;
Laurent Pinchartb0a6b942019-03-04 23:05:34 +0200369 /**
370 * @dual_link:
371 *
372 * True if the bus operates in dual-link mode. The exact meaning is
373 * dependent on the bus type. For LVDS buses, this indicates that even-
374 * and odd-numbered pixels are received on separate links.
375 */
376 bool dual_link;
Linus Walleij36a776d2018-01-12 08:48:52 +0100377};
378
379/**
Daniel Vetter199e4e92016-08-31 18:09:05 +0200380 * struct drm_bridge - central DRM bridge control structure
Daniel Vetter199e4e92016-08-31 18:09:05 +0200381 */
382struct drm_bridge {
Eric Anholt6aa13402018-06-06 12:04:29 -0700383 /** @dev: DRM device this bridge belongs to */
Daniel Vetter199e4e92016-08-31 18:09:05 +0200384 struct drm_device *dev;
Eric Anholt6aa13402018-06-06 12:04:29 -0700385 /** @encoder: encoder to which this bridge is connected */
Daniel Vetter199e4e92016-08-31 18:09:05 +0200386 struct drm_encoder *encoder;
Eric Anholt6aa13402018-06-06 12:04:29 -0700387 /** @next: the next bridge in the encoder chain */
Daniel Vetter199e4e92016-08-31 18:09:05 +0200388 struct drm_bridge *next;
389#ifdef CONFIG_OF
Eric Anholt6aa13402018-06-06 12:04:29 -0700390 /** @of_node: device node pointer to the bridge */
Daniel Vetter199e4e92016-08-31 18:09:05 +0200391 struct device_node *of_node;
392#endif
Eric Anholt6aa13402018-06-06 12:04:29 -0700393 /** @list: to keep track of all added bridges */
Daniel Vetter199e4e92016-08-31 18:09:05 +0200394 struct list_head list;
Eric Anholt6aa13402018-06-06 12:04:29 -0700395 /**
396 * @timings:
397 *
398 * the timing specification for the bridge, if any (may be NULL)
399 */
Linus Walleij36a776d2018-01-12 08:48:52 +0100400 const struct drm_bridge_timings *timings;
Eric Anholt6aa13402018-06-06 12:04:29 -0700401 /** @funcs: control functions */
Daniel Vetter199e4e92016-08-31 18:09:05 +0200402 const struct drm_bridge_funcs *funcs;
Eric Anholt6aa13402018-06-06 12:04:29 -0700403 /** @driver_private: pointer to the bridge driver's internal context */
Daniel Vetter199e4e92016-08-31 18:09:05 +0200404 void *driver_private;
405};
406
Inki Dae992868842017-07-03 17:42:17 +0900407void drm_bridge_add(struct drm_bridge *bridge);
Daniel Vetter199e4e92016-08-31 18:09:05 +0200408void drm_bridge_remove(struct drm_bridge *bridge);
409struct drm_bridge *of_drm_find_bridge(struct device_node *np);
Laurent Pinchart3bb80f22016-11-28 17:59:08 +0200410int drm_bridge_attach(struct drm_encoder *encoder, struct drm_bridge *bridge,
411 struct drm_bridge *previous);
Daniel Vetter199e4e92016-08-31 18:09:05 +0200412
Boris Brezillonfadf8722019-12-03 15:15:06 +0100413/**
414 * drm_bridge_get_next_bridge() - Get the next bridge in the chain
415 * @bridge: bridge object
416 *
417 * RETURNS:
418 * the next bridge in the chain after @bridge, or NULL if @bridge is the last.
419 */
420static inline struct drm_bridge *
421drm_bridge_get_next_bridge(struct drm_bridge *bridge)
422{
423 return bridge->next;
424}
425
Boris Brezillon35a61fe2019-12-03 15:15:07 +0100426/**
427 * drm_bridge_chain_get_first_bridge() - Get the first bridge in the chain
428 * @encoder: encoder object
429 *
430 * RETURNS:
431 * the first bridge in the chain, or NULL if @encoder has no bridge attached
432 * to it.
433 */
434static inline struct drm_bridge *
435drm_bridge_chain_get_first_bridge(struct drm_encoder *encoder)
436{
437 return encoder->bridge;
438}
439
Boris Brezillonea099ad2019-12-03 15:15:05 +0100440bool drm_bridge_chain_mode_fixup(struct drm_bridge *bridge,
441 const struct drm_display_mode *mode,
442 struct drm_display_mode *adjusted_mode);
443enum drm_mode_status
444drm_bridge_chain_mode_valid(struct drm_bridge *bridge,
445 const struct drm_display_mode *mode);
446void drm_bridge_chain_disable(struct drm_bridge *bridge);
447void drm_bridge_chain_post_disable(struct drm_bridge *bridge);
448void drm_bridge_chain_mode_set(struct drm_bridge *bridge,
449 const struct drm_display_mode *mode,
450 const struct drm_display_mode *adjusted_mode);
451void drm_bridge_chain_pre_enable(struct drm_bridge *bridge);
452void drm_bridge_chain_enable(struct drm_bridge *bridge);
Daniel Vetter199e4e92016-08-31 18:09:05 +0200453
Boris Brezillonea099ad2019-12-03 15:15:05 +0100454void drm_atomic_bridge_chain_disable(struct drm_bridge *bridge,
455 struct drm_atomic_state *state);
456void drm_atomic_bridge_chain_post_disable(struct drm_bridge *bridge,
457 struct drm_atomic_state *state);
458void drm_atomic_bridge_chain_pre_enable(struct drm_bridge *bridge,
459 struct drm_atomic_state *state);
460void drm_atomic_bridge_chain_enable(struct drm_bridge *bridge,
Sean Paul5ade0712019-06-11 12:08:17 -0400461 struct drm_atomic_state *state);
Sean Paul5ade0712019-06-11 12:08:17 -0400462
Eric Anholt13dfc052017-06-02 13:25:14 -0700463#ifdef CONFIG_DRM_PANEL_BRIDGE
Laurent Pinchart89958b72019-09-04 16:28:04 +0300464struct drm_bridge *drm_panel_bridge_add(struct drm_panel *panel);
465struct drm_bridge *drm_panel_bridge_add_typed(struct drm_panel *panel,
466 u32 connector_type);
Eric Anholt13dfc052017-06-02 13:25:14 -0700467void drm_panel_bridge_remove(struct drm_bridge *bridge);
Eric Anholt67022222017-07-18 14:05:06 -0700468struct drm_bridge *devm_drm_panel_bridge_add(struct device *dev,
Laurent Pinchart89958b72019-09-04 16:28:04 +0300469 struct drm_panel *panel);
470struct drm_bridge *devm_drm_panel_bridge_add_typed(struct device *dev,
471 struct drm_panel *panel,
472 u32 connector_type);
Eric Anholt13dfc052017-06-02 13:25:14 -0700473#endif
474
Daniel Vetter199e4e92016-08-31 18:09:05 +0200475#endif