diff mbox series

[V6,5/9] drm/i915/dsi: Use private flags to indicate TE in cmd mode

Message ID 20200109110835.29764-6-vandita.kulkarni@intel.com (mailing list archive)
State New, archived
Headers show
Series Add support for mipi dsi cmd mode | expand

Commit Message

Kulkarni, Vandita Jan. 9, 2020, 11:08 a.m. UTC
On dsi cmd mode we do not receive vblanks instead
we would get TE and these flags indicate TE is expected on
which port.

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

Comments

Jani Nikula Jan. 17, 2020, 10:54 a.m. UTC | #1
On Thu, 09 Jan 2020, Vandita Kulkarni <vandita.kulkarni@intel.com> wrote:
> On dsi cmd mode we do not receive vblanks instead
> we would get TE and these flags indicate TE is expected on
> which port.
>
> Signed-off-by: Vandita Kulkarni <vandita.kulkarni@intel.com>

Reviewed-by: Jani Nikula <jani.nikula@intel.com>


> ---
>  drivers/gpu/drm/i915/display/icl_dsi.c | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/icl_dsi.c b/drivers/gpu/drm/i915/display/icl_dsi.c
> index 3ad8cedb5211..6f760ea316d8 100644
> --- a/drivers/gpu/drm/i915/display/icl_dsi.c
> +++ b/drivers/gpu/drm/i915/display/icl_dsi.c
> @@ -1502,6 +1502,24 @@ static int gen11_dsi_compute_config(struct intel_encoder *encoder,
>  	pipe_config->hw.adjusted_mode.private_flags &=
>  					~I915_MODE_FLAG_DSI_PERIODIC_CMD_MODE;
>  
> +	/*
> +	 * In case of TE GATE cmd mode, we
> +	 * receive TE from the slave if
> +	 * dual link is enabled
> +	 */
> +	if (is_cmd_mode(intel_dsi)) {
> +		if (intel_dsi->ports == (BIT(PORT_B) | BIT(PORT_A)))
> +			pipe_config->hw.adjusted_mode.private_flags |=
> +						I915_MODE_FLAG_DSI_USE_TE1 |
> +						I915_MODE_FLAG_DSI_USE_TE0;
> +		else if (intel_dsi->ports == BIT(PORT_B))
> +			pipe_config->hw.adjusted_mode.private_flags |=
> +						I915_MODE_FLAG_DSI_USE_TE1;
> +		else
> +			pipe_config->hw.adjusted_mode.private_flags |=
> +						I915_MODE_FLAG_DSI_USE_TE0;
> +	}
> +
>  	return 0;
>  }
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/icl_dsi.c b/drivers/gpu/drm/i915/display/icl_dsi.c
index 3ad8cedb5211..6f760ea316d8 100644
--- a/drivers/gpu/drm/i915/display/icl_dsi.c
+++ b/drivers/gpu/drm/i915/display/icl_dsi.c
@@ -1502,6 +1502,24 @@  static int gen11_dsi_compute_config(struct intel_encoder *encoder,
 	pipe_config->hw.adjusted_mode.private_flags &=
 					~I915_MODE_FLAG_DSI_PERIODIC_CMD_MODE;
 
+	/*
+	 * In case of TE GATE cmd mode, we
+	 * receive TE from the slave if
+	 * dual link is enabled
+	 */
+	if (is_cmd_mode(intel_dsi)) {
+		if (intel_dsi->ports == (BIT(PORT_B) | BIT(PORT_A)))
+			pipe_config->hw.adjusted_mode.private_flags |=
+						I915_MODE_FLAG_DSI_USE_TE1 |
+						I915_MODE_FLAG_DSI_USE_TE0;
+		else if (intel_dsi->ports == BIT(PORT_B))
+			pipe_config->hw.adjusted_mode.private_flags |=
+						I915_MODE_FLAG_DSI_USE_TE1;
+		else
+			pipe_config->hw.adjusted_mode.private_flags |=
+						I915_MODE_FLAG_DSI_USE_TE0;
+	}
+
 	return 0;
 }