public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/display: hdmi: Use drm_output_color_format instead of hdmi_colorspace
Date: Fri, 27 Feb 2026 15:17:10 +1000	[thread overview]
Message-ID: <review-patch14-20260224-drm-rework-color-formats-v1-14-bebc76604ada@kernel.org> (raw)
In-Reply-To: <20260224-drm-rework-color-formats-v1-14-bebc76604ada@kernel.org>

Patch Review

This is the most substantive patch. It changes `drm_connector_hdmi_state.output_format` from `enum hdmi_colorspace` to `enum drm_output_color_format` and updates all related code.

**Issue 1 - Missing documentation updates**: The `supported_formats` field documentation is not updated in either header:
- `drm_connector.h:1882`: Still says "Bitmask of @hdmi_colorspace"
- `drm_bridge.h:1191`: Still says "Bitmask of @hdmi_colorspace listing supported output formats"

Both should be updated to reference `@drm_output_color_format`.

**Issue 2 - Silent bitmask semantics change**: The `supported_formats` bitmask changes semantics because the enum orderings differ:
- `hdmi_colorspace`: RGB=0, YUV422=1, YUV444=2, YUV420=3
- `drm_output_color_format`: RGB444=0, YCBCR444=1, YCBCR422=2, YCBCR420=3

So `BIT(HDMI_COLORSPACE_YUV422)` = BIT(1) = 2, but `BIT(DRM_OUTPUT_COLOR_FORMAT_YCBCR422)` = BIT(2) = 4. The 422 and 444 bit positions are swapped. This is safe as long as the conversion is complete (which it appears to be), but it should be explicitly noted in the commit message to alert reviewers.

**Issue 3 - Header include**: The patch adds `#include <drm/drm_connector.h>` to `drm_hdmi_helper.h`. This is a significant include -- `drm_connector.h` is a very large header. Consider whether a forward declaration would suffice, or whether the enum could be defined in a smaller header.

**Positive**: The `output_color_format_to_hdmi_colorspace()` conversion function is well-written with proper `default` + `fallthrough` handling:
```c
default:
    drm_warn(connector->dev, "Unsupported output color format. Defaulting to RGB.");
    fallthrough;
case DRM_OUTPUT_COLOR_FORMAT_RGB444:
    return HDMI_COLORSPACE_RGB;
```

**Positive**: The test updates are thorough and mechanical, covering all the KUnit test infrastructure consistently.

**Minor**: The `drm_hdmi_connector_get_output_format_name()` function declaration is moved in `drm_connector.h` to after the enum definition, which is correct since it now depends on the enum type.

---
Generated by Claude Code Patch Reviewer

  parent reply	other threads:[~2026-02-27  5:17 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-24 10:58 [PATCH 00/14] drm: Create drm_output_color_format enum Maxime Ripard
2026-02-24 10:58 ` [PATCH 01/14] drm/connector: Introduce " Maxime Ripard
2026-02-26  9:12   ` Philipp Zabel
2026-02-27  5:17   ` Claude review: " Claude Code Review Bot
2026-02-24 10:58 ` [PATCH 02/14] drm/edid: Convert to " Maxime Ripard
2026-02-27  5:17   ` Claude review: " Claude Code Review Bot
2026-02-24 10:58 ` [PATCH 03/14] drm/display: hdmi: Convert to drm_output_color_format Maxime Ripard
2026-02-27  5:17   ` Claude review: " Claude Code Review Bot
2026-02-24 10:58 ` [PATCH 04/14] drm/amdgpu: display: " Maxime Ripard
2026-02-27  5:17   ` Claude review: " Claude Code Review Bot
2026-02-24 10:58 ` [PATCH 05/14] drm/bridge: adv7511: " Maxime Ripard
2026-02-27  5:17   ` Claude review: " Claude Code Review Bot
2026-02-24 10:58 ` [PATCH 06/14] drm/bridge: analogix: " Maxime Ripard
2026-02-27  5:17   ` Claude review: " Claude Code Review Bot
2026-02-24 10:58 ` [PATCH 07/14] drm/bridge: cadence: " Maxime Ripard
2026-02-27  5:17   ` Claude review: " Claude Code Review Bot
2026-02-24 10:58 ` [PATCH 08/14] drm/bridge: synopsys: dw-dp: " Maxime Ripard
2026-02-27  5:17   ` Claude review: " Claude Code Review Bot
2026-02-24 10:58 ` [PATCH 09/14] drm/bridge: synopsys: dw-hdmi: " Maxime Ripard
2026-02-26  8:59   ` Philipp Zabel
2026-02-27  5:17   ` Claude review: " Claude Code Review Bot
2026-02-24 10:58 ` [PATCH 10/14] drm/arm: komeda: " Maxime Ripard
2026-02-25 16:12   ` Liviu Dudau
2026-02-27  5:17   ` Claude review: " Claude Code Review Bot
2026-02-24 10:58 ` [PATCH 11/14] drm/mediatek: dp: " Maxime Ripard
2026-02-26  8:58   ` Philipp Zabel
2026-02-27  5:17   ` Claude review: " Claude Code Review Bot
2026-02-24 10:58 ` [PATCH 12/14] drm/rockchip: analogix: " Maxime Ripard
2026-02-27  5:17   ` Claude review: " Claude Code Review Bot
2026-02-24 10:58 ` [PATCH 13/14] drm/connector: Remove DRM_COLOR_FORMAT defines Maxime Ripard
2026-02-27  5:17   ` Claude review: " Claude Code Review Bot
2026-02-24 10:58 ` [PATCH 14/14] drm/display: hdmi: Use drm_output_color_format instead of hdmi_colorspace Maxime Ripard
2026-02-24 12:43   ` Jani Nikula
2026-02-25 17:03   ` Nicolas Frattaroli
2026-02-25 17:21     ` Nicolas Frattaroli
2026-02-26 16:24   ` Nicolas Frattaroli
2026-02-27  5:17   ` Claude Code Review Bot [this message]
2026-02-24 12:44 ` [PATCH 00/14] drm: Create drm_output_color_format enum Jani Nikula
2026-02-27  5:17 ` Claude review: " Claude Code Review Bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=review-patch14-20260224-drm-rework-color-formats-v1-14-bebc76604ada@kernel.org \
    --to=claude-review@example.com \
    --cc=dri-devel-reviews@example.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox