From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: drm/connector: hdmi: Add support for 'link bpc' property Date: Tue, 31 Mar 2026 17:31:19 +1000 Message-ID: In-Reply-To: <20260330-link-bpc-v6-2-ff124af93e48@collabora.com> References: <20260330-link-bpc-v6-0-ff124af93e48@collabora.com> <20260330-link-bpc-v6-2-ff124af93e48@collabora.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review **Issue 1 (bug): `link_bpc` only set when output_bpc changes, not on initia= l modeset** ```c if (old_conn_state->hdmi.broadcast_rgb !=3D new_conn_state->hdmi.broadcast_= rgb || old_conn_state->hdmi.output_bpc !=3D new_conn_state->hdmi.output_bpc || old_conn_state->hdmi.output_format !=3D new_conn_state->hdmi.output_for= mat) { struct drm_crtc *crtc =3D new_conn_state->crtc; struct drm_crtc_state *crtc_state; new_conn_state->link_bpc =3D new_conn_state->hdmi.output_bpc; ``` The `link_bpc` assignment is **inside** the `if` block that only triggers w= hen broadcast_rgb, output_bpc, or output_format have changed from the old s= tate. On the **first** modeset (or any modeset where these values happen to= be the same as previous), `link_bpc` will remain at its default of 0 (zero= -initialized connector state), which is below the range minimum of 8. The `commit_tail` code will then see `old_conn_state->link_bpc (0) !=3D new= _conn_state->link_bpc (0)` =E2=80=94 actually they'd be equal so it wouldn'= t fire, but the property would remain stale at its initial `max_bpc` value = rather than reflecting the actual output_bpc. The assignment should be moved **outside** the if block, to unconditionally= set `link_bpc` to `hdmi.output_bpc`: ```c new_conn_state->link_bpc =3D new_conn_state->hdmi.output_bpc; if (old_conn_state->hdmi.broadcast_rgb !=3D new_conn_state->hdmi.broadcast_= rgb || ... ``` This was actually what the cover letter's diff stat area suggests (the `+` = line before the `crtc_state` block), but in the actual diff the assignment = ended up inside the conditional. Looking at the diff more carefully, the `+= ` lines show it placed right after the opening brace of the if block. This = is a real bug =E2=80=94 on initial enable the link_bpc won't be set to the = actual value. **Patch 2 otherwise looks correct:** The `drmm_connector_hdmi_init` integra= tion properly attaches the property after `max_bpc` is set up, and the erro= r return is properly wired. --- Generated by Claude Code Patch Reviewer