All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm/i915/dsi: log send packet sequence errors
Date: Tue, 28 Oct 2025 18:38:26 +0200	[thread overview]
Message-ID: <aQDxgg586x37nUUO@intel.com> (raw)
In-Reply-To: <20251028155712.1824565-1-jani.nikula@intel.com>

On Tue, Oct 28, 2025 at 05:57:11PM +0200, Jani Nikula wrote:
> We might be getting send packet sequence errors and never know. Log
> them.
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 24 ++++++++++++--------
>  1 file changed, 15 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dsi_vbt.c b/drivers/gpu/drm/i915/display/intel_dsi_vbt.c
> index 23402408e172..748e5462bd95 100644
> --- a/drivers/gpu/drm/i915/display/intel_dsi_vbt.c
> +++ b/drivers/gpu/drm/i915/display/intel_dsi_vbt.c
> @@ -106,6 +106,7 @@ static const u8 *mipi_exec_send_packet(struct intel_dsi *intel_dsi,
>  	u8 type, flags, seq_port;
>  	u16 len;
>  	enum port port;
> +	ssize_t ret;
>  
>  	drm_dbg_kms(display->drm, "\n");
>  
> @@ -138,36 +139,41 @@ static const u8 *mipi_exec_send_packet(struct intel_dsi *intel_dsi,
>  
>  	switch (type) {
>  	case MIPI_DSI_GENERIC_SHORT_WRITE_0_PARAM:
> -		mipi_dsi_generic_write(dsi_device, NULL, 0);
> +		ret = mipi_dsi_generic_write(dsi_device, NULL, 0);
>  		break;
>  	case MIPI_DSI_GENERIC_SHORT_WRITE_1_PARAM:
> -		mipi_dsi_generic_write(dsi_device, data, 1);
> +		ret = mipi_dsi_generic_write(dsi_device, data, 1);
>  		break;
>  	case MIPI_DSI_GENERIC_SHORT_WRITE_2_PARAM:
> -		mipi_dsi_generic_write(dsi_device, data, 2);
> +		ret = mipi_dsi_generic_write(dsi_device, data, 2);
>  		break;
>  	case MIPI_DSI_GENERIC_READ_REQUEST_0_PARAM:
>  	case MIPI_DSI_GENERIC_READ_REQUEST_1_PARAM:
>  	case MIPI_DSI_GENERIC_READ_REQUEST_2_PARAM:
> -		drm_dbg_kms(display->drm, "Generic Read not yet implemented or used\n");
> +		ret = -EOPNOTSUPP;
>  		break;
>  	case MIPI_DSI_GENERIC_LONG_WRITE:
> -		mipi_dsi_generic_write(dsi_device, data, len);
> +		ret = mipi_dsi_generic_write(dsi_device, data, len);
>  		break;
>  	case MIPI_DSI_DCS_SHORT_WRITE:
> -		mipi_dsi_dcs_write_buffer(dsi_device, data, 1);
> +		ret = mipi_dsi_dcs_write_buffer(dsi_device, data, 1);
>  		break;
>  	case MIPI_DSI_DCS_SHORT_WRITE_PARAM:
> -		mipi_dsi_dcs_write_buffer(dsi_device, data, 2);
> +		ret = mipi_dsi_dcs_write_buffer(dsi_device, data, 2);
>  		break;
>  	case MIPI_DSI_DCS_READ:
> -		drm_dbg_kms(display->drm, "DCS Read not yet implemented or used\n");
> +		ret = -EOPNOTSUPP;
>  		break;
>  	case MIPI_DSI_DCS_LONG_WRITE:
> -		mipi_dsi_dcs_write_buffer(dsi_device, data, len);
> +		ret = mipi_dsi_dcs_write_buffer(dsi_device, data, len);
>  		break;
>  	}
>  
> +	if (ret == -EOPNOTSUPP)

Do we know that the write functions never return this value?

> +		drm_dbg_kms(display->drm, "DSI read not supported\n");

Is there a reason you didn't make this a drm_err() as well?

We also have other debug messages related to unimplemented/unknown
sequences/etc that I think should all be drm_err(). Otherwise we'll
never find out if they're needed or not.

> +	else if (ret < 0)
> +		drm_err(display->drm, "DSI write failed with %pe\n", ERR_PTR(ret));
> +
>  	if (DISPLAY_VER(display) < 11)
>  		vlv_dsi_wait_for_fifo_empty(intel_dsi, port);
>  
> -- 
> 2.47.3

-- 
Ville Syrjälä
Intel

  parent reply	other threads:[~2025-10-28 16:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-28 15:57 [PATCH 1/2] drm/i915/dsi: log send packet sequence errors Jani Nikula
2025-10-28 15:57 ` [PATCH 2/2] drm/i915/dsi: debug log send packet sequence contents Jani Nikula
2025-10-28 18:03   ` Ville Syrjälä
2025-10-28 16:38 ` Ville Syrjälä [this message]
2025-10-28 16:46 ` ✓ i915.CI.BAT: success for series starting with [1/2] drm/i915/dsi: log send packet sequence errors Patchwork
2025-10-28 18:29 ` ✓ CI.KUnit: " Patchwork
2025-10-28 19:09 ` ✓ Xe.CI.BAT: " Patchwork
2025-10-29  0:46 ` ✗ i915.CI.Full: failure " Patchwork
2025-10-29  5:13 ` ✗ Xe.CI.Full: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aQDxgg586x37nUUO@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.