On Tue, Oct 28, 2025 at 05:57:12PM +0200, Jani Nikula wrote:
> This might help debug issues better than just debug logging the function
> name.
> 
> Signed-off-by: Jani Nikula <[email protected]>
> ---
>  drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dsi_vbt.c 
> b/drivers/gpu/drm/i915/display/intel_dsi_vbt.c
> index 748e5462bd95..2528c0996c25 100644
> --- a/drivers/gpu/drm/i915/display/intel_dsi_vbt.c
> +++ b/drivers/gpu/drm/i915/display/intel_dsi_vbt.c
> @@ -107,8 +107,7 @@ static const u8 *mipi_exec_send_packet(struct intel_dsi 
> *intel_dsi,
>       u16 len;
>       enum port port;
>       ssize_t ret;
> -
> -     drm_dbg_kms(display->drm, "\n");
> +     bool hs_mode;
>  
>       flags = *data++;
>       type = *data++;
> @@ -130,13 +129,18 @@ static const u8 *mipi_exec_send_packet(struct intel_dsi 
> *intel_dsi,
>               goto out;
>       }
>  
> -     if ((flags >> MIPI_TRANSFER_MODE_SHIFT) & 1)
> +     hs_mode = (flags >> MIPI_TRANSFER_MODE_SHIFT) & 1;
> +     if (hs_mode)
>               dsi_device->mode_flags &= ~MIPI_DSI_MODE_LPM;
>       else
>               dsi_device->mode_flags |= MIPI_DSI_MODE_LPM;
>  
>       dsi_device->channel = (flags >> MIPI_VIRTUAL_CHANNEL_SHIFT) & 3;
>  
> +     drm_dbg_kms(display->drm, "DSI packet: Port %c (seq %u), Flags 0x%02x, 
> VC %u, %s, Type %u, Length %u, Data %*ph\n",
> +                 port_name(port), seq_port, flags, dsi_device->channel,
> +                 hs_mode ? "HS" : "LP", type, len, (int)len, data);

We're printing the type as hex in igt, and looks like the enum uses
hex as well, and the DSI spec has both hex and binary. So seems to
me that hex would be the best way to go here too.

Otherwise lgtm
Reviewed-by: Ville Syrjälä <[email protected]>

> +
>       switch (type) {
>       case MIPI_DSI_GENERIC_SHORT_WRITE_0_PARAM:
>               ret = mipi_dsi_generic_write(dsi_device, NULL, 0);
> -- 
> 2.47.3

-- 
Ville Syrjälä
Intel

Reply via email to