diff mbox series

[2/6] drm/i915/icl: Use the same pll functions for dsi

Message ID 1543311548-19149-3-git-send-email-vandita.kulkarni@intel.com (mailing list archive)
State New, archived
Headers show
Series ICL DSI PLL enable | expand

Commit Message

Kulkarni, Vandita Nov. 27, 2018, 9:39 a.m. UTC
The same pll manager functions can be used to enable
dpll for mipi. Hence enabling the IO power and
esc clock as part of pre pll enable call.

Signed-off-by: Vandita Kulkarni <vandita.kulkarni@intel.com>
---
 drivers/gpu/drm/i915/icl_dsi.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

Comments

Chauhan, Madhav Nov. 27, 2018, 10:48 a.m. UTC | #1
> -----Original Message-----
> From: Kulkarni, Vandita
> Sent: Tuesday, November 27, 2018 3:09 PM
> To: intel-gfx@lists.freedesktop.org
> Cc: Chauhan, Madhav <madhav.chauhan@intel.com>; Nikula, Jani
> <jani.nikula@intel.com>; Syrjala, Ville <ville.syrjala@intel.com>; Kulkarni,
> Vandita <vandita.kulkarni@intel.com>
> Subject: [PATCH 2/6] drm/i915/icl: Use the same pll functions for dsi
> 
> The same pll manager functions can be used to enable dpll for mipi. Hence
> enabling the IO power and esc clock as part of pre pll enable call.
> 
> Signed-off-by: Vandita Kulkarni <vandita.kulkarni@intel.com>
> ---
>  drivers/gpu/drm/i915/icl_dsi.c | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/icl_dsi.c b/drivers/gpu/drm/i915/icl_dsi.c
> index 89ede31..8590825 100644
> --- a/drivers/gpu/drm/i915/icl_dsi.c
> +++ b/drivers/gpu/drm/i915/icl_dsi.c
> @@ -924,17 +924,22 @@ static void gen11_dsi_powerup_panel(struct
> intel_encoder *encoder)
>  	wait_for_cmds_dispatched_to_panel(encoder);
>  }
> 
> -static void gen11_dsi_pre_enable(struct intel_encoder *encoder,
> +static void gen11_dsi_pre_pll_enable(struct intel_encoder *encoder,
>  				 const struct intel_crtc_state *pipe_config,
>  				 const struct drm_connector_state

Correct the alignment of pipe_config and connector_state.
With that fix,
Reviewed-by: Madhav Chauhan <madhav.chauhan@intel.com>

Regards,
Madhav

> *conn_state)  {
> -	struct intel_dsi *intel_dsi = enc_to_intel_dsi(&encoder->base);
> -
>  	/* step2: enable IO power */
>  	gen11_dsi_enable_io_power(encoder);
> 
>  	/* step3: enable DSI PLL */
>  	gen11_dsi_program_esc_clk_div(encoder);
> +}
> +
> +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->base);
> 
>  	/* step4: enable DSI port and DPHY */
>  	gen11_dsi_enable_port_and_phy(encoder, pipe_config); @@ -
> 1305,6 +1310,7 @@ void icl_dsi_init(struct drm_i915_private *dev_priv)
>  			 DRM_MODE_ENCODER_DSI, "DSI %c",
> port_name(port));
> 
>  	encoder->pre_enable = gen11_dsi_pre_enable;
> +	encoder->pre_pll_enable = gen11_dsi_pre_pll_enable;
>  	encoder->disable = gen11_dsi_disable;
>  	encoder->port = port;
>  	encoder->get_config = gen11_dsi_get_config;
> --
> 1.9.1
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/icl_dsi.c b/drivers/gpu/drm/i915/icl_dsi.c
index 89ede31..8590825 100644
--- a/drivers/gpu/drm/i915/icl_dsi.c
+++ b/drivers/gpu/drm/i915/icl_dsi.c
@@ -924,17 +924,22 @@  static void gen11_dsi_powerup_panel(struct intel_encoder *encoder)
 	wait_for_cmds_dispatched_to_panel(encoder);
 }
 
-static void gen11_dsi_pre_enable(struct intel_encoder *encoder,
+static void gen11_dsi_pre_pll_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->base);
-
 	/* step2: enable IO power */
 	gen11_dsi_enable_io_power(encoder);
 
 	/* step3: enable DSI PLL */
 	gen11_dsi_program_esc_clk_div(encoder);
+}
+
+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->base);
 
 	/* step4: enable DSI port and DPHY */
 	gen11_dsi_enable_port_and_phy(encoder, pipe_config);
@@ -1305,6 +1310,7 @@  void icl_dsi_init(struct drm_i915_private *dev_priv)
 			 DRM_MODE_ENCODER_DSI, "DSI %c", port_name(port));
 
 	encoder->pre_enable = gen11_dsi_pre_enable;
+	encoder->pre_pll_enable = gen11_dsi_pre_pll_enable;
 	encoder->disable = gen11_dsi_disable;
 	encoder->port = port;
 	encoder->get_config = gen11_dsi_get_config;