aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm/drm_bridge.h
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2018-01-12 02:48:52 -0500
committerArchit Taneja <architt@codeaurora.org>2018-01-12 03:44:03 -0500
commit36a776df6e088a0cec2303aacd2fe762830b2457 (patch)
treef34fd57d1efae255e83cc30727a9c444ac9d67b8 /include/drm/drm_bridge.h
parent85d0875a4f0e59887307e7a435999132836a8717 (diff)
drm/bridge: Provide a way to embed timing info in bridges
After some discussion and failed patch sets trying to convey the right timing information between the display engine and a bridge using the connector, I try instead to use an optional timing information container in the bridge itself, so that display engines can retrieve it from any bridge and use it to determine how to drive outputs. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Archit Taneja <architt@codeaurora.org> Link: https://patchwork.freedesktop.org/patch/msgid/20180112074854.9560-2-linus.walleij@linaro.org
Diffstat (limited to 'include/drm/drm_bridge.h')
-rw-r--r--include/drm/drm_bridge.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h
index 682d01ba920c..bb7b97dfb93e 100644
--- a/include/drm/drm_bridge.h
+++ b/include/drm/drm_bridge.h
@@ -29,6 +29,7 @@
29#include <drm/drm_modes.h> 29#include <drm/drm_modes.h>
30 30
31struct drm_bridge; 31struct drm_bridge;
32struct drm_bridge_timings;
32struct drm_panel; 33struct drm_panel;
33 34
34/** 35/**
@@ -223,12 +224,43 @@ struct drm_bridge_funcs {
223}; 224};
224 225
225/** 226/**
227 * struct drm_bridge_timings - timing information for the bridge
228 */
229struct drm_bridge_timings {
230 /**
231 * @sampling_edge:
232 *
233 * Tells whether the bridge samples the digital input signal
234 * from the display engine on the positive or negative edge of the
235 * clock, this should reuse the DRM_BUS_FLAG_PIXDATA_[POS|NEG]EDGE
236 * bitwise flags from the DRM connector (bit 2 and 3 valid).
237 */
238 u32 sampling_edge;
239 /**
240 * @setup_time_ps:
241 *
242 * Defines the time in picoseconds the input data lines must be
243 * stable before the clock edge.
244 */
245 u32 setup_time_ps;
246 /**
247 * @hold_time_ps:
248 *
249 * Defines the time in picoseconds taken for the bridge to sample the
250 * input signal after the clock edge.
251 */
252 u32 hold_time_ps;
253};
254
255/**
226 * struct drm_bridge - central DRM bridge control structure 256 * struct drm_bridge - central DRM bridge control structure
227 * @dev: DRM device this bridge belongs to 257 * @dev: DRM device this bridge belongs to
228 * @encoder: encoder to which this bridge is connected 258 * @encoder: encoder to which this bridge is connected
229 * @next: the next bridge in the encoder chain 259 * @next: the next bridge in the encoder chain
230 * @of_node: device node pointer to the bridge 260 * @of_node: device node pointer to the bridge
231 * @list: to keep track of all added bridges 261 * @list: to keep track of all added bridges
262 * @timings: the timing specification for the bridge, if any (may
263 * be NULL)
232 * @funcs: control functions 264 * @funcs: control functions
233 * @driver_private: pointer to the bridge driver's internal context 265 * @driver_private: pointer to the bridge driver's internal context
234 */ 266 */
@@ -240,6 +272,7 @@ struct drm_bridge {
240 struct device_node *of_node; 272 struct device_node *of_node;
241#endif 273#endif
242 struct list_head list; 274 struct list_head list;
275 const struct drm_bridge_timings *timings;
243 276
244 const struct drm_bridge_funcs *funcs; 277 const struct drm_bridge_funcs *funcs;
245 void *driver_private; 278 void *driver_private;