aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/omap_encoder.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2018-06-07 12:55:04 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2018-09-03 09:13:30 -0400
commit6ea48430952323091194100d48c5610b9cd286b4 (patch)
tree25b8e6fa2fea6338ef76de63e42ede79452fc670 /drivers/gpu/drm/omapdrm/omap_encoder.c
parentd8dbe79143764b86bd04c63c044431565582a22d (diff)
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,
58{ 58{
59 struct drm_device *dev = encoder->dev; 59 struct drm_device *dev = encoder->dev;
60 struct omap_encoder *omap_encoder = to_omap_encoder(encoder); 60 struct omap_encoder *omap_encoder = to_omap_encoder(encoder);
61 struct omap_dss_device *display = omap_encoder->display;
62 struct drm_connector *connector; 61 struct drm_connector *connector;
63 struct omap_dss_device *dssdev; 62 struct omap_dss_device *dssdev;
64 struct videomode vm = { 0 }; 63 struct videomode vm = { 0 };
@@ -104,18 +103,15 @@ static void omap_encoder_mode_set(struct drm_encoder *encoder,
104 } 103 }
105 } 104 }
106 105
107 /* 106 /* Set timings for all devices in the display pipeline. */
108 * HACK: Call the .set_timings() operation if available, this will 107 dss_mgr_set_timings(omap_encoder->output, &vm);
109 * eventually store timings in the CRTC. Otherwise (for DSI outputs) 108
110 * store the timings directly. 109 for (dssdev = omap_encoder->output; dssdev; dssdev = dssdev->next) {
111 * 110 if (dssdev->ops->set_timings)
112 * All outputs should be brought in sync to operate similarly. 111 dssdev->ops->set_timings(dssdev, &vm);
113 */ 112 }
114 if (display->ops->set_timings)
115 display->ops->set_timings(display, &vm);
116 else
117 *omap_crtc_timings(encoder->crtc) = vm;
118 113
114 /* Set the HDMI mode and HDMI infoframe if applicable. */
119 hdmi_mode = false; 115 hdmi_mode = false;
120 list_for_each_entry(connector, &dev->mode_config.connector_list, head) { 116 list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
121 if (connector->encoder == encoder) { 117 if (connector->encoder == encoder) {