From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796392086; b=YNpaMdQSRx268+XvqMppgM0vAm1FLY8NuHG3dYuwd1v8UepzLY0aeR3ktQGrWQQ9rVaX mUoQfDCAxpSyRlZtH7sP5jr4WYlkYEJb2baXpXk+cJ9zoEVD+9H8MEfua8AsVWf3wdQc7 itu/pESImGlLES1OtiSfX/zSpka4B1EKNxqOaiO6oXkttPDGc+mXIJUUCZLwW+LB3QAzU tsIheSVm0FTcCeJSu1J0aTVhvuYTdh2zLgcuzp8YNFQ3FgI31cMujMDHiOQFZeEoMMZtG K6V2lgj2DefUFgm6wqQ7utyznhkKgn71YeRH8yLYApKgXoGIgqbhyXSVt0fdFHx82aA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796392086; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=KFiEQz4dosUixoFBu39XfJNoZmIHYLw1Ua9t5v4UJUs=; b=uIiWNzTEITAx59te2660Zz4m5Ikn/61RP+njWxgPOfu56y+ECxurBZPeJTW0Srd+59bU Mnt7g+i47k6EYYWyCSFvpORUDgHjOzZlgD/ewF7PNArlgKz5PxVfOM8dYt1GgSJvjuPRu /LvPHB4UFXPz7VQccvzvM17LgFoFAW1LGR7Jzs6AmjZyhDuWHaypNrd2KbN4MM4tA9X/4 x9toSKX3g8ZjFvMApsqf0qmoJzxdIUmkgmY7J+SEljK1x52fPrmd1LoeyC8sTOi85vb4z boDytburxD9aEK7OvsxtuPJkfiDRxMXpgiOkAotYbhZSQQd7/civXxybwjGS6gF9W3w== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=SFJGCJ6a; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 50A10606A322 for ; Fri, 4 Dec 2026 13:48:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=SFJGCJ6a Received: by smtp.kernel.org (Postfix) with ESMTPSA id B4D981F000CE; Fri, 4 Dec 2026 13:48:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796392085; bh=KFiEQz4dosUixoFBu39XfJNoZmIHYLw1Ua9t5v4UJUs=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=SFJGCJ6aDwkOfJyemtXg51kZ9Y/nuzs+kaGsxSx9pXhXBGBlVW2C34Zn5aqa1zasR 12R6IikXCq9GzVbCqkr1jDHoPbADFbRuruqrBL/xFy6CunQNs85/aaQ30P5079G5xx nUnvWNU0PFArdUVhatlp2lZJu+7AJ64GlEMVBp6aIM17mS7LiC+oYXJJhu6hpzbpT3 ufskqkGW5RQM4lrQChx/9oEW5BJNsEz/uZn7j2eNEoruIWs0UyoiKUDVdqU9/5+ULa dRX90lI2nig7+rn44WgVniyNmk3GhREfnsbMd/2i1WYBleCcIcxe7wUTaseFKwxfZz TPHB98osrvpJw== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v11 2/5] drm/bridge: trilinear: add the DPTX hardware layer Reply-To: sashiko-reviews@lists.linux.dev To: "Luo Liu" Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org In-Reply-To: <20261204131053.351956-3-Luo.Liu@cixtech.com> References: <20261204131053.351956-1-Luo.Liu@cixtech.com> <20261204131053.351956-3-Luo.Liu@cixtech.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 13:48:05 +0000 X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 3 potential issues to consider: - [High] drm/bridge: trilinear: dptx_hw_link_clock_recovery() skips max vswing - [Low] drm/bridge: trilinear: unnecessary single-implementation dptx_hw_ops vtable - [Low] drm/bridge: trilinear: dptx_hw_stream_misc() omits BT.709 bit in MISC0 -- commit 3a1226e38ee04edc4132811d9716694adb22dd13 Author: Luo Liu drm/bridge: trilinear: add the DPTX hardware layer This commit adds the register and PHY programming layer for the Trilinear DisplayPort transmitter, including AUX transfers, DPCD capability parsing, link training, and per-stream video and VSC SDP setup. > diff --git a/drivers/gpu/drm/bridge/trilinear/dptx_hw.c b/drivers/gpu/drm= /bridge/trilinear/dptx_hw.c > new file mode 100644 > index 0000000000000..d16d4b68a6cdd > --- /dev/null > +++ b/drivers/gpu/drm/bridge/trilinear/dptx_hw.c [ ... ] > + for (i =3D 0; i < max_tries; i++) { > + ret =3D dptx_hw_link_vs_emph(hw, phy, lane_cnt); > + if (ret) > + return ret; > + > + drm_dp_link_train_clock_recovery_delay(&hw->aux, hw->dpcd); > + ret =3D drm_dp_dpcd_read_link_status(&hw->aux, link_status); > + if (ret < 0) > + return ret; > + > + train_done =3D drm_dp_clock_recovery_ok(link_status, lane_cnt); > + if (train_done) > + break; > + > + memcpy(prev, hw->train_setting, lane_cnt); > + dptx_hw_link_adjust_train(hw, lane_cnt, link_status); > + > + if (dptx_hw_link_max_vswing_reached(hw->train_setting, lane_cnt)) > + break; [Severity: High] Does dptx_hw_link_clock_recovery() abort before voltage swing level 3 is ever applied? When the sink requests level 3 on all active lanes, dptx_hw_link_adjust_train() sets DP_TRAIN_MAX_SWING_REACHED in hw->train_setting and the check breaks out before the next iteration's dptx_hw_link_vs_emph() programs it to the PHY and DPCD. Any link needing maximum voltage swing will therefore fail clock recovery with -EIO and either fail training or downshift unnecessarily. Checking prev (or checking hw->train_setting before dptx_hw_link_adjust_train()) would test level 3 before stopping. [ ... ] > +static void dptx_hw_stream_misc(struct dp_hw *hw, unsigned int stream_id, > + enum dp_pixelformat format, u8 bpc, > + bool vsc) > +{ > + u8 override_bpc; > + u8 override =3D 0; > + u8 misc1 =3D 0; > + u8 misc0; > + > + switch (format) { > + case DP_PIXELFORMAT_YUV444: > + misc0 =3D DPTX_STREAM_MISC0_COMP_FORMAT_YCRCB_444; > + break; > + case DP_PIXELFORMAT_YUV422: > + misc0 =3D DPTX_STREAM_MISC0_COMP_FORMAT_YCRCB_422; > + break; [Severity: Low] Should dptx_hw_stream_misc() set MISC0 bit 4 (BT.709) for YCbCr formats when VSC SDP is not used? DPTX_STREAM_MISC0_COMP_FORMAT_YCRCB_422 (5 << 1) leaves bit 4 cleared, so YCbCr 4:2:2 with DRM_MODE_COLORIMETRY_DEFAULT signals BT.601 in MSA MISC0. That contradicts dptx_hw_vsc_colorimetry(), which treats unspecified YCbCr as BT.709 for VSC SDP, causing a colorimetry mismatch on YCbCr 4:2:2 modes. Passing colorspace into dptx_hw_stream_misc() and setting BIT(4) for BT.709 would keep MISC0 consistent with the VSC SDP path. [ ... ] > diff --git a/drivers/gpu/drm/bridge/trilinear/dptx_hw.h b/drivers/gpu/drm= /bridge/trilinear/dptx_hw.h > new file mode 100644 > index 0000000000000..420ef242a4f61 > --- /dev/null > +++ b/drivers/gpu/drm/bridge/trilinear/dptx_hw.h [ ... ] > +struct dptx_hw_ops { > + bool (*hpd_state)(struct dp_hw *hw); > + bool (*sink_present)(struct dp_hw *hw); [Severity: Low] This isn't a bug, but is the 20-callback struct dptx_hw_ops indirection needed? There is only a single implementation (dptx_hw_ops in dptx_hw.c, unconditionally assigned in dptx_hw_init()) and struct dp_hw is already exposed in dptx_hw.h. Declaring direct dptx_hw_*() functions in dptx_hw.h would avoid the boilerplate and indirect-call overhead. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261204131053.3519= 56-1-Luo.Liu@cixtech.com?part=3D2