diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2015-11-05 02:56:21 -0500 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2016-03-03 10:38:23 -0500 |
commit | 46e1ef3b6f522acd2d4e295b346180c793a713e8 (patch) | |
tree | 90d0b411924a0a4f2882e870f749908cbd0f0029 | |
parent | 86e95f92f9f85ae3207382cca7ba4fc86fd2ddd0 (diff) |
drm/omap: HDMI4: remove uses of omap_overlay_manager
We are removing the uses of 'struct omap_overlay_manager'. This patch
changes HDMI4 driver to use 'omap_channel' instead.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r-- | drivers/gpu/drm/omapdrm/dss/hdmi4.c | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4.c b/drivers/gpu/drm/omapdrm/dss/hdmi4.c index a222fc5089a5..f892ae157ff3 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi4.c +++ b/drivers/gpu/drm/omapdrm/dss/hdmi4.c | |||
@@ -165,7 +165,7 @@ static int hdmi_power_on_full(struct omap_dss_device *dssdev) | |||
165 | { | 165 | { |
166 | int r; | 166 | int r; |
167 | struct omap_video_timings *p; | 167 | struct omap_video_timings *p; |
168 | struct omap_overlay_manager *mgr = hdmi.output.manager; | 168 | enum omap_channel channel = dssdev->dispc_channel; |
169 | struct hdmi_wp_data *wp = &hdmi.wp; | 169 | struct hdmi_wp_data *wp = &hdmi.wp; |
170 | struct dss_pll_clock_info hdmi_cinfo = { 0 }; | 170 | struct dss_pll_clock_info hdmi_cinfo = { 0 }; |
171 | unsigned pc; | 171 | unsigned pc; |
@@ -217,9 +217,9 @@ static int hdmi_power_on_full(struct omap_dss_device *dssdev) | |||
217 | dispc_enable_gamma_table(0); | 217 | dispc_enable_gamma_table(0); |
218 | 218 | ||
219 | /* tv size */ | 219 | /* tv size */ |
220 | dss_mgr_set_timings(mgr->id, p); | 220 | dss_mgr_set_timings(channel, p); |
221 | 221 | ||
222 | r = dss_mgr_enable(mgr->id); | 222 | r = dss_mgr_enable(channel); |
223 | if (r) | 223 | if (r) |
224 | goto err_mgr_enable; | 224 | goto err_mgr_enable; |
225 | 225 | ||
@@ -233,7 +233,7 @@ static int hdmi_power_on_full(struct omap_dss_device *dssdev) | |||
233 | return 0; | 233 | return 0; |
234 | 234 | ||
235 | err_vid_enable: | 235 | err_vid_enable: |
236 | dss_mgr_disable(mgr->id); | 236 | dss_mgr_disable(channel); |
237 | err_mgr_enable: | 237 | err_mgr_enable: |
238 | hdmi_wp_set_phy_pwr(&hdmi.wp, HDMI_PHYPWRCMD_OFF); | 238 | hdmi_wp_set_phy_pwr(&hdmi.wp, HDMI_PHYPWRCMD_OFF); |
239 | err_phy_pwr: | 239 | err_phy_pwr: |
@@ -247,13 +247,13 @@ err_pll_enable: | |||
247 | 247 | ||
248 | static void hdmi_power_off_full(struct omap_dss_device *dssdev) | 248 | static void hdmi_power_off_full(struct omap_dss_device *dssdev) |
249 | { | 249 | { |
250 | struct omap_overlay_manager *mgr = hdmi.output.manager; | 250 | enum omap_channel channel = dssdev->dispc_channel; |
251 | 251 | ||
252 | hdmi_wp_clear_irqenable(&hdmi.wp, 0xffffffff); | 252 | hdmi_wp_clear_irqenable(&hdmi.wp, 0xffffffff); |
253 | 253 | ||
254 | hdmi_wp_video_stop(&hdmi.wp); | 254 | hdmi_wp_video_stop(&hdmi.wp); |
255 | 255 | ||
256 | dss_mgr_disable(mgr->id); | 256 | dss_mgr_disable(channel); |
257 | 257 | ||
258 | hdmi_wp_set_phy_pwr(&hdmi.wp, HDMI_PHYPWRCMD_OFF); | 258 | hdmi_wp_set_phy_pwr(&hdmi.wp, HDMI_PHYPWRCMD_OFF); |
259 | 259 | ||
@@ -265,9 +265,7 @@ static void hdmi_power_off_full(struct omap_dss_device *dssdev) | |||
265 | static int hdmi_display_check_timing(struct omap_dss_device *dssdev, | 265 | static int hdmi_display_check_timing(struct omap_dss_device *dssdev, |
266 | struct omap_video_timings *timings) | 266 | struct omap_video_timings *timings) |
267 | { | 267 | { |
268 | struct omap_dss_device *out = &hdmi.output; | 268 | if (!dispc_mgr_timings_ok(dssdev->dispc_channel, timings)) |
269 | |||
270 | if (!dispc_mgr_timings_ok(out->dispc_channel, timings)) | ||
271 | return -EINVAL; | 269 | return -EINVAL; |
272 | 270 | ||
273 | return 0; | 271 | return 0; |
@@ -438,18 +436,14 @@ static void hdmi_core_disable(struct omap_dss_device *dssdev) | |||
438 | static int hdmi_connect(struct omap_dss_device *dssdev, | 436 | static int hdmi_connect(struct omap_dss_device *dssdev, |
439 | struct omap_dss_device *dst) | 437 | struct omap_dss_device *dst) |
440 | { | 438 | { |
441 | struct omap_overlay_manager *mgr; | 439 | enum omap_channel channel = dssdev->dispc_channel; |
442 | int r; | 440 | int r; |
443 | 441 | ||
444 | r = hdmi_init_regulator(); | 442 | r = hdmi_init_regulator(); |
445 | if (r) | 443 | if (r) |
446 | return r; | 444 | return r; |
447 | 445 | ||
448 | mgr = omap_dss_get_overlay_manager(dssdev->dispc_channel); | 446 | r = dss_mgr_connect(channel, dssdev); |
449 | if (!mgr) | ||
450 | return -ENODEV; | ||
451 | |||
452 | r = dss_mgr_connect(mgr->id, dssdev); | ||
453 | if (r) | 447 | if (r) |
454 | return r; | 448 | return r; |
455 | 449 | ||
@@ -457,7 +451,7 @@ static int hdmi_connect(struct omap_dss_device *dssdev, | |||
457 | if (r) { | 451 | if (r) { |
458 | DSSERR("failed to connect output to new device: %s\n", | 452 | DSSERR("failed to connect output to new device: %s\n", |
459 | dst->name); | 453 | dst->name); |
460 | dss_mgr_disconnect(mgr->id, dssdev); | 454 | dss_mgr_disconnect(channel, dssdev); |
461 | return r; | 455 | return r; |
462 | } | 456 | } |
463 | 457 | ||
@@ -467,6 +461,8 @@ static int hdmi_connect(struct omap_dss_device *dssdev, | |||
467 | static void hdmi_disconnect(struct omap_dss_device *dssdev, | 461 | static void hdmi_disconnect(struct omap_dss_device *dssdev, |
468 | struct omap_dss_device *dst) | 462 | struct omap_dss_device *dst) |
469 | { | 463 | { |
464 | enum omap_channel channel = dssdev->dispc_channel; | ||
465 | |||
470 | WARN_ON(dst != dssdev->dst); | 466 | WARN_ON(dst != dssdev->dst); |
471 | 467 | ||
472 | if (dst != dssdev->dst) | 468 | if (dst != dssdev->dst) |
@@ -474,7 +470,7 @@ static void hdmi_disconnect(struct omap_dss_device *dssdev, | |||
474 | 470 | ||
475 | omapdss_output_unset_device(dssdev); | 471 | omapdss_output_unset_device(dssdev); |
476 | 472 | ||
477 | dss_mgr_disconnect(dssdev->manager->id, dssdev); | 473 | dss_mgr_disconnect(channel, dssdev); |
478 | } | 474 | } |
479 | 475 | ||
480 | static int hdmi_read_edid(struct omap_dss_device *dssdev, | 476 | static int hdmi_read_edid(struct omap_dss_device *dssdev, |