diff options
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_encoder.c')
| -rw-r--r-- | drivers/gpu/drm/omapdrm/omap_encoder.c | 83 | 
1 files changed, 5 insertions, 78 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_encoder.c b/drivers/gpu/drm/omapdrm/omap_encoder.c index 4f2165a37795..ae4b867a67a3 100644 --- a/drivers/gpu/drm/omapdrm/omap_encoder.c +++ b/drivers/gpu/drm/omapdrm/omap_encoder.c @@ -10,7 +10,6 @@  #include <drm/drm_crtc.h>  #include <drm/drm_modeset_helper_vtables.h>  #include <drm/drm_edid.h> -#include <drm/drm_panel.h>  #include "omap_drv.h" @@ -70,30 +69,6 @@ static void omap_encoder_update_videomode_flags(struct videomode *vm,  	}  } -static void omap_encoder_hdmi_mode_set(struct drm_connector *connector, -				       struct drm_encoder *encoder, -				       struct drm_display_mode *adjusted_mode) -{ -	struct omap_encoder *omap_encoder = to_omap_encoder(encoder); -	struct omap_dss_device *dssdev = omap_encoder->output; -	bool hdmi_mode; - -	hdmi_mode = omap_connector_get_hdmi_mode(connector); - -	if (dssdev->ops->hdmi.set_hdmi_mode) -		dssdev->ops->hdmi.set_hdmi_mode(dssdev, hdmi_mode); - -	if (hdmi_mode && dssdev->ops->hdmi.set_infoframe) { -		struct hdmi_avi_infoframe avi; -		int r; - -		r = drm_hdmi_avi_infoframe_from_display_mode(&avi, connector, -							     adjusted_mode); -		if (r == 0) -			dssdev->ops->hdmi.set_infoframe(dssdev, &avi); -	} -} -  static void omap_encoder_mode_set(struct drm_encoder *encoder,  				  struct drm_display_mode *mode,  				  struct drm_display_mode *adjusted_mode) @@ -138,17 +113,8 @@ static void omap_encoder_mode_set(struct drm_encoder *encoder,  	bus_flags = connector->display_info.bus_flags;  	omap_encoder_update_videomode_flags(&vm, bus_flags); -	/* Set timings for all devices in the display pipeline. */ +	/* Set timings for the dss manager. */  	dss_mgr_set_timings(output, &vm); - -	for (dssdev = output; dssdev; dssdev = dssdev->next) { -		if (dssdev->ops->set_timings) -			dssdev->ops->set_timings(dssdev, adjusted_mode); -	} - -	/* Set the HDMI mode and HDMI infoframe if applicable. */ -	if (output->type == OMAP_DISPLAY_TYPE_HDMI) -		omap_encoder_hdmi_mode_set(connector, encoder, adjusted_mode);  }  static void omap_encoder_disable(struct drm_encoder *encoder) @@ -159,33 +125,12 @@ static void omap_encoder_disable(struct drm_encoder *encoder)  	dev_dbg(dev->dev, "disable(%s)\n", dssdev->name); -	/* Disable the panel if present. */ -	if (dssdev->panel) { -		drm_panel_disable(dssdev->panel); -		drm_panel_unprepare(dssdev->panel); -	} -  	/*  	 * Disable the chain of external devices, starting at the one at the -	 * internal encoder's output. +	 * internal encoder's output. This is used for DSI outputs only, as +	 * dssdev->next is NULL for all other outputs.  	 */  	omapdss_device_disable(dssdev->next); - -	/* -	 * Disable the internal encoder. This will disable the DSS output. The -	 * DSI is treated as an exception as DSI pipelines still use the legacy -	 * flow where the pipeline output controls the encoder. -	 */ -	if (dssdev->type != OMAP_DISPLAY_TYPE_DSI) { -		dssdev->ops->disable(dssdev); -		dssdev->state = OMAP_DSS_DISPLAY_DISABLED; -	} - -	/* -	 * Perform the post-disable operations on the chain of external devices -	 * to complete the display pipeline disable. -	 */ -	omapdss_device_post_disable(dssdev->next);  }  static void omap_encoder_enable(struct drm_encoder *encoder) @@ -196,30 +141,12 @@ static void omap_encoder_enable(struct drm_encoder *encoder)  	dev_dbg(dev->dev, "enable(%s)\n", dssdev->name); -	/* Prepare the chain of external devices for pipeline enable. */ -	omapdss_device_pre_enable(dssdev->next); - -	/* -	 * Enable the internal encoder. This will enable the DSS output. The -	 * DSI is treated as an exception as DSI pipelines still use the legacy -	 * flow where the pipeline output controls the encoder. -	 */ -	if (dssdev->type != OMAP_DISPLAY_TYPE_DSI) { -		dssdev->ops->enable(dssdev); -		dssdev->state = OMAP_DSS_DISPLAY_ACTIVE; -	} -  	/*  	 * Enable the chain of external devices, starting at the one at the -	 * internal encoder's output. +	 * internal encoder's output. This is used for DSI outputs only, as +	 * dssdev->next is NULL for all other outputs.  	 */  	omapdss_device_enable(dssdev->next); - -	/* Enable the panel if present. */ -	if (dssdev->panel) { -		drm_panel_prepare(dssdev->panel); -		drm_panel_enable(dssdev->panel); -	}  }  static int omap_encoder_atomic_check(struct drm_encoder *encoder,  |