]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915/dsi: Enable ICL DSI transcoder as part of encoder->enable
authorVandita Kulkarni <vandita.kulkarni@intel.com>
Tue, 28 Jan 2020 16:28:49 +0000 (18:28 +0200)
committerJani Nikula <jani.nikula@intel.com>
Fri, 31 Jan 2020 08:56:44 +0000 (10:56 +0200)
Enable the dsi transcoder, panel and backlight as part of
encoder->enable and not encoder->pre_enable. We need to have pipe src
size, among other things, set before enabling the transcoder, to avoid
FIFO underruns and possibly other issues.

v2 by Jani:
- Rebase on the crtc enable sequence update

Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Signed-off-by: Vandita Kulkarni <vandita.kulkarni@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200128162850.8660-2-jani.nikula@intel.com
drivers/gpu/drm/i915/display/icl_dsi.c

index 4cf9054b49d257acb1fc87bae9f45be91f4d1018..76e9ebe499f3d92dc240bbff103d68f3c43bbd11 100644 (file)
@@ -1103,8 +1103,6 @@ static void gen11_dsi_pre_enable(struct intel_encoder *encoder,
                                 const struct intel_crtc_state *pipe_config,
                                 const struct drm_connector_state *conn_state)
 {
-       struct intel_dsi *intel_dsi = enc_to_intel_dsi(encoder);
-
        /* step3b */
        gen11_dsi_map_pll(encoder, pipe_config);
 
@@ -1118,21 +1116,23 @@ static void gen11_dsi_pre_enable(struct intel_encoder *encoder,
 
        /* step6c: configure transcoder timings */
        gen11_dsi_set_transcoder_timings(encoder, pipe_config);
-
-       /* step6d: enable dsi transcoder */
-       gen11_dsi_enable_transcoder(encoder);
-
-       /* step7: enable backlight */
-       intel_panel_enable_backlight(pipe_config, conn_state);
-       intel_dsi_vbt_exec_sequence(intel_dsi, MIPI_SEQ_BACKLIGHT_ON);
 }
 
 static void gen11_dsi_enable(struct intel_encoder *encoder,
                             const struct intel_crtc_state *crtc_state,
                             const struct drm_connector_state *conn_state)
 {
+       struct intel_dsi *intel_dsi = enc_to_intel_dsi(encoder);
+
        WARN_ON(crtc_state->has_pch_encoder);
 
+       /* step6d: enable dsi transcoder */
+       gen11_dsi_enable_transcoder(encoder);
+
+       /* step7: enable backlight */
+       intel_panel_enable_backlight(crtc_state, conn_state);
+       intel_dsi_vbt_exec_sequence(intel_dsi, MIPI_SEQ_BACKLIGHT_ON);
+
        intel_crtc_vblank_on(crtc_state);
 }