Commit 532a2cba authored by Tomi Valkeinen's avatar Tomi Valkeinen

drm/omap: VENC: remove uses of omap_overlay_manager

We are removing the uses of 'struct omap_overlay_manager'. This patch
changes VENC driver to use 'omap_channel' instead.
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent c64b79c8
...@@ -443,7 +443,7 @@ static const struct venc_config *venc_timings_to_config( ...@@ -443,7 +443,7 @@ static const struct venc_config *venc_timings_to_config(
static int venc_power_on(struct omap_dss_device *dssdev) static int venc_power_on(struct omap_dss_device *dssdev)
{ {
struct omap_overlay_manager *mgr = venc.output.manager; enum omap_channel channel = dssdev->dispc_channel;
u32 l; u32 l;
int r; int r;
...@@ -469,13 +469,13 @@ static int venc_power_on(struct omap_dss_device *dssdev) ...@@ -469,13 +469,13 @@ static int venc_power_on(struct omap_dss_device *dssdev)
venc_write_reg(VENC_OUTPUT_CONTROL, l); venc_write_reg(VENC_OUTPUT_CONTROL, l);
dss_mgr_set_timings(mgr->id, &venc.timings); dss_mgr_set_timings(channel, &venc.timings);
r = regulator_enable(venc.vdda_dac_reg); r = regulator_enable(venc.vdda_dac_reg);
if (r) if (r)
goto err1; goto err1;
r = dss_mgr_enable(mgr->id); r = dss_mgr_enable(channel);
if (r) if (r)
goto err2; goto err2;
...@@ -494,12 +494,12 @@ static int venc_power_on(struct omap_dss_device *dssdev) ...@@ -494,12 +494,12 @@ static int venc_power_on(struct omap_dss_device *dssdev)
static void venc_power_off(struct omap_dss_device *dssdev) static void venc_power_off(struct omap_dss_device *dssdev)
{ {
struct omap_overlay_manager *mgr = venc.output.manager; enum omap_channel channel = dssdev->dispc_channel;
venc_write_reg(VENC_OUTPUT_CONTROL, 0); venc_write_reg(VENC_OUTPUT_CONTROL, 0);
dss_set_dac_pwrdn_bgz(0); dss_set_dac_pwrdn_bgz(0);
dss_mgr_disable(mgr->id); dss_mgr_disable(channel);
regulator_disable(venc.vdda_dac_reg); regulator_disable(venc.vdda_dac_reg);
...@@ -742,18 +742,14 @@ static int venc_get_clocks(struct platform_device *pdev) ...@@ -742,18 +742,14 @@ static int venc_get_clocks(struct platform_device *pdev)
static int venc_connect(struct omap_dss_device *dssdev, static int venc_connect(struct omap_dss_device *dssdev,
struct omap_dss_device *dst) struct omap_dss_device *dst)
{ {
struct omap_overlay_manager *mgr; enum omap_channel channel = dssdev->dispc_channel;
int r; int r;
r = venc_init_regulator(); r = venc_init_regulator();
if (r) if (r)
return r; return r;
mgr = omap_dss_get_overlay_manager(dssdev->dispc_channel); r = dss_mgr_connect(channel, dssdev);
if (!mgr)
return -ENODEV;
r = dss_mgr_connect(mgr->id, dssdev);
if (r) if (r)
return r; return r;
...@@ -761,7 +757,7 @@ static int venc_connect(struct omap_dss_device *dssdev, ...@@ -761,7 +757,7 @@ static int venc_connect(struct omap_dss_device *dssdev,
if (r) { if (r) {
DSSERR("failed to connect output to new device: %s\n", DSSERR("failed to connect output to new device: %s\n",
dst->name); dst->name);
dss_mgr_disconnect(mgr->id, dssdev); dss_mgr_disconnect(channel, dssdev);
return r; return r;
} }
...@@ -771,6 +767,8 @@ static int venc_connect(struct omap_dss_device *dssdev, ...@@ -771,6 +767,8 @@ static int venc_connect(struct omap_dss_device *dssdev,
static void venc_disconnect(struct omap_dss_device *dssdev, static void venc_disconnect(struct omap_dss_device *dssdev,
struct omap_dss_device *dst) struct omap_dss_device *dst)
{ {
enum omap_channel channel = dssdev->dispc_channel;
WARN_ON(dst != dssdev->dst); WARN_ON(dst != dssdev->dst);
if (dst != dssdev->dst) if (dst != dssdev->dst)
...@@ -778,7 +776,7 @@ static void venc_disconnect(struct omap_dss_device *dssdev, ...@@ -778,7 +776,7 @@ static void venc_disconnect(struct omap_dss_device *dssdev,
omapdss_output_unset_device(dssdev); omapdss_output_unset_device(dssdev);
dss_mgr_disconnect(dssdev->manager->id, dssdev); dss_mgr_disconnect(channel, dssdev);
} }
static const struct omapdss_atv_ops venc_ops = { static const struct omapdss_atv_ops venc_ops = {
......
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