summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorEnric Balletbo i Serra <enric.balletbo@collabora.com>2020-08-26 10:15:24 +0200
committerSam Ravnborg <sam@ravnborg.org>2020-08-26 19:12:59 +0200
commit812a65ba9411c5b3a68e92da061ec91a328774d2 (patch)
tree020fe1d9f19a0b42e4b91c125fa258522e9e4bf8 /drivers
parentd82c12ab16b8477a6a79452f820f395c3899efa4 (diff)
downloadlinux-812a65ba9411c5b3a68e92da061ec91a328774d2.tar.bz2
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: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Reviewed-by: Bilal Wasim <bwasim.lkml@gmail.com> Tested-by: Bilal Wasim <bwasim.lkml@gmail.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20200826081526.674866-4-enric.balletbo@collabora.com
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/bridge/parade-ps8640.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/bridge/parade-ps8640.c b/drivers/gpu/drm/bridge/parade-ps8640.c
index 13755d278db6..ce3e8b2da8c9 100644
--- a/drivers/gpu/drm/bridge/parade-ps8640.c
+++ b/drivers/gpu/drm/bridge/parade-ps8640.c
@@ -200,6 +200,10 @@ static int ps8640_bridge_attach(struct drm_bridge *bridge,
.channel = 0,
.node = NULL,
};
+
+ if (!(flags & DRM_BRIDGE_ATTACH_NO_CONNECTOR))
+ return -EINVAL;
+
/* port@0 is ps8640 dsi input port */
in_ep = of_graph_get_endpoint_by_regs(dev->of_node, 0, -1);
if (!in_ep)