path: root/include
diff options
authorDave Airlie <airlied@redhat.com>2017-10-17 10:10:17 +1000
committerDave Airlie <airlied@redhat.com>2017-10-17 10:10:17 +1000
commit6c94804fde4415f3938778155d8e665e6870a46d (patch)
treedf9dbb4be6005171b457aee49706e409ae27e765 /include
parent787e1b74b77d4aa910f40dd5f08edb5da27200bd (diff)
parent2e20c9ddae0b3770abca4b9b1a5243d6841bdd84 (diff)
Merge tag 'drm-misc-next-2017-10-16' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
Quick 4.15 misc pull for the build fix: Cross-subsystem Changes: - piles an piles of misc/trivial patches all over, some more from outreachy applicants Core Changes: - build fix for the bridge/of cleanup (Maarten) - fix vblank count in arm_vblank_event (Ville) - some kerneldoc typo fixes from Thierry Driver Changes: - vc4: Fix T-format tiling scanout, cleanup clock divider w/a (Anholt) - sun4i: small cleanups and improved code comments all over (Chen-Yu Tsai) * tag 'drm-misc-next-2017-10-16' of git://anongit.freedesktop.org/drm/drm-misc: (21 commits) drm/via: use ARRAY_SIZE drm/gma500: use ARRAY_SIZE drm/sun4i: hdmi: Move PAD_CTRL1 setting to mode_set function drm/sun4i: hdmi: Document PAD_CTRL1 output invert bits drm/sun4i: backend: Add comment explaining why registers are cleared drm/sun4i: backend: Use drm_fb_cma_get_gem_addr() to get display memory drm/sun4i: backend: Create regmap after access is possible drm/sun4i: don't add components that are already in the queue drm/vc4: Fix pitch setup for T-format scanout. drm/vc4: Move the DSI clock divider workaround closer to the clock call. drm: Replace kzalloc with kcalloc drm/tinydrm: Remove explicit .best_encoder assignment drm/tinydrm: Replace dev_error with DRM_DEV_ERROR drm/drm_of: Move drm_of_panel_bridge_remove_function into header. drm/atomic-helper: Fix reference to drm_crtc_send_vblank_event() drm/atomic-helper: Fix typo drm: Add missing __user annotation to drm_syncobj_array_find() drm/rockchip: add PINCTRL dependency for LVDS drm/kirin: Checking for IS_ERR() instead of NULL driver:gpu: return -ENOMEM on allocation failure. ...
Diffstat (limited to 'include')
1 files changed, 26 insertions, 3 deletions
diff --git a/include/drm/drm_of.h b/include/drm/drm_of.h
index 390966e4a308..d20ec4e0431d 100644
--- a/include/drm/drm_of.h
+++ b/include/drm/drm_of.h
@@ -2,6 +2,9 @@
#define __DRM_OF_H__
#include <linux/of_graph.h>
+#include <drm/drm_bridge.h>
struct component_master_ops;
struct component_match;
@@ -29,8 +32,6 @@ int drm_of_find_panel_or_bridge(const struct device_node *np,
int port, int endpoint,
struct drm_panel **panel,
struct drm_bridge **bridge);
-int drm_of_panel_bridge_remove(const struct device_node *np,
- int port, int endpoint);
static inline uint32_t drm_of_find_possible_crtcs(struct drm_device *dev,
struct device_node *port)
@@ -67,13 +68,35 @@ static inline int drm_of_find_panel_or_bridge(const struct device_node *np,
return -EINVAL;
+ * drm_of_panel_bridge_remove - remove panel bridge
+ * @np: device tree node containing panel bridge output ports
+ *
+ * Remove the panel bridge of a given DT node's port and endpoint number
+ *
+ * Returns zero if successful, or one of the standard error codes if it fails.
+ */
static inline int drm_of_panel_bridge_remove(const struct device_node *np,
int port, int endpoint)
+ struct drm_bridge *bridge;
+ struct device_node *remote;
+ remote = of_graph_get_remote_node(np, port, endpoint);
+ if (!remote)
+ return -ENODEV;
+ bridge = of_drm_find_bridge(remote);
+ drm_panel_bridge_remove(bridge);
+ return 0;
return -EINVAL;
static inline int drm_of_encoder_active_endpoint_id(struct device_node *node,
struct drm_encoder *encoder)

Privacy Policy