Commit 812a65ba authored by Enric Balletbo i Serra's avatar Enric Balletbo i Serra Committed by Sam Ravnborg

drm/bridge: ps8640: Return an error for incorrect attach flags

Bridge drivers that implement the new model only shall return an error
from their attach() handler when the DRM_BRIDGE_ATTACH_NO_CONNECTOR flag
is not set. So make sure we return an error because only the new
drm_bridge model is supported.
Reviewed-by: default avatarSam Ravnborg <sam@ravnborg.org>
Signed-off-by: default avatarEnric Balletbo i Serra <enric.balletbo@collabora.com>
Reviewed-by: default avatarBilal Wasim <bwasim.lkml@gmail.com>
Tested-by: default avatarBilal Wasim <bwasim.lkml@gmail.com>
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200826081526.674866-4-enric.balletbo@collabora.com
parent d82c12ab
...@@ -200,6 +200,10 @@ static int ps8640_bridge_attach(struct drm_bridge *bridge, ...@@ -200,6 +200,10 @@ static int ps8640_bridge_attach(struct drm_bridge *bridge,
.channel = 0, .channel = 0,
.node = NULL, .node = NULL,
}; };
if (!(flags & DRM_BRIDGE_ATTACH_NO_CONNECTOR))
return -EINVAL;
/* port@0 is ps8640 dsi input port */ /* port@0 is ps8640 dsi input port */
in_ep = of_graph_get_endpoint_by_regs(dev->of_node, 0, -1); in_ep = of_graph_get_endpoint_by_regs(dev->of_node, 0, -1);
if (!in_ep) if (!in_ep)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment