4 #include <linux/of_graph.h>
6 struct component_master_ops;
7 struct component_match;
14 extern uint32_t drm_of_find_possible_crtcs(struct drm_device *dev,
15 struct device_node *port);
16 extern void drm_of_component_match_add(struct device *master,
17 struct component_match **matchptr,
18 int (*compare)(struct device *, void *),
19 struct device_node *node);
20 extern int drm_of_component_probe(struct device *dev,
21 int (*compare_of)(struct device *, void *),
22 const struct component_master_ops *m_ops);
23 extern int drm_of_encoder_active_endpoint(struct device_node *node,
24 struct drm_encoder *encoder,
25 struct of_endpoint *endpoint);
27 static inline uint32_t drm_of_find_possible_crtcs(struct drm_device *dev,
28 struct device_node *port)
34 drm_of_component_match_add(struct device *master,
35 struct component_match **matchptr,
36 int (*compare)(struct device *, void *),
37 struct device_node *node)
42 drm_of_component_probe(struct device *dev,
43 int (*compare_of)(struct device *, void *),
44 const struct component_master_ops *m_ops)
49 static inline int drm_of_encoder_active_endpoint(struct device_node *node,
50 struct drm_encoder *encoder,
51 struct of_endpoint *endpoint)
57 static inline int drm_of_encoder_active_endpoint_id(struct device_node *node,
58 struct drm_encoder *encoder)
60 struct of_endpoint endpoint;
61 int ret = drm_of_encoder_active_endpoint(node, encoder,
64 return ret ?: endpoint.id;
67 static inline int drm_of_encoder_active_port_id(struct device_node *node,
68 struct drm_encoder *encoder)
70 struct of_endpoint endpoint;
71 int ret = drm_of_encoder_active_endpoint(node, encoder,
74 return ret ?: endpoint.port;
77 #endif /* __DRM_OF_H__ */