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/rockchip: dw_hdmi_qp: expose "overscan" property
Date: Thu, 04 Jun 2026 12:35:01 +1000	[thread overview]
Message-ID: <review-patch2-20260602-hdmi-overscan-v1-2-31f71b817c80@flipper.net> (raw)
In-Reply-To: <20260602-hdmi-overscan-v1-2-31f71b817c80@flipper.net>

Patch Review

**Issues:**

1. **`drm_mode_create_tv_properties_legacy()` is deprecated** (critical). The function docstring says:

   > NOTE: This functions registers the deprecated "mode" connector property to select the analog TV mode (ie, NTSC, PAL, etc.). New drivers must use `drm_mode_create_tv_properties()` instead.

   Using the legacy function creates ~10 unnecessary TV properties (select subconnector, subconnector, brightness, contrast, flicker reduction, saturation, hue, mode, plus the margin properties). For an HDMI connector, most of these make no sense. Either use `drm_mode_create_tv_properties()` instead, or better yet, just create the overscan property directly if that's the only one needed. Check whether `drm_mode_create_tv_properties(dev, 0)` with no supported TV modes would be cleaner.

2. **Margin symmetry assumption.** The conversion in `atomic_check`:
   ```c
   s->tv_margins.left   = adj_mode->hdisplay * overscan / 200;
   s->tv_margins.right  = s->tv_margins.left;
   s->tv_margins.top    = adj_mode->vdisplay * overscan / 200;
   s->tv_margins.bottom = s->tv_margins.top;
   ```
   Applies equal margins on both sides, which is the expected behavior for the "overscan" property (a single percentage). This is correct, but the commit message could be clearer that this is intentionally symmetric. The `/200` divisor means `overscan=100` yields margins of 50% on each side, leaving zero visible area -- while `min(conn_state->tv.overscan, 100u)` allows this. In practice the property range is 0-100 and no user would set 100%, but the edge case exists.

3. **Integer rounding.** For small display sizes or small overscan percentages, `hdisplay * overscan / 200` may round to 0 even when the user requested some overscan. For example, with `hdisplay=640` and `overscan=1`, the result is `640/200 = 3` pixels per side. That actually works fine. But for `overscan=0` the result is correctly 0. This is acceptable.

4. **Missing `drm_connector_attach_tv_margin_properties()` or equivalent.** The patch attaches `tv_overscan_property` but does not attach the individual margin properties (`left margin`, `right margin`, etc.). This is intentional since the driver uses the single "overscan" knob rather than per-side margins. However, userspace compositors like KWin may expect the individual margin properties to also exist. Verify that KWin actually uses the "overscan" property as claimed (it does appear to, based on the KWin source).

5. **Property attached after connector init.** The property is attached in `dw_hdmi_qp_rockchip_bind()` after `drm_bridge_connector_init()` returns. This should work since property attachment is just adding a property reference to the connector object, but it's worth checking that no path reads connector properties before `bind()` returns.

6. **No `atomic_check` for overscan-only changes.** If the user changes overscan but nothing else changes on the connector/CRTC, the margin values are updated in the CRTC state during `atomic_check`, but there's no explicit check that forces a CRTC update. This likely works because changing any connector property triggers a full atomic commit, but it should be verified that `vop2_post_config()` is actually called in this scenario.

**Summary:** The series is a reasonable approach but should switch from `drm_mode_create_tv_properties_legacy()` to either `drm_mode_create_tv_properties()` or a more targeted property creation to avoid registering a pile of irrelevant analog TV properties on an HDMI connector.

---
Generated by Claude Code Patch Reviewer

  parent reply	other threads:[~2026-06-04  2:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-02 17:00 [PATCH 0/2] drm/rockchip: dw_hdmi_qp: Add support for HDMI overscan compensation Alexey Charkov
2026-06-02 17:00 ` [PATCH 1/2] drm/rockchip: vop2: honor TV margins from CRTC state for " Alexey Charkov
2026-06-04  2:35   ` Claude review: " Claude Code Review Bot
2026-06-02 17:00 ` [PATCH 2/2] drm/rockchip: dw_hdmi_qp: expose "overscan" property Alexey Charkov
2026-06-03  7:55   ` Maxime Ripard
2026-06-03  8:15     ` Alexey Charkov
2026-06-03 13:11   ` Andy Yan
2026-06-04  2:35   ` Claude Code Review Bot [this message]
2026-06-04  2:35 ` Claude review: drm/rockchip: dw_hdmi_qp: Add support for HDMI overscan compensation 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-patch2-20260602-hdmi-overscan-v1-2-31f71b817c80@flipper.net \
    --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