[RESEND,3/7] drm/i915/dsi: add skip functions for spi and pmic elements

Submitted by Jani Nikula on June 13, 2016, 10:22 a.m.

Details

Message ID 1465813338-6706-3-git-send-email-jani.nikula@intel.com
State New
Headers show
Series "Series without cover letter" ( rev: 1 ) in Intel GFX

Not browsing as part of any series.

Commit Message

Jani Nikula June 13, 2016, 10:22 a.m.
In sequence block v3 these are gracefully skipped anyway, but add the
functions so we can have some debug breadcrumbs.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/intel_dsi_panel_vbt.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c b/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c
index 3e840a526f53..7dd850760c4d 100644
--- a/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c
+++ b/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c
@@ -344,6 +344,20 @@  static const u8 *mipi_exec_i2c(struct intel_dsi *intel_dsi, const u8 *data)
 	return data + *(data + 6) + 7;
 }
 
+static const u8 *mipi_exec_spi(struct intel_dsi *intel_dsi, const u8 *data)
+{
+	DRM_DEBUG_KMS("Skipping SPI element execution\n");
+
+	return data + *(data + 5) + 6;
+}
+
+static const u8 *mipi_exec_pmic(struct intel_dsi *intel_dsi, const u8 *data)
+{
+	DRM_DEBUG_KMS("Skipping PMIC element execution\n");
+
+	return data + 14;
+}
+
 typedef const u8 * (*fn_mipi_elem_exec)(struct intel_dsi *intel_dsi,
 					const u8 *data);
 static const fn_mipi_elem_exec exec_elem[] = {
@@ -351,6 +365,8 @@  static const fn_mipi_elem_exec exec_elem[] = {
 	[MIPI_SEQ_ELEM_DELAY] = mipi_exec_delay,
 	[MIPI_SEQ_ELEM_GPIO] = mipi_exec_gpio,
 	[MIPI_SEQ_ELEM_I2C] = mipi_exec_i2c,
+	[MIPI_SEQ_ELEM_SPI] = mipi_exec_spi,
+	[MIPI_SEQ_ELEM_PMIC] = mipi_exec_pmic,
 };
 
 /*

Comments

On Mon, Jun 13, 2016 at 01:22:14PM +0300, Jani Nikula wrote:
> In sequence block v3 these are gracefully skipped anyway, but add the
> functions so we can have some debug breadcrumbs.
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_dsi_panel_vbt.c | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c b/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c
> index 3e840a526f53..7dd850760c4d 100644
> --- a/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c
> +++ b/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c
> @@ -344,6 +344,20 @@ static const u8 *mipi_exec_i2c(struct intel_dsi *intel_dsi, const u8 *data)
>  	return data + *(data + 6) + 7;
>  }
>  
> +static const u8 *mipi_exec_spi(struct intel_dsi *intel_dsi, const u8 *data)
> +{
> +	DRM_DEBUG_KMS("Skipping SPI element execution\n");
> +
> +	return data + *(data + 5) + 6;
> +}
> +
> +static const u8 *mipi_exec_pmic(struct intel_dsi *intel_dsi, const u8 *data)
> +{
> +	DRM_DEBUG_KMS("Skipping PMIC element execution\n");
> +
> +	return data + 14;

Should that be 15?

> +}
> +
>  typedef const u8 * (*fn_mipi_elem_exec)(struct intel_dsi *intel_dsi,
>  					const u8 *data);
>  static const fn_mipi_elem_exec exec_elem[] = {
> @@ -351,6 +365,8 @@ static const fn_mipi_elem_exec exec_elem[] = {
>  	[MIPI_SEQ_ELEM_DELAY] = mipi_exec_delay,
>  	[MIPI_SEQ_ELEM_GPIO] = mipi_exec_gpio,
>  	[MIPI_SEQ_ELEM_I2C] = mipi_exec_i2c,
> +	[MIPI_SEQ_ELEM_SPI] = mipi_exec_spi,
> +	[MIPI_SEQ_ELEM_PMIC] = mipi_exec_pmic,
>  };
>  
>  /*
> -- 
> 2.1.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx