[Intel-gfx] [PATCH] drm/i915/dsi: fix VBT send packet port selection for dual link DSI

Jani Nikula jani.nikula at linux.intel.com
Mon Nov 28 09:26:08 UTC 2022


On Sat, 26 Nov 2022, Mikko Kovanen <mikko.kovanen at aavamobile.com> wrote:
> intel_dsi->ports contains bitmask of enabled ports and correspondingly
> logic for selecting port for VBT packet sending must use port specific
> bitmask when deciding appropriate port.
>
> Fixes: 08c59dde71b7 ("drm/i915/dsi: fix VBT send packet port selection for ICL+")
> Cc: stable at vger.kernel.org
> Signed-off-by: Mikko Kovanen <mikko.kovanen at aavamobile.com>

Holy crap, that's embarrassing! Thanks!

Despite the mistake, it always works for single-link DSI as well as port
A on dual-link DSI, which probably covers most use cases. It's the
commands targeted at port B (VLV+ DSI) or port C (ICL+ DSI) that go
haywire.

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

> ---
>  drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dsi_vbt.c b/drivers/gpu/drm/i915/display/intel_dsi_vbt.c
> index 75e8cc4337c9..fce69fa446d5 100644
> --- a/drivers/gpu/drm/i915/display/intel_dsi_vbt.c
> +++ b/drivers/gpu/drm/i915/display/intel_dsi_vbt.c
> @@ -137,9 +137,9 @@ static enum port intel_dsi_seq_port_to_port(struct intel_dsi *intel_dsi,
>  		return ffs(intel_dsi->ports) - 1;
>  
>  	if (seq_port) {
> -		if (intel_dsi->ports & PORT_B)
> +		if (intel_dsi->ports & BIT(PORT_B))
>  			return PORT_B;
> -		else if (intel_dsi->ports & PORT_C)
> +		else if (intel_dsi->ports & BIT(PORT_C))
>  			return PORT_C;
>  	}

-- 
Jani Nikula, Intel Open Source Graphics Center


More information about the Intel-gfx mailing list