Commit c64b79c8 authored by Tomi Valkeinen's avatar Tomi Valkeinen

drm/omap: SDI: remove uses of omap_overlay_manager

We are removing the uses of 'struct omap_overlay_manager'. This patch
changes SDI driver to use 'omap_channel' instead.
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent 46e1ef3b
...@@ -114,7 +114,7 @@ static int sdi_calc_clock_div(unsigned long pclk, ...@@ -114,7 +114,7 @@ static int sdi_calc_clock_div(unsigned long pclk,
static void sdi_config_lcd_manager(struct omap_dss_device *dssdev) static void sdi_config_lcd_manager(struct omap_dss_device *dssdev)
{ {
struct omap_overlay_manager *mgr = sdi.output.manager; enum omap_channel channel = dssdev->dispc_channel;
sdi.mgr_config.io_pad_mode = DSS_IO_PAD_MODE_BYPASS; sdi.mgr_config.io_pad_mode = DSS_IO_PAD_MODE_BYPASS;
...@@ -124,12 +124,13 @@ static void sdi_config_lcd_manager(struct omap_dss_device *dssdev) ...@@ -124,12 +124,13 @@ static void sdi_config_lcd_manager(struct omap_dss_device *dssdev)
sdi.mgr_config.video_port_width = 24; sdi.mgr_config.video_port_width = 24;
sdi.mgr_config.lcden_sig_polarity = 1; sdi.mgr_config.lcden_sig_polarity = 1;
dss_mgr_set_lcd_config(mgr->id, &sdi.mgr_config); dss_mgr_set_lcd_config(channel, &sdi.mgr_config);
} }
static int sdi_display_enable(struct omap_dss_device *dssdev) static int sdi_display_enable(struct omap_dss_device *dssdev)
{ {
struct omap_dss_device *out = &sdi.output; struct omap_dss_device *out = &sdi.output;
enum omap_channel channel = dssdev->dispc_channel;
struct omap_video_timings *t = &sdi.timings; struct omap_video_timings *t = &sdi.timings;
unsigned long fck; unsigned long fck;
struct dispc_clock_info dispc_cinfo; struct dispc_clock_info dispc_cinfo;
...@@ -169,7 +170,7 @@ static int sdi_display_enable(struct omap_dss_device *dssdev) ...@@ -169,7 +170,7 @@ static int sdi_display_enable(struct omap_dss_device *dssdev)
} }
dss_mgr_set_timings(out->manager->id, t); dss_mgr_set_timings(channel, t);
r = dss_set_fck_rate(fck); r = dss_set_fck_rate(fck);
if (r) if (r)
...@@ -188,7 +189,7 @@ static int sdi_display_enable(struct omap_dss_device *dssdev) ...@@ -188,7 +189,7 @@ static int sdi_display_enable(struct omap_dss_device *dssdev)
* need to care about the shadow register mechanism for pck-free. The * need to care about the shadow register mechanism for pck-free. The
* exact reason for this is unknown. * exact reason for this is unknown.
*/ */
dispc_mgr_set_clock_div(out->manager->id, &sdi.mgr_config.clock_info); dispc_mgr_set_clock_div(channel, &sdi.mgr_config.clock_info);
dss_sdi_init(sdi.datapairs); dss_sdi_init(sdi.datapairs);
r = dss_sdi_enable(); r = dss_sdi_enable();
...@@ -196,7 +197,7 @@ static int sdi_display_enable(struct omap_dss_device *dssdev) ...@@ -196,7 +197,7 @@ static int sdi_display_enable(struct omap_dss_device *dssdev)
goto err_sdi_enable; goto err_sdi_enable;
mdelay(2); mdelay(2);
r = dss_mgr_enable(out->manager->id); r = dss_mgr_enable(channel);
if (r) if (r)
goto err_mgr_enable; goto err_mgr_enable;
...@@ -216,9 +217,9 @@ static int sdi_display_enable(struct omap_dss_device *dssdev) ...@@ -216,9 +217,9 @@ static int sdi_display_enable(struct omap_dss_device *dssdev)
static void sdi_display_disable(struct omap_dss_device *dssdev) static void sdi_display_disable(struct omap_dss_device *dssdev)
{ {
struct omap_overlay_manager *mgr = sdi.output.manager; enum omap_channel channel = dssdev->dispc_channel;
dss_mgr_disable(mgr->id); dss_mgr_disable(channel);
dss_sdi_disable(); dss_sdi_disable();
...@@ -242,9 +243,9 @@ static void sdi_get_timings(struct omap_dss_device *dssdev, ...@@ -242,9 +243,9 @@ static void sdi_get_timings(struct omap_dss_device *dssdev,
static int sdi_check_timings(struct omap_dss_device *dssdev, static int sdi_check_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct omap_video_timings *timings)
{ {
struct omap_overlay_manager *mgr = sdi.output.manager; enum omap_channel channel = dssdev->dispc_channel;
if (!dispc_mgr_timings_ok(mgr->id, timings)) if (!dispc_mgr_timings_ok(channel, timings))
return -EINVAL; return -EINVAL;
if (timings->pixelclock == 0) if (timings->pixelclock == 0)
...@@ -280,18 +281,14 @@ static int sdi_init_regulator(void) ...@@ -280,18 +281,14 @@ static int sdi_init_regulator(void)
static int sdi_connect(struct omap_dss_device *dssdev, static int sdi_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 = sdi_init_regulator(); r = sdi_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;
...@@ -299,7 +296,7 @@ static int sdi_connect(struct omap_dss_device *dssdev, ...@@ -299,7 +296,7 @@ static int sdi_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;
} }
...@@ -309,6 +306,8 @@ static int sdi_connect(struct omap_dss_device *dssdev, ...@@ -309,6 +306,8 @@ static int sdi_connect(struct omap_dss_device *dssdev,
static void sdi_disconnect(struct omap_dss_device *dssdev, static void sdi_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)
...@@ -316,7 +315,7 @@ static void sdi_disconnect(struct omap_dss_device *dssdev, ...@@ -316,7 +315,7 @@ static void sdi_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_sdi_ops sdi_ops = { static const struct omapdss_sdi_ops sdi_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