diff options
| author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2015-11-05 02:57:04 -0500 |
|---|---|---|
| committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2016-03-03 10:38:24 -0500 |
| commit | c64b79c80a10cce0f99222b42dca39ae3c6219bb (patch) | |
| tree | 16efca81f56ed36a903f6e400cec73a62113c910 /drivers/gpu/drm/omapdrm/dss | |
| parent | 46e1ef3b6f522acd2d4e295b346180c793a713e8 (diff) | |
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: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/dss')
| -rw-r--r-- | drivers/gpu/drm/omapdrm/dss/sdi.c | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/sdi.c b/drivers/gpu/drm/omapdrm/dss/sdi.c index dee40ba9a296..cd6d3bfb041d 100644 --- a/drivers/gpu/drm/omapdrm/dss/sdi.c +++ b/drivers/gpu/drm/omapdrm/dss/sdi.c | |||
| @@ -114,7 +114,7 @@ static int sdi_calc_clock_div(unsigned long pclk, | |||
| 114 | 114 | ||
| 115 | static void sdi_config_lcd_manager(struct omap_dss_device *dssdev) | 115 | static void sdi_config_lcd_manager(struct omap_dss_device *dssdev) |
| 116 | { | 116 | { |
| 117 | struct omap_overlay_manager *mgr = sdi.output.manager; | 117 | enum omap_channel channel = dssdev->dispc_channel; |
| 118 | 118 | ||
| 119 | sdi.mgr_config.io_pad_mode = DSS_IO_PAD_MODE_BYPASS; | 119 | sdi.mgr_config.io_pad_mode = DSS_IO_PAD_MODE_BYPASS; |
| 120 | 120 | ||
| @@ -124,12 +124,13 @@ static void sdi_config_lcd_manager(struct omap_dss_device *dssdev) | |||
| 124 | sdi.mgr_config.video_port_width = 24; | 124 | sdi.mgr_config.video_port_width = 24; |
| 125 | sdi.mgr_config.lcden_sig_polarity = 1; | 125 | sdi.mgr_config.lcden_sig_polarity = 1; |
| 126 | 126 | ||
| 127 | dss_mgr_set_lcd_config(mgr->id, &sdi.mgr_config); | 127 | dss_mgr_set_lcd_config(channel, &sdi.mgr_config); |
| 128 | } | 128 | } |
| 129 | 129 | ||
| 130 | static int sdi_display_enable(struct omap_dss_device *dssdev) | 130 | static int sdi_display_enable(struct omap_dss_device *dssdev) |
| 131 | { | 131 | { |
| 132 | struct omap_dss_device *out = &sdi.output; | 132 | struct omap_dss_device *out = &sdi.output; |
| 133 | enum omap_channel channel = dssdev->dispc_channel; | ||
| 133 | struct omap_video_timings *t = &sdi.timings; | 134 | struct omap_video_timings *t = &sdi.timings; |
| 134 | unsigned long fck; | 135 | unsigned long fck; |
| 135 | struct dispc_clock_info dispc_cinfo; | 136 | struct dispc_clock_info dispc_cinfo; |
| @@ -169,7 +170,7 @@ static int sdi_display_enable(struct omap_dss_device *dssdev) | |||
| 169 | } | 170 | } |
| 170 | 171 | ||
| 171 | 172 | ||
| 172 | dss_mgr_set_timings(out->manager->id, t); | 173 | dss_mgr_set_timings(channel, t); |
| 173 | 174 | ||
| 174 | r = dss_set_fck_rate(fck); | 175 | r = dss_set_fck_rate(fck); |
| 175 | if (r) | 176 | if (r) |
| @@ -188,7 +189,7 @@ static int sdi_display_enable(struct omap_dss_device *dssdev) | |||
| 188 | * need to care about the shadow register mechanism for pck-free. The | 189 | * need to care about the shadow register mechanism for pck-free. The |
| 189 | * exact reason for this is unknown. | 190 | * exact reason for this is unknown. |
| 190 | */ | 191 | */ |
| 191 | dispc_mgr_set_clock_div(out->manager->id, &sdi.mgr_config.clock_info); | 192 | dispc_mgr_set_clock_div(channel, &sdi.mgr_config.clock_info); |
| 192 | 193 | ||
| 193 | dss_sdi_init(sdi.datapairs); | 194 | dss_sdi_init(sdi.datapairs); |
| 194 | r = dss_sdi_enable(); | 195 | r = dss_sdi_enable(); |
| @@ -196,7 +197,7 @@ static int sdi_display_enable(struct omap_dss_device *dssdev) | |||
| 196 | goto err_sdi_enable; | 197 | goto err_sdi_enable; |
| 197 | mdelay(2); | 198 | mdelay(2); |
| 198 | 199 | ||
| 199 | r = dss_mgr_enable(out->manager->id); | 200 | r = dss_mgr_enable(channel); |
| 200 | if (r) | 201 | if (r) |
| 201 | goto err_mgr_enable; | 202 | goto err_mgr_enable; |
| 202 | 203 | ||
| @@ -216,9 +217,9 @@ err_reg_enable: | |||
| 216 | 217 | ||
| 217 | static void sdi_display_disable(struct omap_dss_device *dssdev) | 218 | static void sdi_display_disable(struct omap_dss_device *dssdev) |
| 218 | { | 219 | { |
| 219 | struct omap_overlay_manager *mgr = sdi.output.manager; | 220 | enum omap_channel channel = dssdev->dispc_channel; |
| 220 | 221 | ||
| 221 | dss_mgr_disable(mgr->id); | 222 | dss_mgr_disable(channel); |
| 222 | 223 | ||
| 223 | dss_sdi_disable(); | 224 | dss_sdi_disable(); |
| 224 | 225 | ||
| @@ -242,9 +243,9 @@ static void sdi_get_timings(struct omap_dss_device *dssdev, | |||
| 242 | static int sdi_check_timings(struct omap_dss_device *dssdev, | 243 | static int sdi_check_timings(struct omap_dss_device *dssdev, |
| 243 | struct omap_video_timings *timings) | 244 | struct omap_video_timings *timings) |
| 244 | { | 245 | { |
| 245 | struct omap_overlay_manager *mgr = sdi.output.manager; | 246 | enum omap_channel channel = dssdev->dispc_channel; |
| 246 | 247 | ||
| 247 | if (!dispc_mgr_timings_ok(mgr->id, timings)) | 248 | if (!dispc_mgr_timings_ok(channel, timings)) |
| 248 | return -EINVAL; | 249 | return -EINVAL; |
| 249 | 250 | ||
| 250 | if (timings->pixelclock == 0) | 251 | if (timings->pixelclock == 0) |
| @@ -280,18 +281,14 @@ static int sdi_init_regulator(void) | |||
| 280 | static int sdi_connect(struct omap_dss_device *dssdev, | 281 | static int sdi_connect(struct omap_dss_device *dssdev, |
| 281 | struct omap_dss_device *dst) | 282 | struct omap_dss_device *dst) |
| 282 | { | 283 | { |
| 283 | struct omap_overlay_manager *mgr; | 284 | enum omap_channel channel = dssdev->dispc_channel; |
| 284 | int r; | 285 | int r; |
| 285 | 286 | ||
| 286 | r = sdi_init_regulator(); | 287 | r = sdi_init_regulator(); |
| 287 | if (r) | 288 | if (r) |
| 288 | return r; | 289 | return r; |
| 289 | 290 | ||
| 290 | mgr = omap_dss_get_overlay_manager(dssdev->dispc_channel); | 291 | r = dss_mgr_connect(channel, dssdev); |
| 291 | if (!mgr) | ||
| 292 | return -ENODEV; | ||
| 293 | |||
| 294 | r = dss_mgr_connect(mgr->id, dssdev); | ||
| 295 | if (r) | 292 | if (r) |
| 296 | return r; | 293 | return r; |
| 297 | 294 | ||
| @@ -299,7 +296,7 @@ static int sdi_connect(struct omap_dss_device *dssdev, | |||
| 299 | if (r) { | 296 | if (r) { |
| 300 | DSSERR("failed to connect output to new device: %s\n", | 297 | DSSERR("failed to connect output to new device: %s\n", |
| 301 | dst->name); | 298 | dst->name); |
| 302 | dss_mgr_disconnect(mgr->id, dssdev); | 299 | dss_mgr_disconnect(channel, dssdev); |
| 303 | return r; | 300 | return r; |
| 304 | } | 301 | } |
| 305 | 302 | ||
| @@ -309,6 +306,8 @@ static int sdi_connect(struct omap_dss_device *dssdev, | |||
| 309 | static void sdi_disconnect(struct omap_dss_device *dssdev, | 306 | static void sdi_disconnect(struct omap_dss_device *dssdev, |
| 310 | struct omap_dss_device *dst) | 307 | struct omap_dss_device *dst) |
| 311 | { | 308 | { |
| 309 | enum omap_channel channel = dssdev->dispc_channel; | ||
| 310 | |||
| 312 | WARN_ON(dst != dssdev->dst); | 311 | WARN_ON(dst != dssdev->dst); |
| 313 | 312 | ||
| 314 | if (dst != dssdev->dst) | 313 | if (dst != dssdev->dst) |
| @@ -316,7 +315,7 @@ static void sdi_disconnect(struct omap_dss_device *dssdev, | |||
| 316 | 315 | ||
| 317 | omapdss_output_unset_device(dssdev); | 316 | omapdss_output_unset_device(dssdev); |
| 318 | 317 | ||
| 319 | dss_mgr_disconnect(dssdev->manager->id, dssdev); | 318 | dss_mgr_disconnect(channel, dssdev); |
| 320 | } | 319 | } |
| 321 | 320 | ||
| 322 | static const struct omapdss_sdi_ops sdi_ops = { | 321 | static const struct omapdss_sdi_ops sdi_ops = { |
