mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
drm: Introduce generic probe function for component based masters.
A lot of component based DRM drivers use a variant of the same code as the probe function. They bind the crtc ports in the first iteration and then scan through the child nodes and bind the encoders attached to the remote endpoints. Factor the common code into a separate function called drm_of_component_probe() in order to increase code reuse. Cc: David Airlie <[email protected]> Signed-off-by: Liviu Dudau <[email protected]> Acked-by: Russell King <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Acked-by: Eric Anholt <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
This commit is contained in:
parent
9afd808cf3
commit
df785aa87f
2 changed files with 101 additions and 0 deletions
|
|
@ -1,18 +1,31 @@
|
|||
#ifndef __DRM_OF_H__
|
||||
#define __DRM_OF_H__
|
||||
|
||||
struct component_master_ops;
|
||||
struct device;
|
||||
struct drm_device;
|
||||
struct device_node;
|
||||
|
||||
#ifdef CONFIG_OF
|
||||
extern uint32_t drm_of_find_possible_crtcs(struct drm_device *dev,
|
||||
struct device_node *port);
|
||||
extern int drm_of_component_probe(struct device *dev,
|
||||
int (*compare_of)(struct device *, void *),
|
||||
const struct component_master_ops *m_ops);
|
||||
#else
|
||||
static inline uint32_t drm_of_find_possible_crtcs(struct drm_device *dev,
|
||||
struct device_node *port)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int
|
||||
drm_of_component_probe(struct device *dev,
|
||||
int (*compare_of)(struct device *, void *),
|
||||
const struct component_master_ops *m_ops)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __DRM_OF_H__ */
|
||||
|
|
|
|||
Loading…
Reference in a new issue