aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/omap_encoder.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2018-12-10 07:00:38 -0500
committerTomi Valkeinen <tomi.valkeinen@ti.com>2019-03-18 05:42:13 -0400
commit0dbfc396672025d3ef8bacc934b80a5463e75c6d (patch)
tree91ac4d0771a6996daf7c40c0d695cbd2ef1aed2f /drivers/gpu/drm/omapdrm/omap_encoder.c
parenta4e26525cacb5154a0e00415aa3f889ee5d295db (diff)
drm/omap: Merge omap_dss_device type and output_type fields
The omap_dss_device type and output_type fields differ mostly for historical reasons. The output_type field is required for all devices but the display at the end of the pipeline, and must be set to OMAP_DISPLAY_TYPE_NONE for the latter. The type field is required for all devices but the internal encoder, for which it is ignored. The only reason why the output_type field must be set to OMAP_DISPLAY_TYPE_NONE for the display at the end of the pipeline is to identify omap_dss_device instances corresponding to displays. This is not documented and confusing. Clean the code by adding a new display field to the omap_dss_device structure to identify displays, and merge the type and output_type fields. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> Tested-by: Sebastian Reichel <sebastian.reichel@collabora.com> 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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_encoder.c b/drivers/gpu/drm/omapdrm/omap_encoder.c
index 367234de5dc7..42748479d374 100644
--- a/drivers/gpu/drm/omapdrm/omap_encoder.c
+++ b/drivers/gpu/drm/omapdrm/omap_encoder.c
@@ -138,7 +138,7 @@ static void omap_encoder_mode_set(struct drm_encoder *encoder,
138 } 138 }
139 139
140 /* Set the HDMI mode and HDMI infoframe if applicable. */ 140 /* Set the HDMI mode and HDMI infoframe if applicable. */
141 if (omap_encoder->output->output_type == OMAP_DISPLAY_TYPE_HDMI) 141 if (omap_encoder->output->type == OMAP_DISPLAY_TYPE_HDMI)
142 omap_encoder_hdmi_mode_set(encoder, adjusted_mode); 142 omap_encoder_hdmi_mode_set(encoder, adjusted_mode);
143} 143}
144 144
@@ -161,7 +161,7 @@ static void omap_encoder_disable(struct drm_encoder *encoder)
161 * DSI is treated as an exception as DSI pipelines still use the legacy 161 * DSI is treated as an exception as DSI pipelines still use the legacy
162 * flow where the pipeline output controls the encoder. 162 * flow where the pipeline output controls the encoder.
163 */ 163 */
164 if (dssdev->output_type != OMAP_DISPLAY_TYPE_DSI) { 164 if (dssdev->type != OMAP_DISPLAY_TYPE_DSI) {
165 dssdev->ops->disable(dssdev); 165 dssdev->ops->disable(dssdev);
166 dssdev->state = OMAP_DSS_DISPLAY_DISABLED; 166 dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
167 } 167 }
@@ -189,7 +189,7 @@ static void omap_encoder_enable(struct drm_encoder *encoder)
189 * DSI is treated as an exception as DSI pipelines still use the legacy 189 * DSI is treated as an exception as DSI pipelines still use the legacy
190 * flow where the pipeline output controls the encoder. 190 * flow where the pipeline output controls the encoder.
191 */ 191 */
192 if (dssdev->output_type != OMAP_DISPLAY_TYPE_DSI) { 192 if (dssdev->type != OMAP_DISPLAY_TYPE_DSI) {
193 dssdev->ops->enable(dssdev); 193 dssdev->ops->enable(dssdev);
194 dssdev->state = OMAP_DSS_DISPLAY_ACTIVE; 194 dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
195 } 195 }