From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 366E734AB06 for ; Wed, 8 Apr 2026 16:13:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775664808; cv=none; b=oCt6k0cxxh5UteuYZj5oHzNzhQEpu0cAdxPxMpMMyBOYCkgxx5ts3c0pvk2WREyQQU1/UWihDHKVaBbbFupbL13nlF7ZCAdufGZm1gtLajvg/5qBWRgLlv/jLHlb0SWcJ5i2hkBjfQYy+oySy613c6p7MO8iQN97JBj1KWL02Fo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775664808; c=relaxed/simple; bh=gdIQNJjsl/QDZ9gvVijBXE8P1nBxYd0klMibaIjX+iA=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:Cc:To:From: References:In-Reply-To; b=UFdURJuZueKQ3ZD6o3HtOBLf+UQnIef2KHBXVqHSo8rzKVYws4tjyyxktYsHg+dYbJwSsx61UdvV5+Qm1ou5szBqc5c/6tfAvnO4Av+f+C4k+YsJVAxswSbAxZBKX/mr9gFYS1wAjwv6bnGn3IHPXWrB4CwWq/UH1WJQlwZ0toU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=fe7dq0uA; arc=none smtp.client-ip=185.171.202.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="fe7dq0uA" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id C87A9C5AA9A; Wed, 8 Apr 2026 16:13:56 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 6F132603CE; Wed, 8 Apr 2026 16:13:22 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 4291E10450178; Wed, 8 Apr 2026 18:13:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1775664801; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=MRJccs/yXhZXrol0PlFNh+O96bobEH1wbfkeJR4WMXo=; b=fe7dq0uAeunZo9tbVAmLRxBBtb3GuAIYN5p7j9dsg2braHMsWcRATiugINedke7jdsF7H2 jWy4DWMhNnY6c2SJVBMDo/axBrMpcNSIQ8+vY3Nk3PKRZVcCYq6miJu7AMgHo8A0PSc8XK TjsFouHXTDDImpJia1MkbEt2aIPaKGPktJtXlyzUeKfpNfOUWIrTdVFhpbis4MO+TSXM8b RE9aW1xGh+u9vAOmiYU4uMJbFzZ5Tg38grgVHIe2gdmlBYNBlqmGrRRbMkDgQ+KbnBgfIx qAa7Sjc8+23dxHNg3Mh8qbRv/k14q4eNMTOW1hm98ToU1KzLyfAstms0xAe3Kg== Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 08 Apr 2026 18:13:16 +0200 Message-Id: Subject: Re: [PATCH 3/3] drm/bridge: ti-sn65dsi83: add test pattern generation support Cc: "Thomas Petazzoni" , , To: "Louis Chauvet" , "Andrzej Hajda" , "Neil Armstrong" , "Robert Foss" , "Laurent Pinchart" , "Jonas Karlman" , "Jernej Skrabec" , "Maarten Lankhorst" , "Maxime Ripard" , "Thomas Zimmermann" , "David Airlie" , "Simona Vetter" , "Frieder Schrempf" , "Marek Vasut" , "Linus Walleij" From: "Luca Ceresoli" X-Mailer: aerc 0.20.1 References: <20260226-ti-sn65dsi83-dual-lvds-fixes-and-test-pattern-v1-0-2e15f5a9a6a0@bootlin.com> <20260226-ti-sn65dsi83-dual-lvds-fixes-and-test-pattern-v1-3-2e15f5a9a6a0@bootlin.com> In-Reply-To: X-Last-TLS-Session-Version: TLSv1.3 Hi Louis, On Wed Apr 8, 2026 at 5:40 PM CEST, Louis Chauvet wrote: >> @@ -645,7 +649,11 @@ static void sn65dsi83_atomic_pre_enable(struct drm_= bridge *bridge, >> REG_LVDS_LANE_CHB_LVDS_TERM : 0)); >> regmap_write(ctx->regmap, REG_LVDS_CM, 0x00); >> >> - le16val =3D cpu_to_le16(mode->hdisplay); >> + /* >> + * Active line length needs to be halved for test pattern >> + * generation in dual LVDS output. >> + */ >> + le16val =3D cpu_to_le16(mode->hdisplay / (sn65dsi83_test_pattern ? 2 := 1)); > > This will always half the line length, even for "mono" LVDS output no? > From the comment I expect something like > > if (dual && test_pattern) > val =3D hdisplay/2 > else > val =3D hdisplay Aargh, my bad! I think what my brain wanted to write was rather: le16val =3D cpu_to_le16(mode->hdisplay / (sn65dsi83_test_pattern ? dual_= factor : 1)); ^^^^^^^= ^^^^ which is equivalent to your code. Will fix in v3. Thanks for the thourough review! Luca -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com