aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/dss
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2018-06-06 08:20:01 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2018-09-03 09:13:30 -0400
commitb4935e3a3cfa456b356e9714e75513be672c227e (patch)
tree46c33be0cd3cb1f039885b9feb39192dae33271e /drivers/gpu/drm/omapdrm/dss
parent26c91a3898f1fd52af4e90d03ad740586112a6f7 (diff)
drm/omap: Store bus flags in the omap_dss_device structure
Source components in the display pipeline need to configure their output signals polarities and clock driving edge based on the requirements of the sink component. Those requirements are currently shared across the whole pipeline in the flags of a videomode structure, instead of being local to each bus. This both prevents multiple buses from having different configurations (when the hardware supports it), and makes it difficult to move from videomode to drm_display_mode as the latter doesn't contain bus polarities and clock edge flags. Add a bus_flags field to the omap_dss_device structure and move the DISPLAY_FLAGS_DE_(LOW|HIGH), DISPLAY_FLAGS_PIXDATA_(POS|NEG)EDGE and DISPLAY_FLAGS_SYNC_(POS|NEG)EDGE videomode flags to bus_flags in all external encoders, connectors and panels. The videomode flags are still used internally for internal encoders, this will be addressed in a second step. The related videomode flags in the default mode of the DVI connector can simply be dropped, as they are always overridden by the TFP410 driver. Note that this results in both the DISPLAY_FLAGS_SYNC_POSEDGE and DISPLAY_FLAGS_SYNC_NEGEDGE flags being set, which is invalid, but only the former is tested for when programming the DISPC, so the DVI connector flags are effectively overridden by the TFP410 flags. 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/dss')
-rw-r--r--drivers/gpu/drm/omapdrm/dss/dsi.c9
-rw-r--r--drivers/gpu/drm/omapdrm/dss/omapdss.h1
-rw-r--r--drivers/gpu/drm/omapdrm/dss/sdi.c5
3 files changed, 6 insertions, 9 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c
index 0afefac4bf65..280f63081224 100644
--- a/drivers/gpu/drm/omapdrm/dss/dsi.c
+++ b/drivers/gpu/drm/omapdrm/dss/dsi.c
@@ -4053,12 +4053,6 @@ static int dsi_display_init_dispc(struct dsi_data *dsi)
4053 dsi->vm.flags |= DISPLAY_FLAGS_HSYNC_HIGH; 4053 dsi->vm.flags |= DISPLAY_FLAGS_HSYNC_HIGH;
4054 dsi->vm.flags &= ~DISPLAY_FLAGS_VSYNC_LOW; 4054 dsi->vm.flags &= ~DISPLAY_FLAGS_VSYNC_LOW;
4055 dsi->vm.flags |= DISPLAY_FLAGS_VSYNC_HIGH; 4055 dsi->vm.flags |= DISPLAY_FLAGS_VSYNC_HIGH;
4056 dsi->vm.flags &= ~DISPLAY_FLAGS_PIXDATA_NEGEDGE;
4057 dsi->vm.flags |= DISPLAY_FLAGS_PIXDATA_POSEDGE;
4058 dsi->vm.flags &= ~DISPLAY_FLAGS_DE_LOW;
4059 dsi->vm.flags |= DISPLAY_FLAGS_DE_HIGH;
4060 dsi->vm.flags &= ~DISPLAY_FLAGS_SYNC_POSEDGE;
4061 dsi->vm.flags |= DISPLAY_FLAGS_SYNC_NEGEDGE;
4062 4056
4063 dss_mgr_set_timings(&dsi->output, &dsi->vm); 4057 dss_mgr_set_timings(&dsi->output, &dsi->vm);
4064 4058
@@ -5142,6 +5136,9 @@ static int dsi_init_output(struct dsi_data *dsi)
5142 out->ops = &dsi_ops; 5136 out->ops = &dsi_ops;
5143 out->owner = THIS_MODULE; 5137 out->owner = THIS_MODULE;
5144 out->of_ports = BIT(0); 5138 out->of_ports = BIT(0);
5139 out->bus_flags = DRM_BUS_FLAG_PIXDATA_POSEDGE
5140 | DRM_BUS_FLAG_DE_HIGH
5141 | DRM_BUS_FLAG_SYNC_NEGEDGE;
5145 5142
5146 out->next = omapdss_of_find_connected_device(out->dev->of_node, 0); 5143 out->next = omapdss_of_find_connected_device(out->dev->of_node, 0);
5147 if (IS_ERR(out->next)) { 5144 if (IS_ERR(out->next)) {
diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss.h b/drivers/gpu/drm/omapdrm/dss/omapdss.h
index 87306014a53a..251e092dfb05 100644
--- a/drivers/gpu/drm/omapdrm/dss/omapdss.h
+++ b/drivers/gpu/drm/omapdrm/dss/omapdss.h
@@ -432,6 +432,7 @@ struct omap_dss_device {
432 const struct omap_dss_driver *driver; 432 const struct omap_dss_driver *driver;
433 const struct omap_dss_device_ops *ops; 433 const struct omap_dss_device_ops *ops;
434 unsigned long ops_flags; 434 unsigned long ops_flags;
435 unsigned long bus_flags;
435 436
436 /* helper variable for driver suspend/resume */ 437 /* helper variable for driver suspend/resume */
437 bool activate_after_resume; 438 bool activate_after_resume;
diff --git a/drivers/gpu/drm/omapdrm/dss/sdi.c b/drivers/gpu/drm/omapdrm/dss/sdi.c
index 3b5f97932475..8e111afe5958 100644
--- a/drivers/gpu/drm/omapdrm/dss/sdi.c
+++ b/drivers/gpu/drm/omapdrm/dss/sdi.c
@@ -151,9 +151,6 @@ static int sdi_display_enable(struct omap_dss_device *dssdev)
151 if (r) 151 if (r)
152 goto err_get_dispc; 152 goto err_get_dispc;
153 153
154 /* 15.5.9.1.2 */
155 vm->flags |= DISPLAY_FLAGS_PIXDATA_POSEDGE | DISPLAY_FLAGS_SYNC_POSEDGE;
156
157 r = sdi_calc_clock_div(sdi, vm->pixelclock, &fck, &dispc_cinfo); 154 r = sdi_calc_clock_div(sdi, vm->pixelclock, &fck, &dispc_cinfo);
158 if (r) 155 if (r)
159 goto err_calc_clock_div; 156 goto err_calc_clock_div;
@@ -298,6 +295,8 @@ static int sdi_init_output(struct sdi_device *sdi)
298 out->of_ports = BIT(1); 295 out->of_ports = BIT(1);
299 out->ops = &sdi_ops; 296 out->ops = &sdi_ops;
300 out->owner = THIS_MODULE; 297 out->owner = THIS_MODULE;
298 out->bus_flags = DRM_BUS_FLAG_PIXDATA_POSEDGE /* 15.5.9.1.2 */
299 | DRM_BUS_FLAG_SYNC_POSEDGE;
301 300
302 out->next = omapdss_of_find_connected_device(out->dev->of_node, 1); 301 out->next = omapdss_of_find_connected_device(out->dev->of_node, 1);
303 if (IS_ERR(out->next)) { 302 if (IS_ERR(out->next)) {