aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/pl111/pl111_drv.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2018-01-12 08:48:54 +0100
committerArchit Taneja <architt@codeaurora.org>2018-01-12 14:14:50 +0530
commit49f81d80ab8496c400dee63b31530723a390911f (patch)
tree74db4f0b09cd97506ba810c58c6833d8b62fa84a /drivers/gpu/drm/pl111/pl111_drv.c
parentdrm/bridge: Add timing support to dumb VGA DAC (diff)
downloadlinux-dev-49f81d80ab8496c400dee63b31530723a390911f.tar.xz
linux-dev-49f81d80ab8496c400dee63b31530723a390911f.zip
drm/pl111: Support handling bridge timings
If the bridge has a too strict setup time for the incoming signals, we may not be fast enough and then we need to compensate by outputting the signal on the inverse clock edge so it is for sure stable when the bridge samples it. Since bridges in difference to panels does not expose their connectors, make the connector optional in the display setup code. Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Archit Taneja <architt@codeaurora.org> Link: https://patchwork.freedesktop.org/patch/msgid/20180112074854.9560-4-linus.walleij@linaro.org
Diffstat (limited to 'drivers/gpu/drm/pl111/pl111_drv.c')
-rw-r--r--drivers/gpu/drm/pl111/pl111_drv.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/gpu/drm/pl111/pl111_drv.c b/drivers/gpu/drm/pl111/pl111_drv.c
index acb738c69873..19e1725c3ef6 100644
--- a/drivers/gpu/drm/pl111/pl111_drv.c
+++ b/drivers/gpu/drm/pl111/pl111_drv.c
@@ -108,11 +108,17 @@ static int pl111_modeset_init(struct drm_device *dev)
ret = PTR_ERR(bridge);
goto out_config;
}
- /*
- * TODO: when we are using a different bridge than a panel
- * (such as a dumb VGA connector) we need to devise a different
- * method to get the connector out of the bridge.
- */
+ } else if (bridge) {
+ dev_info(dev->dev, "Using non-panel bridge\n");
+ } else {
+ dev_err(dev->dev, "No bridge, exiting\n");
+ return -ENODEV;
+ }
+
+ priv->bridge = bridge;
+ if (panel) {
+ priv->panel = panel;
+ priv->connector = panel->connector;
}
ret = pl111_display_init(dev);
@@ -126,10 +132,6 @@ static int pl111_modeset_init(struct drm_device *dev)
if (ret)
return ret;
- priv->bridge = bridge;
- priv->panel = panel;
- priv->connector = panel->connector;
-
ret = drm_vblank_init(dev, 1);
if (ret != 0) {
dev_err(dev->dev, "Failed to init vblank\n");