Commit 86e95f92 authored by Tomi Valkeinen's avatar Tomi Valkeinen

drm/omap: HDMI5: remove uses of omap_overlay_manager

We are removing the uses of 'struct omap_overlay_manager'. This patch
changes HDMI5 driver to use 'omap_channel' instead.
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent a070ba6c
...@@ -182,7 +182,7 @@ static int hdmi_power_on_full(struct omap_dss_device *dssdev) ...@@ -182,7 +182,7 @@ static int hdmi_power_on_full(struct omap_dss_device *dssdev)
{ {
int r; int r;
struct omap_video_timings *p; struct omap_video_timings *p;
struct omap_overlay_manager *mgr = hdmi.output.manager; enum omap_channel channel = dssdev->dispc_channel;
struct dss_pll_clock_info hdmi_cinfo = { 0 }; struct dss_pll_clock_info hdmi_cinfo = { 0 };
unsigned pc; unsigned pc;
...@@ -234,9 +234,9 @@ static int hdmi_power_on_full(struct omap_dss_device *dssdev) ...@@ -234,9 +234,9 @@ static int hdmi_power_on_full(struct omap_dss_device *dssdev)
dispc_enable_gamma_table(0); dispc_enable_gamma_table(0);
/* tv size */ /* tv size */
dss_mgr_set_timings(mgr->id, p); dss_mgr_set_timings(channel, p);
r = dss_mgr_enable(mgr->id); r = dss_mgr_enable(channel);
if (r) if (r)
goto err_mgr_enable; goto err_mgr_enable;
...@@ -250,7 +250,7 @@ static int hdmi_power_on_full(struct omap_dss_device *dssdev) ...@@ -250,7 +250,7 @@ static int hdmi_power_on_full(struct omap_dss_device *dssdev)
return 0; return 0;
err_vid_enable: err_vid_enable:
dss_mgr_disable(mgr->id); dss_mgr_disable(channel);
err_mgr_enable: err_mgr_enable:
hdmi_wp_set_phy_pwr(&hdmi.wp, HDMI_PHYPWRCMD_OFF); hdmi_wp_set_phy_pwr(&hdmi.wp, HDMI_PHYPWRCMD_OFF);
err_phy_pwr: err_phy_pwr:
...@@ -264,13 +264,13 @@ static int hdmi_power_on_full(struct omap_dss_device *dssdev) ...@@ -264,13 +264,13 @@ static int hdmi_power_on_full(struct omap_dss_device *dssdev)
static void hdmi_power_off_full(struct omap_dss_device *dssdev) static void hdmi_power_off_full(struct omap_dss_device *dssdev)
{ {
struct omap_overlay_manager *mgr = hdmi.output.manager; enum omap_channel channel = dssdev->dispc_channel;
hdmi_wp_clear_irqenable(&hdmi.wp, 0xffffffff); hdmi_wp_clear_irqenable(&hdmi.wp, 0xffffffff);
hdmi_wp_video_stop(&hdmi.wp); hdmi_wp_video_stop(&hdmi.wp);
dss_mgr_disable(mgr->id); dss_mgr_disable(channel);
hdmi_wp_set_phy_pwr(&hdmi.wp, HDMI_PHYPWRCMD_OFF); hdmi_wp_set_phy_pwr(&hdmi.wp, HDMI_PHYPWRCMD_OFF);
...@@ -282,9 +282,7 @@ static void hdmi_power_off_full(struct omap_dss_device *dssdev) ...@@ -282,9 +282,7 @@ static void hdmi_power_off_full(struct omap_dss_device *dssdev)
static int hdmi_display_check_timing(struct omap_dss_device *dssdev, static int hdmi_display_check_timing(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct omap_video_timings *timings)
{ {
struct omap_dss_device *out = &hdmi.output; if (!dispc_mgr_timings_ok(dssdev->dispc_channel, timings))
if (!dispc_mgr_timings_ok(out->dispc_channel, timings))
return -EINVAL; return -EINVAL;
return 0; return 0;
...@@ -464,18 +462,14 @@ static void hdmi_core_disable(struct omap_dss_device *dssdev) ...@@ -464,18 +462,14 @@ static void hdmi_core_disable(struct omap_dss_device *dssdev)
static int hdmi_connect(struct omap_dss_device *dssdev, static int hdmi_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 = hdmi_init_regulator(); r = hdmi_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;
...@@ -483,7 +477,7 @@ static int hdmi_connect(struct omap_dss_device *dssdev, ...@@ -483,7 +477,7 @@ static int hdmi_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;
} }
...@@ -493,6 +487,8 @@ static int hdmi_connect(struct omap_dss_device *dssdev, ...@@ -493,6 +487,8 @@ static int hdmi_connect(struct omap_dss_device *dssdev,
static void hdmi_disconnect(struct omap_dss_device *dssdev, static void hdmi_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)
...@@ -500,7 +496,7 @@ static void hdmi_disconnect(struct omap_dss_device *dssdev, ...@@ -500,7 +496,7 @@ static void hdmi_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 int hdmi_read_edid(struct omap_dss_device *dssdev, static int hdmi_read_edid(struct omap_dss_device *dssdev,
......
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