diff options
author | Dave Airlie <airlied@redhat.com> | 2016-03-02 02:52:51 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2016-03-02 02:52:51 -0500 |
commit | 42e85606784376e4f2d5355694b0b241dc8c29ae (patch) | |
tree | abe3de7d56753210a3aaf07164c44ec631d3e097 /include/drm | |
parent | 4b59d591bfc5019e39caa6af4d9581023a590a80 (diff) | |
parent | 411b0336cf9fc988ff11de3f1e66587fe88fb980 (diff) |
Merge tag 'imx-drm-next-20160301' of git://git.pengutronix.de/git/pza/linux into drm-next
imx-drm vblank IRQ control, fence support, and of endpoint helpers
- Add and make use of drm_of_active_endpoint helpers
- Silence a noisy dev_info into a dev_dbg
- Stop touching primary fb on pageflips
- Track flip state explicitly
- Keep GEM buffer objects referenced while scanout is active
- Implement fence sync by deferring flips to a workqueue for
dma-bufs with pending fences
- Actually disable vblank IRQs while they are not needed
* tag 'imx-drm-next-20160301' of git://git.pengutronix.de/git/pza/linux:
drm/imx: only enable vblank IRQs when needed
drm/imx: implement fence sync
drm/imx: keep GEM object referenced as long as scanout is active
drm/imx: track flip state explicitly
drm/imx: don't touch primary fb on pageflip
drm/imx: ipuv3 plane: Replace dev_info with dev_dbg if a plane's CRTC changes
gpu: ipu-v3: ipu-dc: Simplify display controller microcode setup
drm/rockchip: remove rockchip_drm_encoder_get_mux_id
drm/imx: remove imx_drm_encoder_get_mux_id
drm: add drm_of_encoder_active_endpoint helpers
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/drm_of.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/include/drm/drm_of.h b/include/drm/drm_of.h index 8544665ee4f4..3fd87b386ed7 100644 --- a/include/drm/drm_of.h +++ b/include/drm/drm_of.h | |||
@@ -1,9 +1,12 @@ | |||
1 | #ifndef __DRM_OF_H__ | 1 | #ifndef __DRM_OF_H__ |
2 | #define __DRM_OF_H__ | 2 | #define __DRM_OF_H__ |
3 | 3 | ||
4 | #include <linux/of_graph.h> | ||
5 | |||
4 | struct component_master_ops; | 6 | struct component_master_ops; |
5 | struct device; | 7 | struct device; |
6 | struct drm_device; | 8 | struct drm_device; |
9 | struct drm_encoder; | ||
7 | struct device_node; | 10 | struct device_node; |
8 | 11 | ||
9 | #ifdef CONFIG_OF | 12 | #ifdef CONFIG_OF |
@@ -12,6 +15,9 @@ extern uint32_t drm_of_find_possible_crtcs(struct drm_device *dev, | |||
12 | extern int drm_of_component_probe(struct device *dev, | 15 | extern int drm_of_component_probe(struct device *dev, |
13 | int (*compare_of)(struct device *, void *), | 16 | int (*compare_of)(struct device *, void *), |
14 | const struct component_master_ops *m_ops); | 17 | const struct component_master_ops *m_ops); |
18 | extern int drm_of_encoder_active_endpoint(struct device_node *node, | ||
19 | struct drm_encoder *encoder, | ||
20 | struct of_endpoint *endpoint); | ||
15 | #else | 21 | #else |
16 | static inline uint32_t drm_of_find_possible_crtcs(struct drm_device *dev, | 22 | static inline uint32_t drm_of_find_possible_crtcs(struct drm_device *dev, |
17 | struct device_node *port) | 23 | struct device_node *port) |
@@ -26,6 +32,33 @@ drm_of_component_probe(struct device *dev, | |||
26 | { | 32 | { |
27 | return -EINVAL; | 33 | return -EINVAL; |
28 | } | 34 | } |
35 | |||
36 | static inline int drm_of_encoder_active_endpoint(struct device_node *node, | ||
37 | struct drm_encoder *encoder, | ||
38 | struct of_endpoint *endpoint) | ||
39 | { | ||
40 | return -EINVAL; | ||
41 | } | ||
29 | #endif | 42 | #endif |
30 | 43 | ||
44 | static inline int drm_of_encoder_active_endpoint_id(struct device_node *node, | ||
45 | struct drm_encoder *encoder) | ||
46 | { | ||
47 | struct of_endpoint endpoint; | ||
48 | int ret = drm_of_encoder_active_endpoint(node, encoder, | ||
49 | &endpoint); | ||
50 | |||
51 | return ret ?: endpoint.id; | ||
52 | } | ||
53 | |||
54 | static inline int drm_of_encoder_active_port_id(struct device_node *node, | ||
55 | struct drm_encoder *encoder) | ||
56 | { | ||
57 | struct of_endpoint endpoint; | ||
58 | int ret = drm_of_encoder_active_endpoint(node, encoder, | ||
59 | &endpoint); | ||
60 | |||
61 | return ret ?: endpoint.port; | ||
62 | } | ||
63 | |||
31 | #endif /* __DRM_OF_H__ */ | 64 | #endif /* __DRM_OF_H__ */ |