summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/omap_encoder.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2018-06-07 19:55:04 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2018-09-03 16:13:30 +0300
commit6ea48430952323091194100d48c5610b9cd286b4 (patch)
tree25b8e6fa2fea6338ef76de63e42ede79452fc670 /drivers/gpu/drm/omapdrm/omap_encoder.c
parentd8dbe79143764b86bd04c63c044431565582a22d (diff)
downloadlinux-6ea48430952323091194100d48c5610b9cd286b4.tar.bz2
drm/omap: Don't call .set_timings() operation recursively
Instead of calling the .set_timings() operation recursively from the display device backwards, iterate over the devices manually in the DRM encoder code. This moves the complexity to a single central location and simplifies the logic in omap_dss_device drivers. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_encoder.c')
-rw-r--r--drivers/gpu/drm/omapdrm/omap_encoder.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_encoder.c b/drivers/gpu/drm/omapdrm/omap_encoder.c
index 749d21a92edd..452e625f6ce3 100644
--- a/drivers/gpu/drm/omapdrm/omap_encoder.c
+++ b/drivers/gpu/drm/omapdrm/omap_encoder.c
@@ -58,7 +58,6 @@ static void omap_encoder_mode_set(struct drm_encoder *encoder,
{
struct drm_device *dev = encoder->dev;
struct omap_encoder *omap_encoder = to_omap_encoder(encoder);
- struct omap_dss_device *display = omap_encoder->display;
struct drm_connector *connector;
struct omap_dss_device *dssdev;
struct videomode vm = { 0 };
@@ -104,18 +103,15 @@ static void omap_encoder_mode_set(struct drm_encoder *encoder,
}
}
- /*
- * HACK: Call the .set_timings() operation if available, this will
- * eventually store timings in the CRTC. Otherwise (for DSI outputs)
- * store the timings directly.
- *
- * All outputs should be brought in sync to operate similarly.
- */
- if (display->ops->set_timings)
- display->ops->set_timings(display, &vm);
- else
- *omap_crtc_timings(encoder->crtc) = vm;
+ /* Set timings for all devices in the display pipeline. */
+ dss_mgr_set_timings(omap_encoder->output, &vm);
+
+ for (dssdev = omap_encoder->output; dssdev; dssdev = dssdev->next) {
+ if (dssdev->ops->set_timings)
+ dssdev->ops->set_timings(dssdev, &vm);
+ }
+ /* Set the HDMI mode and HDMI infoframe if applicable. */
hdmi_mode = false;
list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
if (connector->encoder == encoder) {