drm/tve200: Replace custom connector with panel bridge

This replaces the custom connector in the TVE200 with the
panel bridge helper. As long as we're just using panels
and no other bridges, this works just fine.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20170902200711.29298-1-linus.walleij@linaro.org
This commit is contained in:
Linus Walleij
2017-09-02 22:07:11 +02:00
parent b52f09c494
commit 14b469f9c0
6 changed files with 60 additions and 164 deletions

View File

@@ -127,7 +127,7 @@ static void tve200_display_enable(struct drm_simple_display_pipe *pipe,
struct tve200_drm_dev_private *priv = drm->dev_private;
const struct drm_display_mode *mode = &cstate->mode;
struct drm_framebuffer *fb = plane->state->fb;
struct drm_connector *connector = &priv->connector.connector;
struct drm_connector *connector = priv->connector;
u32 format = fb->format->format;
u32 ctrl1 = 0;
@@ -215,13 +215,9 @@ static void tve200_display_enable(struct drm_simple_display_pipe *pipe,
ctrl1 |= TVE200_TVEEN;
drm_panel_prepare(priv->connector.panel);
/* Turn it on */
writel(ctrl1, priv->regs + TVE200_CTRL);
drm_panel_enable(priv->connector.panel);
drm_crtc_vblank_on(crtc);
}
@@ -233,13 +229,9 @@ void tve200_display_disable(struct drm_simple_display_pipe *pipe)
drm_crtc_vblank_off(crtc);
drm_panel_disable(priv->connector.panel);
/* Disable and Power Down */
writel(0, priv->regs + TVE200_CTRL);
drm_panel_unprepare(priv->connector.panel);
clk_disable_unprepare(priv->clk);
}
@@ -337,9 +329,12 @@ int tve200_display_init(struct drm_device *drm)
&tve200_display_funcs,
formats, ARRAY_SIZE(formats),
NULL,
&priv->connector.connector);
priv->connector);
if (ret)
return ret;
/* We need the encoder to attach the bridge */
priv->encoder = &priv->pipe.encoder;
return 0;
}