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/atomic-helper: Add HDMI bridge output bus formats helper Date: Sun, 12 Apr 2026 11:01:41 +1000 Message-ID: In-Reply-To: <20260409-color-format-v12-5-ce84e1817a27@collabora.com> References: <20260409-color-format-v12-0-ce84e1817a27@collabora.com> <20260409-color-format-v12-5-ce84e1817a27@collabora.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review Adds `drm_atomic_helper_bridge_get_hdmi_output_bus_fmts()` as a common implementation for HDMI bridges. ```c BUILD_BUG_ON(const_true(DRM_OUTPUT_COLOR_FORMAT_COUNT > 8)); out_fmts = kmalloc_array(hweight8(bridge->supported_formats), sizeof(u32), GFP_KERNEL); ``` The `BUILD_BUG_ON` guards the `hweight8` usage -- if someone adds more than 8 color formats in the future, this will catch it at compile time. The `const_true()` wrapper ensures the BUILD_BUG_ON only fires when the condition is provably true at compile time. The function maps `conn_state->hdmi.output_bpc` (8/10/12) to appropriate MEDIA_BUS_FMT values for each supported format. The default case handles 8bpc, which is fine. Minor: the kerneldoc has a typo: "compoennt" should be "component". **Verdict**: Good. Fix typo in kerneldoc. --- --- Generated by Claude Code Patch Reviewer