From f1504ad00daeeb301936f8695be28edb61613b76 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Thu, 5 Nov 2015 09:34:51 +0200 Subject: drm/omap: use dispc_channel_connected in output drivers Use 'out->dispc_channel_connected' to check if the device is connected to an overlay manager or not, instead of using 'out->manager'. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/dss/sdi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/gpu/drm/omapdrm/dss/sdi.c') diff --git a/drivers/gpu/drm/omapdrm/dss/sdi.c b/drivers/gpu/drm/omapdrm/dss/sdi.c index d747cc6b59e1..33d36ab4bcf7 100644 --- a/drivers/gpu/drm/omapdrm/dss/sdi.c +++ b/drivers/gpu/drm/omapdrm/dss/sdi.c @@ -136,7 +136,7 @@ static int sdi_display_enable(struct omap_dss_device *dssdev) unsigned long pck; int r; - if (out->manager == NULL) { + if (!out->dispc_channel_connected) { DSSERR("failed to enable display: no output/manager\n"); return -ENODEV; } -- cgit v1.2.3 From 1b07b0664aa9f36e5a79c82cff46722e587ab647 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 4 Nov 2015 20:21:48 +0200 Subject: drm/omap: convert dss_mgr_connect to accept omap_channel We are removing uses of 'struct omap_overlay_manager'. This patch changes dss_mgr_connect() to accept 'enum omap_channel' instead of 'struct omap_overlay_manager'. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/dss/dpi.c | 2 +- drivers/gpu/drm/omapdrm/dss/dsi.c | 2 +- drivers/gpu/drm/omapdrm/dss/hdmi4.c | 2 +- drivers/gpu/drm/omapdrm/dss/hdmi5.c | 2 +- drivers/gpu/drm/omapdrm/dss/omapdss.h | 2 +- drivers/gpu/drm/omapdrm/dss/output.c | 4 ++-- drivers/gpu/drm/omapdrm/dss/sdi.c | 2 +- drivers/gpu/drm/omapdrm/dss/venc.c | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) (limited to 'drivers/gpu/drm/omapdrm/dss/sdi.c') diff --git a/drivers/gpu/drm/omapdrm/dss/dpi.c b/drivers/gpu/drm/omapdrm/dss/dpi.c index c4ebc7524a09..064401bdb8a4 100644 --- a/drivers/gpu/drm/omapdrm/dss/dpi.c +++ b/drivers/gpu/drm/omapdrm/dss/dpi.c @@ -676,7 +676,7 @@ static int dpi_connect(struct omap_dss_device *dssdev, if (!mgr) return -ENODEV; - r = dss_mgr_connect(mgr, dssdev); + r = dss_mgr_connect(mgr->id, dssdev); if (r) return r; diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c index 5afbaac8f25a..3c5542afd9c9 100644 --- a/drivers/gpu/drm/omapdrm/dss/dsi.c +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c @@ -4994,7 +4994,7 @@ static int dsi_connect(struct omap_dss_device *dssdev, if (!mgr) return -ENODEV; - r = dss_mgr_connect(mgr, dssdev); + r = dss_mgr_connect(mgr->id, dssdev); if (r) return r; diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4.c b/drivers/gpu/drm/omapdrm/dss/hdmi4.c index 5d8a5ed2d3bb..bbceea8b218a 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi4.c +++ b/drivers/gpu/drm/omapdrm/dss/hdmi4.c @@ -449,7 +449,7 @@ static int hdmi_connect(struct omap_dss_device *dssdev, if (!mgr) return -ENODEV; - r = dss_mgr_connect(mgr, dssdev); + r = dss_mgr_connect(mgr->id, dssdev); if (r) return r; diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi5.c b/drivers/gpu/drm/omapdrm/dss/hdmi5.c index 24a14029112d..0b4105e89350 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi5.c +++ b/drivers/gpu/drm/omapdrm/dss/hdmi5.c @@ -475,7 +475,7 @@ static int hdmi_connect(struct omap_dss_device *dssdev, if (!mgr) return -ENODEV; - r = dss_mgr_connect(mgr, dssdev); + r = dss_mgr_connect(mgr->id, dssdev); if (r) return r; diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss.h b/drivers/gpu/drm/omapdrm/dss/omapdss.h index 640ba08735c5..44086ce82647 100644 --- a/drivers/gpu/drm/omapdrm/dss/omapdss.h +++ b/drivers/gpu/drm/omapdrm/dss/omapdss.h @@ -82,7 +82,7 @@ struct dss_mgr_ops { int dss_install_mgr_ops(const struct dss_mgr_ops *mgr_ops); void dss_uninstall_mgr_ops(void); -int dss_mgr_connect(struct omap_overlay_manager *mgr, +int dss_mgr_connect(enum omap_channel channel, struct omap_dss_device *dst); void dss_mgr_disconnect(struct omap_overlay_manager *mgr, struct omap_dss_device *dst); diff --git a/drivers/gpu/drm/omapdrm/dss/output.c b/drivers/gpu/drm/omapdrm/dss/output.c index 69e081392ee5..24de7cdff0fa 100644 --- a/drivers/gpu/drm/omapdrm/dss/output.c +++ b/drivers/gpu/drm/omapdrm/dss/output.c @@ -188,10 +188,10 @@ void dss_uninstall_mgr_ops(void) } EXPORT_SYMBOL(dss_uninstall_mgr_ops); -int dss_mgr_connect(struct omap_overlay_manager *mgr, +int dss_mgr_connect(enum omap_channel channel, struct omap_dss_device *dst) { - return dss_mgr_ops->connect(mgr->id, dst); + return dss_mgr_ops->connect(channel, dst); } EXPORT_SYMBOL(dss_mgr_connect); diff --git a/drivers/gpu/drm/omapdrm/dss/sdi.c b/drivers/gpu/drm/omapdrm/dss/sdi.c index 33d36ab4bcf7..93077f7bc500 100644 --- a/drivers/gpu/drm/omapdrm/dss/sdi.c +++ b/drivers/gpu/drm/omapdrm/dss/sdi.c @@ -291,7 +291,7 @@ static int sdi_connect(struct omap_dss_device *dssdev, if (!mgr) return -ENODEV; - r = dss_mgr_connect(mgr, dssdev); + r = dss_mgr_connect(mgr->id, dssdev); if (r) return r; diff --git a/drivers/gpu/drm/omapdrm/dss/venc.c b/drivers/gpu/drm/omapdrm/dss/venc.c index 037c5b4e2ed6..afc97891d476 100644 --- a/drivers/gpu/drm/omapdrm/dss/venc.c +++ b/drivers/gpu/drm/omapdrm/dss/venc.c @@ -753,7 +753,7 @@ static int venc_connect(struct omap_dss_device *dssdev, if (!mgr) return -ENODEV; - r = dss_mgr_connect(mgr, dssdev); + r = dss_mgr_connect(mgr->id, dssdev); if (r) return r; -- cgit v1.2.3 From bdac3bb946f1bb9a38eb15df755b579b6dc56834 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 4 Nov 2015 20:23:37 +0200 Subject: drm/omap: convert dss_mgr_disconnect to accept omap_channel We are removing uses of 'struct omap_overlay_manager'. This patch changes dss_mgr_disconnect() to accept 'enum omap_channel' instead of 'struct omap_overlay_manager'. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/dss/dpi.c | 4 ++-- drivers/gpu/drm/omapdrm/dss/dsi.c | 4 ++-- drivers/gpu/drm/omapdrm/dss/hdmi4.c | 4 ++-- drivers/gpu/drm/omapdrm/dss/hdmi5.c | 4 ++-- drivers/gpu/drm/omapdrm/dss/omapdss.h | 2 +- drivers/gpu/drm/omapdrm/dss/output.c | 4 ++-- drivers/gpu/drm/omapdrm/dss/sdi.c | 4 ++-- drivers/gpu/drm/omapdrm/dss/venc.c | 4 ++-- 8 files changed, 15 insertions(+), 15 deletions(-) (limited to 'drivers/gpu/drm/omapdrm/dss/sdi.c') diff --git a/drivers/gpu/drm/omapdrm/dss/dpi.c b/drivers/gpu/drm/omapdrm/dss/dpi.c index 064401bdb8a4..a877cfebd2d5 100644 --- a/drivers/gpu/drm/omapdrm/dss/dpi.c +++ b/drivers/gpu/drm/omapdrm/dss/dpi.c @@ -684,7 +684,7 @@ static int dpi_connect(struct omap_dss_device *dssdev, if (r) { DSSERR("failed to connect output to new device: %s\n", dst->name); - dss_mgr_disconnect(mgr, dssdev); + dss_mgr_disconnect(mgr->id, dssdev); return r; } @@ -702,7 +702,7 @@ static void dpi_disconnect(struct omap_dss_device *dssdev, omapdss_output_unset_device(dssdev); if (dssdev->manager) - dss_mgr_disconnect(dssdev->manager, dssdev); + dss_mgr_disconnect(dssdev->manager->id, dssdev); } static const struct omapdss_dpi_ops dpi_ops = { diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c index 3c5542afd9c9..a2c83691506f 100644 --- a/drivers/gpu/drm/omapdrm/dss/dsi.c +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c @@ -5002,7 +5002,7 @@ static int dsi_connect(struct omap_dss_device *dssdev, if (r) { DSSERR("failed to connect output to new device: %s\n", dssdev->name); - dss_mgr_disconnect(mgr, dssdev); + dss_mgr_disconnect(mgr->id, dssdev); return r; } @@ -5020,7 +5020,7 @@ static void dsi_disconnect(struct omap_dss_device *dssdev, omapdss_output_unset_device(dssdev); if (dssdev->manager) - dss_mgr_disconnect(dssdev->manager, dssdev); + dss_mgr_disconnect(dssdev->manager->id, dssdev); } static const struct omapdss_dsi_ops dsi_ops = { diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4.c b/drivers/gpu/drm/omapdrm/dss/hdmi4.c index bbceea8b218a..6fd7d06d32ff 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi4.c +++ b/drivers/gpu/drm/omapdrm/dss/hdmi4.c @@ -457,7 +457,7 @@ static int hdmi_connect(struct omap_dss_device *dssdev, if (r) { DSSERR("failed to connect output to new device: %s\n", dst->name); - dss_mgr_disconnect(mgr, dssdev); + dss_mgr_disconnect(mgr->id, dssdev); return r; } @@ -475,7 +475,7 @@ static void hdmi_disconnect(struct omap_dss_device *dssdev, omapdss_output_unset_device(dssdev); if (dssdev->manager) - dss_mgr_disconnect(dssdev->manager, dssdev); + dss_mgr_disconnect(dssdev->manager->id, dssdev); } static int hdmi_read_edid(struct omap_dss_device *dssdev, diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi5.c b/drivers/gpu/drm/omapdrm/dss/hdmi5.c index 0b4105e89350..9501de473916 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi5.c +++ b/drivers/gpu/drm/omapdrm/dss/hdmi5.c @@ -483,7 +483,7 @@ static int hdmi_connect(struct omap_dss_device *dssdev, if (r) { DSSERR("failed to connect output to new device: %s\n", dst->name); - dss_mgr_disconnect(mgr, dssdev); + dss_mgr_disconnect(mgr->id, dssdev); return r; } @@ -501,7 +501,7 @@ static void hdmi_disconnect(struct omap_dss_device *dssdev, omapdss_output_unset_device(dssdev); if (dssdev->manager) - dss_mgr_disconnect(dssdev->manager, dssdev); + dss_mgr_disconnect(dssdev->manager->id, dssdev); } static int hdmi_read_edid(struct omap_dss_device *dssdev, diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss.h b/drivers/gpu/drm/omapdrm/dss/omapdss.h index 44086ce82647..38da4be6ff15 100644 --- a/drivers/gpu/drm/omapdrm/dss/omapdss.h +++ b/drivers/gpu/drm/omapdrm/dss/omapdss.h @@ -84,7 +84,7 @@ void dss_uninstall_mgr_ops(void); int dss_mgr_connect(enum omap_channel channel, struct omap_dss_device *dst); -void dss_mgr_disconnect(struct omap_overlay_manager *mgr, +void dss_mgr_disconnect(enum omap_channel channel, struct omap_dss_device *dst); void dss_mgr_set_timings(struct omap_overlay_manager *mgr, const struct omap_video_timings *timings); diff --git a/drivers/gpu/drm/omapdrm/dss/output.c b/drivers/gpu/drm/omapdrm/dss/output.c index 24de7cdff0fa..0ca46f37681f 100644 --- a/drivers/gpu/drm/omapdrm/dss/output.c +++ b/drivers/gpu/drm/omapdrm/dss/output.c @@ -195,10 +195,10 @@ int dss_mgr_connect(enum omap_channel channel, } EXPORT_SYMBOL(dss_mgr_connect); -void dss_mgr_disconnect(struct omap_overlay_manager *mgr, +void dss_mgr_disconnect(enum omap_channel channel, struct omap_dss_device *dst) { - dss_mgr_ops->disconnect(mgr->id, dst); + dss_mgr_ops->disconnect(channel, dst); } EXPORT_SYMBOL(dss_mgr_disconnect); diff --git a/drivers/gpu/drm/omapdrm/dss/sdi.c b/drivers/gpu/drm/omapdrm/dss/sdi.c index 93077f7bc500..0d9f40646a34 100644 --- a/drivers/gpu/drm/omapdrm/dss/sdi.c +++ b/drivers/gpu/drm/omapdrm/dss/sdi.c @@ -299,7 +299,7 @@ static int sdi_connect(struct omap_dss_device *dssdev, if (r) { DSSERR("failed to connect output to new device: %s\n", dst->name); - dss_mgr_disconnect(mgr, dssdev); + dss_mgr_disconnect(mgr->id, dssdev); return r; } @@ -317,7 +317,7 @@ static void sdi_disconnect(struct omap_dss_device *dssdev, omapdss_output_unset_device(dssdev); if (dssdev->manager) - dss_mgr_disconnect(dssdev->manager, dssdev); + dss_mgr_disconnect(dssdev->manager->id, dssdev); } static const struct omapdss_sdi_ops sdi_ops = { diff --git a/drivers/gpu/drm/omapdrm/dss/venc.c b/drivers/gpu/drm/omapdrm/dss/venc.c index afc97891d476..2a4bd2537040 100644 --- a/drivers/gpu/drm/omapdrm/dss/venc.c +++ b/drivers/gpu/drm/omapdrm/dss/venc.c @@ -761,7 +761,7 @@ static int venc_connect(struct omap_dss_device *dssdev, if (r) { DSSERR("failed to connect output to new device: %s\n", dst->name); - dss_mgr_disconnect(mgr, dssdev); + dss_mgr_disconnect(mgr->id, dssdev); return r; } @@ -779,7 +779,7 @@ static void venc_disconnect(struct omap_dss_device *dssdev, omapdss_output_unset_device(dssdev); if (dssdev->manager) - dss_mgr_disconnect(dssdev->manager, dssdev); + dss_mgr_disconnect(dssdev->manager->id, dssdev); } static const struct omapdss_atv_ops venc_ops = { -- cgit v1.2.3 From 5c6ff3cd4546dea0a7a70cef6c9b656b8b022217 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 4 Nov 2015 20:25:05 +0200 Subject: drm/omap: convert dss_mgr_set_timings to accept omap_channel We are removing uses of 'struct omap_overlay_manager'. This patch changes dss_mgr_set_timings() to accept 'enum omap_channel' instead of 'struct omap_overlay_manager'. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/dss/dpi.c | 2 +- drivers/gpu/drm/omapdrm/dss/dsi.c | 4 ++-- drivers/gpu/drm/omapdrm/dss/hdmi4.c | 2 +- drivers/gpu/drm/omapdrm/dss/hdmi5.c | 2 +- drivers/gpu/drm/omapdrm/dss/omapdss.h | 2 +- drivers/gpu/drm/omapdrm/dss/output.c | 4 ++-- drivers/gpu/drm/omapdrm/dss/sdi.c | 2 +- drivers/gpu/drm/omapdrm/dss/venc.c | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) (limited to 'drivers/gpu/drm/omapdrm/dss/sdi.c') diff --git a/drivers/gpu/drm/omapdrm/dss/dpi.c b/drivers/gpu/drm/omapdrm/dss/dpi.c index a877cfebd2d5..91d0f5ab0bf7 100644 --- a/drivers/gpu/drm/omapdrm/dss/dpi.c +++ b/drivers/gpu/drm/omapdrm/dss/dpi.c @@ -359,7 +359,7 @@ static int dpi_set_mode(struct dpi_data *dpi) t->pixelclock = pck; } - dss_mgr_set_timings(mgr, t); + dss_mgr_set_timings(mgr->id, t); return 0; } diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c index a2c83691506f..a06c7b83a7b6 100644 --- a/drivers/gpu/drm/omapdrm/dss/dsi.c +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c @@ -3980,7 +3980,7 @@ static void dsi_update_screen_dispc(struct platform_device *dsidev) msecs_to_jiffies(250)); BUG_ON(r == 0); - dss_mgr_set_timings(mgr, &dsi->timings); + dss_mgr_set_timings(mgr->id, &dsi->timings); dss_mgr_start_update(mgr); @@ -4140,7 +4140,7 @@ static int dsi_display_init_dispc(struct platform_device *dsidev, dsi->timings.de_level = OMAPDSS_SIG_ACTIVE_HIGH; dsi->timings.sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE; - dss_mgr_set_timings(mgr, &dsi->timings); + dss_mgr_set_timings(mgr->id, &dsi->timings); r = dsi_configure_dispc_clocks(dsidev); if (r) diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4.c b/drivers/gpu/drm/omapdrm/dss/hdmi4.c index 6fd7d06d32ff..8d44103ebf96 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi4.c +++ b/drivers/gpu/drm/omapdrm/dss/hdmi4.c @@ -217,7 +217,7 @@ static int hdmi_power_on_full(struct omap_dss_device *dssdev) dispc_enable_gamma_table(0); /* tv size */ - dss_mgr_set_timings(mgr, p); + dss_mgr_set_timings(mgr->id, p); r = dss_mgr_enable(mgr); if (r) diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi5.c b/drivers/gpu/drm/omapdrm/dss/hdmi5.c index 9501de473916..7a299eb5a87a 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi5.c +++ b/drivers/gpu/drm/omapdrm/dss/hdmi5.c @@ -234,7 +234,7 @@ static int hdmi_power_on_full(struct omap_dss_device *dssdev) dispc_enable_gamma_table(0); /* tv size */ - dss_mgr_set_timings(mgr, p); + dss_mgr_set_timings(mgr->id, p); r = dss_mgr_enable(mgr); if (r) diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss.h b/drivers/gpu/drm/omapdrm/dss/omapdss.h index 38da4be6ff15..e66d4bb468bb 100644 --- a/drivers/gpu/drm/omapdrm/dss/omapdss.h +++ b/drivers/gpu/drm/omapdrm/dss/omapdss.h @@ -86,7 +86,7 @@ int dss_mgr_connect(enum omap_channel channel, struct omap_dss_device *dst); void dss_mgr_disconnect(enum omap_channel channel, struct omap_dss_device *dst); -void dss_mgr_set_timings(struct omap_overlay_manager *mgr, +void dss_mgr_set_timings(enum omap_channel channel, const struct omap_video_timings *timings); void dss_mgr_set_lcd_config(struct omap_overlay_manager *mgr, const struct dss_lcd_mgr_config *config); diff --git a/drivers/gpu/drm/omapdrm/dss/output.c b/drivers/gpu/drm/omapdrm/dss/output.c index 0ca46f37681f..20255cae6084 100644 --- a/drivers/gpu/drm/omapdrm/dss/output.c +++ b/drivers/gpu/drm/omapdrm/dss/output.c @@ -202,10 +202,10 @@ void dss_mgr_disconnect(enum omap_channel channel, } EXPORT_SYMBOL(dss_mgr_disconnect); -void dss_mgr_set_timings(struct omap_overlay_manager *mgr, +void dss_mgr_set_timings(enum omap_channel channel, const struct omap_video_timings *timings) { - dss_mgr_ops->set_timings(mgr->id, timings); + dss_mgr_ops->set_timings(channel, timings); } EXPORT_SYMBOL(dss_mgr_set_timings); diff --git a/drivers/gpu/drm/omapdrm/dss/sdi.c b/drivers/gpu/drm/omapdrm/dss/sdi.c index 0d9f40646a34..3b16a5b64a67 100644 --- a/drivers/gpu/drm/omapdrm/dss/sdi.c +++ b/drivers/gpu/drm/omapdrm/dss/sdi.c @@ -169,7 +169,7 @@ static int sdi_display_enable(struct omap_dss_device *dssdev) } - dss_mgr_set_timings(out->manager, t); + dss_mgr_set_timings(out->manager->id, t); r = dss_set_fck_rate(fck); if (r) diff --git a/drivers/gpu/drm/omapdrm/dss/venc.c b/drivers/gpu/drm/omapdrm/dss/venc.c index 2a4bd2537040..af760ec7f5dd 100644 --- a/drivers/gpu/drm/omapdrm/dss/venc.c +++ b/drivers/gpu/drm/omapdrm/dss/venc.c @@ -469,7 +469,7 @@ static int venc_power_on(struct omap_dss_device *dssdev) venc_write_reg(VENC_OUTPUT_CONTROL, l); - dss_mgr_set_timings(mgr, &venc.timings); + dss_mgr_set_timings(mgr->id, &venc.timings); r = regulator_enable(venc.vdda_dac_reg); if (r) -- cgit v1.2.3 From bb772e1abfa58f8812fabfea16775c17d15daade Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 4 Nov 2015 20:26:15 +0200 Subject: drm/omap: convert dss_mgr_set_lcd_config to accept omap_channel We are removing uses of 'struct omap_overlay_manager'. This patch changes dss_mgr_set_lcd_config() to accept 'enum omap_channel' instead of 'struct omap_overlay_manager'. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/dss/dpi.c | 2 +- drivers/gpu/drm/omapdrm/dss/dsi.c | 2 +- drivers/gpu/drm/omapdrm/dss/omapdss.h | 2 +- drivers/gpu/drm/omapdrm/dss/output.c | 4 ++-- drivers/gpu/drm/omapdrm/dss/sdi.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers/gpu/drm/omapdrm/dss/sdi.c') diff --git a/drivers/gpu/drm/omapdrm/dss/dpi.c b/drivers/gpu/drm/omapdrm/dss/dpi.c index 91d0f5ab0bf7..17d1a3ff6bab 100644 --- a/drivers/gpu/drm/omapdrm/dss/dpi.c +++ b/drivers/gpu/drm/omapdrm/dss/dpi.c @@ -378,7 +378,7 @@ static void dpi_config_lcd_manager(struct dpi_data *dpi) dpi->mgr_config.lcden_sig_polarity = 0; - dss_mgr_set_lcd_config(mgr, &dpi->mgr_config); + dss_mgr_set_lcd_config(mgr->id, &dpi->mgr_config); } static int dpi_display_enable(struct omap_dss_device *dssdev) diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c index a06c7b83a7b6..5709695c7e60 100644 --- a/drivers/gpu/drm/omapdrm/dss/dsi.c +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c @@ -4151,7 +4151,7 @@ static int dsi_display_init_dispc(struct platform_device *dsidev, dsi_get_pixel_size(dsi->pix_fmt); dsi->mgr_config.lcden_sig_polarity = 0; - dss_mgr_set_lcd_config(mgr, &dsi->mgr_config); + dss_mgr_set_lcd_config(mgr->id, &dsi->mgr_config); return 0; err1: diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss.h b/drivers/gpu/drm/omapdrm/dss/omapdss.h index e66d4bb468bb..951fc18cb5ba 100644 --- a/drivers/gpu/drm/omapdrm/dss/omapdss.h +++ b/drivers/gpu/drm/omapdrm/dss/omapdss.h @@ -88,7 +88,7 @@ void dss_mgr_disconnect(enum omap_channel channel, struct omap_dss_device *dst); void dss_mgr_set_timings(enum omap_channel channel, const struct omap_video_timings *timings); -void dss_mgr_set_lcd_config(struct omap_overlay_manager *mgr, +void dss_mgr_set_lcd_config(enum omap_channel channel, const struct dss_lcd_mgr_config *config); int dss_mgr_enable(struct omap_overlay_manager *mgr); void dss_mgr_disable(struct omap_overlay_manager *mgr); diff --git a/drivers/gpu/drm/omapdrm/dss/output.c b/drivers/gpu/drm/omapdrm/dss/output.c index 20255cae6084..f926ed7a5499 100644 --- a/drivers/gpu/drm/omapdrm/dss/output.c +++ b/drivers/gpu/drm/omapdrm/dss/output.c @@ -209,10 +209,10 @@ void dss_mgr_set_timings(enum omap_channel channel, } EXPORT_SYMBOL(dss_mgr_set_timings); -void dss_mgr_set_lcd_config(struct omap_overlay_manager *mgr, +void dss_mgr_set_lcd_config(enum omap_channel channel, const struct dss_lcd_mgr_config *config) { - dss_mgr_ops->set_lcd_config(mgr->id, config); + dss_mgr_ops->set_lcd_config(channel, config); } EXPORT_SYMBOL(dss_mgr_set_lcd_config); diff --git a/drivers/gpu/drm/omapdrm/dss/sdi.c b/drivers/gpu/drm/omapdrm/dss/sdi.c index 3b16a5b64a67..a42c405c04e9 100644 --- a/drivers/gpu/drm/omapdrm/dss/sdi.c +++ b/drivers/gpu/drm/omapdrm/dss/sdi.c @@ -124,7 +124,7 @@ static void sdi_config_lcd_manager(struct omap_dss_device *dssdev) sdi.mgr_config.video_port_width = 24; sdi.mgr_config.lcden_sig_polarity = 1; - dss_mgr_set_lcd_config(mgr, &sdi.mgr_config); + dss_mgr_set_lcd_config(mgr->id, &sdi.mgr_config); } static int sdi_display_enable(struct omap_dss_device *dssdev) -- cgit v1.2.3 From 85a8c62250d7e31ded7a45c312b6860fb87e1a13 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 4 Nov 2015 20:27:31 +0200 Subject: drm/omap: convert dss_mgr_enable to accept omap_channel We are removing uses of 'struct omap_overlay_manager'. This patch changes dss_mgr_enable() to accept 'enum omap_channel' instead of 'struct omap_overlay_manager'. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/dss/dispc-compat.c | 2 +- drivers/gpu/drm/omapdrm/dss/dpi.c | 2 +- drivers/gpu/drm/omapdrm/dss/dsi.c | 2 +- drivers/gpu/drm/omapdrm/dss/hdmi4.c | 2 +- drivers/gpu/drm/omapdrm/dss/hdmi5.c | 2 +- drivers/gpu/drm/omapdrm/dss/omapdss.h | 2 +- drivers/gpu/drm/omapdrm/dss/output.c | 4 ++-- drivers/gpu/drm/omapdrm/dss/sdi.c | 2 +- drivers/gpu/drm/omapdrm/dss/venc.c | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) (limited to 'drivers/gpu/drm/omapdrm/dss/sdi.c') diff --git a/drivers/gpu/drm/omapdrm/dss/dispc-compat.c b/drivers/gpu/drm/omapdrm/dss/dispc-compat.c index 0918b3bfe82a..b0cf2dd147cf 100644 --- a/drivers/gpu/drm/omapdrm/dss/dispc-compat.c +++ b/drivers/gpu/drm/omapdrm/dss/dispc-compat.c @@ -390,7 +390,7 @@ static void dispc_error_worker(struct work_struct *work) ovl->disable(ovl); } - dss_mgr_enable(mgr); + dss_mgr_enable(mgr->id); } } diff --git a/drivers/gpu/drm/omapdrm/dss/dpi.c b/drivers/gpu/drm/omapdrm/dss/dpi.c index 17d1a3ff6bab..8d64fdbc53fa 100644 --- a/drivers/gpu/drm/omapdrm/dss/dpi.c +++ b/drivers/gpu/drm/omapdrm/dss/dpi.c @@ -429,7 +429,7 @@ static int dpi_display_enable(struct omap_dss_device *dssdev) mdelay(2); - r = dss_mgr_enable(out->manager); + r = dss_mgr_enable(out->manager->id); if (r) goto err_mgr_enable; diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c index 5709695c7e60..f3881d180d4e 100644 --- a/drivers/gpu/drm/omapdrm/dss/dsi.c +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c @@ -3876,7 +3876,7 @@ static int dsi_enable_video_output(struct omap_dss_device *dssdev, int channel) dsi_if_enable(dsidev, true); } - r = dss_mgr_enable(mgr); + r = dss_mgr_enable(mgr->id); if (r) goto err_mgr_enable; diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4.c b/drivers/gpu/drm/omapdrm/dss/hdmi4.c index 8d44103ebf96..3f3e197ed083 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi4.c +++ b/drivers/gpu/drm/omapdrm/dss/hdmi4.c @@ -219,7 +219,7 @@ static int hdmi_power_on_full(struct omap_dss_device *dssdev) /* tv size */ dss_mgr_set_timings(mgr->id, p); - r = dss_mgr_enable(mgr); + r = dss_mgr_enable(mgr->id); if (r) goto err_mgr_enable; diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi5.c b/drivers/gpu/drm/omapdrm/dss/hdmi5.c index 7a299eb5a87a..7ae447382ea5 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi5.c +++ b/drivers/gpu/drm/omapdrm/dss/hdmi5.c @@ -236,7 +236,7 @@ static int hdmi_power_on_full(struct omap_dss_device *dssdev) /* tv size */ dss_mgr_set_timings(mgr->id, p); - r = dss_mgr_enable(mgr); + r = dss_mgr_enable(mgr->id); if (r) goto err_mgr_enable; diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss.h b/drivers/gpu/drm/omapdrm/dss/omapdss.h index 951fc18cb5ba..c76802df6b00 100644 --- a/drivers/gpu/drm/omapdrm/dss/omapdss.h +++ b/drivers/gpu/drm/omapdrm/dss/omapdss.h @@ -90,7 +90,7 @@ void dss_mgr_set_timings(enum omap_channel channel, const struct omap_video_timings *timings); void dss_mgr_set_lcd_config(enum omap_channel channel, const struct dss_lcd_mgr_config *config); -int dss_mgr_enable(struct omap_overlay_manager *mgr); +int dss_mgr_enable(enum omap_channel channel); void dss_mgr_disable(struct omap_overlay_manager *mgr); void dss_mgr_start_update(struct omap_overlay_manager *mgr); int dss_mgr_register_framedone_handler(struct omap_overlay_manager *mgr, diff --git a/drivers/gpu/drm/omapdrm/dss/output.c b/drivers/gpu/drm/omapdrm/dss/output.c index f926ed7a5499..cb90a9c9d84d 100644 --- a/drivers/gpu/drm/omapdrm/dss/output.c +++ b/drivers/gpu/drm/omapdrm/dss/output.c @@ -216,9 +216,9 @@ void dss_mgr_set_lcd_config(enum omap_channel channel, } EXPORT_SYMBOL(dss_mgr_set_lcd_config); -int dss_mgr_enable(struct omap_overlay_manager *mgr) +int dss_mgr_enable(enum omap_channel channel) { - return dss_mgr_ops->enable(mgr->id); + return dss_mgr_ops->enable(channel); } EXPORT_SYMBOL(dss_mgr_enable); diff --git a/drivers/gpu/drm/omapdrm/dss/sdi.c b/drivers/gpu/drm/omapdrm/dss/sdi.c index a42c405c04e9..22dfda5fea90 100644 --- a/drivers/gpu/drm/omapdrm/dss/sdi.c +++ b/drivers/gpu/drm/omapdrm/dss/sdi.c @@ -196,7 +196,7 @@ static int sdi_display_enable(struct omap_dss_device *dssdev) goto err_sdi_enable; mdelay(2); - r = dss_mgr_enable(out->manager); + r = dss_mgr_enable(out->manager->id); if (r) goto err_mgr_enable; diff --git a/drivers/gpu/drm/omapdrm/dss/venc.c b/drivers/gpu/drm/omapdrm/dss/venc.c index af760ec7f5dd..aae4cd0ae5ce 100644 --- a/drivers/gpu/drm/omapdrm/dss/venc.c +++ b/drivers/gpu/drm/omapdrm/dss/venc.c @@ -475,7 +475,7 @@ static int venc_power_on(struct omap_dss_device *dssdev) if (r) goto err1; - r = dss_mgr_enable(mgr); + r = dss_mgr_enable(mgr->id); if (r) goto err2; -- cgit v1.2.3 From 705fd454a909ab652954c04352bc9f2753523d7b Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 4 Nov 2015 20:28:45 +0200 Subject: drm/omap: convert dss_mgr_disable to accept omap_channel We are removing uses of 'struct omap_overlay_manager'. This patch changes dss_mgr_disable() to accept 'enum omap_channel' instead of 'struct omap_overlay_manager'. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/dss/dispc-compat.c | 4 ++-- drivers/gpu/drm/omapdrm/dss/dpi.c | 2 +- drivers/gpu/drm/omapdrm/dss/dsi.c | 2 +- drivers/gpu/drm/omapdrm/dss/hdmi4.c | 4 ++-- drivers/gpu/drm/omapdrm/dss/hdmi5.c | 4 ++-- drivers/gpu/drm/omapdrm/dss/omapdss.h | 2 +- drivers/gpu/drm/omapdrm/dss/output.c | 4 ++-- drivers/gpu/drm/omapdrm/dss/sdi.c | 2 +- drivers/gpu/drm/omapdrm/dss/venc.c | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) (limited to 'drivers/gpu/drm/omapdrm/dss/sdi.c') diff --git a/drivers/gpu/drm/omapdrm/dss/dispc-compat.c b/drivers/gpu/drm/omapdrm/dss/dispc-compat.c index b0cf2dd147cf..ef565b67650f 100644 --- a/drivers/gpu/drm/omapdrm/dss/dispc-compat.c +++ b/drivers/gpu/drm/omapdrm/dss/dispc-compat.c @@ -379,7 +379,7 @@ static void dispc_error_worker(struct work_struct *work) "with video overlays disabled\n", mgr->name); - dss_mgr_disable(mgr); + dss_mgr_disable(mgr->id); for (j = 0; j < omap_dss_get_num_overlays(); ++j) { struct omap_overlay *ovl; @@ -400,7 +400,7 @@ static void dispc_error_worker(struct work_struct *work) struct omap_overlay_manager *mgr; mgr = omap_dss_get_overlay_manager(i); - dss_mgr_disable(mgr); + dss_mgr_disable(mgr->id); } } diff --git a/drivers/gpu/drm/omapdrm/dss/dpi.c b/drivers/gpu/drm/omapdrm/dss/dpi.c index 8d64fdbc53fa..cd6254bee656 100644 --- a/drivers/gpu/drm/omapdrm/dss/dpi.c +++ b/drivers/gpu/drm/omapdrm/dss/dpi.c @@ -461,7 +461,7 @@ static void dpi_display_disable(struct omap_dss_device *dssdev) mutex_lock(&dpi->lock); - dss_mgr_disable(mgr); + dss_mgr_disable(mgr->id); if (dpi->pll) { dss_select_lcd_clk_source(mgr->id, OMAP_DSS_CLK_SRC_FCK); diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c index f3881d180d4e..08751c9cc973 100644 --- a/drivers/gpu/drm/omapdrm/dss/dsi.c +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c @@ -3910,7 +3910,7 @@ static void dsi_disable_video_output(struct omap_dss_device *dssdev, int channel dsi_if_enable(dsidev, true); } - dss_mgr_disable(mgr); + dss_mgr_disable(mgr->id); dsi_display_uninit_dispc(dsidev, mgr); } diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4.c b/drivers/gpu/drm/omapdrm/dss/hdmi4.c index 3f3e197ed083..f8ed407f148e 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi4.c +++ b/drivers/gpu/drm/omapdrm/dss/hdmi4.c @@ -233,7 +233,7 @@ static int hdmi_power_on_full(struct omap_dss_device *dssdev) return 0; err_vid_enable: - dss_mgr_disable(mgr); + dss_mgr_disable(mgr->id); err_mgr_enable: hdmi_wp_set_phy_pwr(&hdmi.wp, HDMI_PHYPWRCMD_OFF); err_phy_pwr: @@ -253,7 +253,7 @@ static void hdmi_power_off_full(struct omap_dss_device *dssdev) hdmi_wp_video_stop(&hdmi.wp); - dss_mgr_disable(mgr); + dss_mgr_disable(mgr->id); hdmi_wp_set_phy_pwr(&hdmi.wp, HDMI_PHYPWRCMD_OFF); diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi5.c b/drivers/gpu/drm/omapdrm/dss/hdmi5.c index 7ae447382ea5..b75f15e15797 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi5.c +++ b/drivers/gpu/drm/omapdrm/dss/hdmi5.c @@ -250,7 +250,7 @@ static int hdmi_power_on_full(struct omap_dss_device *dssdev) return 0; err_vid_enable: - dss_mgr_disable(mgr); + dss_mgr_disable(mgr->id); err_mgr_enable: hdmi_wp_set_phy_pwr(&hdmi.wp, HDMI_PHYPWRCMD_OFF); err_phy_pwr: @@ -270,7 +270,7 @@ static void hdmi_power_off_full(struct omap_dss_device *dssdev) hdmi_wp_video_stop(&hdmi.wp); - dss_mgr_disable(mgr); + dss_mgr_disable(mgr->id); hdmi_wp_set_phy_pwr(&hdmi.wp, HDMI_PHYPWRCMD_OFF); diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss.h b/drivers/gpu/drm/omapdrm/dss/omapdss.h index c76802df6b00..25c3449111b2 100644 --- a/drivers/gpu/drm/omapdrm/dss/omapdss.h +++ b/drivers/gpu/drm/omapdrm/dss/omapdss.h @@ -91,7 +91,7 @@ void dss_mgr_set_timings(enum omap_channel channel, void dss_mgr_set_lcd_config(enum omap_channel channel, const struct dss_lcd_mgr_config *config); int dss_mgr_enable(enum omap_channel channel); -void dss_mgr_disable(struct omap_overlay_manager *mgr); +void dss_mgr_disable(enum omap_channel channel); void dss_mgr_start_update(struct omap_overlay_manager *mgr); int dss_mgr_register_framedone_handler(struct omap_overlay_manager *mgr, void (*handler)(void *), void *data); diff --git a/drivers/gpu/drm/omapdrm/dss/output.c b/drivers/gpu/drm/omapdrm/dss/output.c index cb90a9c9d84d..c6238746efe1 100644 --- a/drivers/gpu/drm/omapdrm/dss/output.c +++ b/drivers/gpu/drm/omapdrm/dss/output.c @@ -222,9 +222,9 @@ int dss_mgr_enable(enum omap_channel channel) } EXPORT_SYMBOL(dss_mgr_enable); -void dss_mgr_disable(struct omap_overlay_manager *mgr) +void dss_mgr_disable(enum omap_channel channel) { - dss_mgr_ops->disable(mgr->id); + dss_mgr_ops->disable(channel); } EXPORT_SYMBOL(dss_mgr_disable); diff --git a/drivers/gpu/drm/omapdrm/dss/sdi.c b/drivers/gpu/drm/omapdrm/dss/sdi.c index 22dfda5fea90..e00aaabb77b8 100644 --- a/drivers/gpu/drm/omapdrm/dss/sdi.c +++ b/drivers/gpu/drm/omapdrm/dss/sdi.c @@ -218,7 +218,7 @@ static void sdi_display_disable(struct omap_dss_device *dssdev) { struct omap_overlay_manager *mgr = sdi.output.manager; - dss_mgr_disable(mgr); + dss_mgr_disable(mgr->id); dss_sdi_disable(); diff --git a/drivers/gpu/drm/omapdrm/dss/venc.c b/drivers/gpu/drm/omapdrm/dss/venc.c index aae4cd0ae5ce..401c477242b1 100644 --- a/drivers/gpu/drm/omapdrm/dss/venc.c +++ b/drivers/gpu/drm/omapdrm/dss/venc.c @@ -499,7 +499,7 @@ static void venc_power_off(struct omap_dss_device *dssdev) venc_write_reg(VENC_OUTPUT_CONTROL, 0); dss_set_dac_pwrdn_bgz(0); - dss_mgr_disable(mgr); + dss_mgr_disable(mgr->id); regulator_disable(venc.vdda_dac_reg); -- cgit v1.2.3 From 98df844806869d09d9fb06ec69411f0378373360 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Thu, 5 Nov 2015 09:41:12 +0200 Subject: drm/omap: remove extra check in dpi and sdi Both dpi and sdi check for 'mgr != NULL' in check_timings. This check is not necessary, as mgr must always be set before check_timings. Remove the check. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/dss/dpi.c | 2 +- drivers/gpu/drm/omapdrm/dss/sdi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/drm/omapdrm/dss/sdi.c') diff --git a/drivers/gpu/drm/omapdrm/dss/dpi.c b/drivers/gpu/drm/omapdrm/dss/dpi.c index cd6254bee656..d4be2444b2ea 100644 --- a/drivers/gpu/drm/omapdrm/dss/dpi.c +++ b/drivers/gpu/drm/omapdrm/dss/dpi.c @@ -516,7 +516,7 @@ static int dpi_check_timings(struct omap_dss_device *dssdev, if (timings->x_res % 8 != 0) return -EINVAL; - if (mgr && !dispc_mgr_timings_ok(mgr->id, timings)) + if (!dispc_mgr_timings_ok(mgr->id, timings)) return -EINVAL; if (timings->pixelclock == 0) diff --git a/drivers/gpu/drm/omapdrm/dss/sdi.c b/drivers/gpu/drm/omapdrm/dss/sdi.c index e00aaabb77b8..0526f24ed8a9 100644 --- a/drivers/gpu/drm/omapdrm/dss/sdi.c +++ b/drivers/gpu/drm/omapdrm/dss/sdi.c @@ -244,7 +244,7 @@ static int sdi_check_timings(struct omap_dss_device *dssdev, { struct omap_overlay_manager *mgr = sdi.output.manager; - if (mgr && !dispc_mgr_timings_ok(mgr->id, timings)) + if (!dispc_mgr_timings_ok(mgr->id, timings)) return -EINVAL; if (timings->pixelclock == 0) -- cgit v1.2.3 From a0e53bfe9f41689d337955814bdc2e5c0f373009 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Thu, 5 Nov 2015 09:44:53 +0200 Subject: drm/omap: remove extra manager checks on disconnect The DSS output drivers check 'dssdev->manager' in disconnect() functions. This check is not needed as the manager must always be set if the output device was connected. Remove the check. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/dss/dpi.c | 3 +-- drivers/gpu/drm/omapdrm/dss/dsi.c | 3 +-- drivers/gpu/drm/omapdrm/dss/hdmi4.c | 3 +-- drivers/gpu/drm/omapdrm/dss/hdmi5.c | 3 +-- drivers/gpu/drm/omapdrm/dss/sdi.c | 3 +-- drivers/gpu/drm/omapdrm/dss/venc.c | 3 +-- 6 files changed, 6 insertions(+), 12 deletions(-) (limited to 'drivers/gpu/drm/omapdrm/dss/sdi.c') diff --git a/drivers/gpu/drm/omapdrm/dss/dpi.c b/drivers/gpu/drm/omapdrm/dss/dpi.c index d4be2444b2ea..c73d3651ca10 100644 --- a/drivers/gpu/drm/omapdrm/dss/dpi.c +++ b/drivers/gpu/drm/omapdrm/dss/dpi.c @@ -701,8 +701,7 @@ static void dpi_disconnect(struct omap_dss_device *dssdev, omapdss_output_unset_device(dssdev); - if (dssdev->manager) - dss_mgr_disconnect(dssdev->manager->id, dssdev); + dss_mgr_disconnect(dssdev->manager->id, dssdev); } static const struct omapdss_dpi_ops dpi_ops = { diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c index 10099f75364d..d00c6a31602d 100644 --- a/drivers/gpu/drm/omapdrm/dss/dsi.c +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c @@ -5019,8 +5019,7 @@ static void dsi_disconnect(struct omap_dss_device *dssdev, omapdss_output_unset_device(dssdev); - if (dssdev->manager) - dss_mgr_disconnect(dssdev->manager->id, dssdev); + dss_mgr_disconnect(dssdev->manager->id, dssdev); } static const struct omapdss_dsi_ops dsi_ops = { diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4.c b/drivers/gpu/drm/omapdrm/dss/hdmi4.c index f8ed407f148e..a222fc5089a5 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi4.c +++ b/drivers/gpu/drm/omapdrm/dss/hdmi4.c @@ -474,8 +474,7 @@ static void hdmi_disconnect(struct omap_dss_device *dssdev, omapdss_output_unset_device(dssdev); - if (dssdev->manager) - dss_mgr_disconnect(dssdev->manager->id, dssdev); + dss_mgr_disconnect(dssdev->manager->id, dssdev); } static int hdmi_read_edid(struct omap_dss_device *dssdev, diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi5.c b/drivers/gpu/drm/omapdrm/dss/hdmi5.c index b75f15e15797..33cda9bcf952 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi5.c +++ b/drivers/gpu/drm/omapdrm/dss/hdmi5.c @@ -500,8 +500,7 @@ static void hdmi_disconnect(struct omap_dss_device *dssdev, omapdss_output_unset_device(dssdev); - if (dssdev->manager) - dss_mgr_disconnect(dssdev->manager->id, dssdev); + dss_mgr_disconnect(dssdev->manager->id, dssdev); } static int hdmi_read_edid(struct omap_dss_device *dssdev, diff --git a/drivers/gpu/drm/omapdrm/dss/sdi.c b/drivers/gpu/drm/omapdrm/dss/sdi.c index 0526f24ed8a9..dee40ba9a296 100644 --- a/drivers/gpu/drm/omapdrm/dss/sdi.c +++ b/drivers/gpu/drm/omapdrm/dss/sdi.c @@ -316,8 +316,7 @@ static void sdi_disconnect(struct omap_dss_device *dssdev, omapdss_output_unset_device(dssdev); - if (dssdev->manager) - dss_mgr_disconnect(dssdev->manager->id, dssdev); + dss_mgr_disconnect(dssdev->manager->id, dssdev); } static const struct omapdss_sdi_ops sdi_ops = { diff --git a/drivers/gpu/drm/omapdrm/dss/venc.c b/drivers/gpu/drm/omapdrm/dss/venc.c index 401c477242b1..d514c9878ae2 100644 --- a/drivers/gpu/drm/omapdrm/dss/venc.c +++ b/drivers/gpu/drm/omapdrm/dss/venc.c @@ -778,8 +778,7 @@ static void venc_disconnect(struct omap_dss_device *dssdev, omapdss_output_unset_device(dssdev); - if (dssdev->manager) - dss_mgr_disconnect(dssdev->manager->id, dssdev); + dss_mgr_disconnect(dssdev->manager->id, dssdev); } static const struct omapdss_atv_ops venc_ops = { -- cgit v1.2.3 From c64b79c80a10cce0f99222b42dca39ae3c6219bb Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Thu, 5 Nov 2015 09:57:04 +0200 Subject: 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 --- drivers/gpu/drm/omapdrm/dss/sdi.c | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) (limited to 'drivers/gpu/drm/omapdrm/dss/sdi.c') 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, 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; @@ -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.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) { struct omap_dss_device *out = &sdi.output; + enum omap_channel channel = dssdev->dispc_channel; struct omap_video_timings *t = &sdi.timings; unsigned long fck; struct dispc_clock_info dispc_cinfo; @@ -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); if (r) @@ -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 * 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); r = dss_sdi_enable(); @@ -196,7 +197,7 @@ static int sdi_display_enable(struct omap_dss_device *dssdev) goto err_sdi_enable; mdelay(2); - r = dss_mgr_enable(out->manager->id); + r = dss_mgr_enable(channel); if (r) goto err_mgr_enable; @@ -216,9 +217,9 @@ err_reg_enable: 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(); @@ -242,9 +243,9 @@ static void sdi_get_timings(struct omap_dss_device *dssdev, static int sdi_check_timings(struct omap_dss_device *dssdev, 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; if (timings->pixelclock == 0) @@ -280,18 +281,14 @@ static int sdi_init_regulator(void) static int sdi_connect(struct omap_dss_device *dssdev, struct omap_dss_device *dst) { - struct omap_overlay_manager *mgr; + enum omap_channel channel = dssdev->dispc_channel; int r; r = sdi_init_regulator(); if (r) return r; - mgr = omap_dss_get_overlay_manager(dssdev->dispc_channel); - if (!mgr) - return -ENODEV; - - r = dss_mgr_connect(mgr->id, dssdev); + r = dss_mgr_connect(channel, dssdev); if (r) return r; @@ -299,7 +296,7 @@ static int sdi_connect(struct omap_dss_device *dssdev, if (r) { DSSERR("failed to connect output to new device: %s\n", dst->name); - dss_mgr_disconnect(mgr->id, dssdev); + dss_mgr_disconnect(channel, dssdev); return r; } @@ -309,6 +306,8 @@ static int sdi_connect(struct omap_dss_device *dssdev, static void sdi_disconnect(struct omap_dss_device *dssdev, struct omap_dss_device *dst) { + enum omap_channel channel = dssdev->dispc_channel; + WARN_ON(dst != dssdev->dst); if (dst != dssdev->dst) @@ -316,7 +315,7 @@ static void sdi_disconnect(struct omap_dss_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 = { -- cgit v1.2.3