From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/msm/hdmi: Fix wrong CTRL1 register used in writing info frames
Date: Thu, 12 Mar 2026 06:46:34 +1000 [thread overview]
Message-ID: <review-patch1-20260311191620.245394-2-krzysztof.kozlowski@oss.qualcomm.com> (raw)
In-Reply-To: <20260311191620.245394-2-krzysztof.kozlowski@oss.qualcomm.com>
Patch Review
**Bug analysis:** The original code (from commit `384d2b03d0a1`) converted unconditional register writes to read-modify-write sequences but read from `REG_HDMI_INFOFRAME_CTRL1` while applying masks for `HDMI_INFOFRAME_CTRL0` fields and writing to `REG_HDMI_INFOFRAME_CTRL0`. This means the CTRL0 register was being corrupted with bits from CTRL1, and any existing CTRL0 bits that should have been preserved were lost.
**Fix correctness:** The fix changes both occurrences to read from `REG_HDMI_INFOFRAME_CTRL0`, making the read-modify-write consistent:
```c
val = hdmi_read(hdmi, REG_HDMI_INFOFRAME_CTRL0); // was CTRL1
val |= HDMI_INFOFRAME_CTRL0_AVI_SEND |
HDMI_INFOFRAME_CTRL0_AVI_CONT;
hdmi_write(hdmi, REG_HDMI_INFOFRAME_CTRL0, val);
```
and similarly for the audio infoframe path:
```c
val = hdmi_read(hdmi, REG_HDMI_INFOFRAME_CTRL0); // was CTRL1
val |= HDMI_INFOFRAME_CTRL0_AUDIO_INFO_SEND |
HDMI_INFOFRAME_CTRL0_AUDIO_INFO_CONT |
HDMI_INFOFRAME_CTRL0_AUDIO_INFO_SOURCE |
HDMI_INFOFRAME_CTRL0_AUDIO_INFO_UPDATE;
hdmi_write(hdmi, REG_HDMI_INFOFRAME_CTRL0, val);
```
Looking at the post-patch source (lines 156-164), the pattern is now consistent with the immediately following block that correctly does read-modify-write on CTRL1 for CTRL1-specific fields (`HDMI_INFOFRAME_CTRL1_AVI_INFO_LINE`).
**Minor observation:** The `|=` operation (rather than clearing bits first with a mask) means these "send/cont" bits are only ever set, never cleared through this path. This is fine since the `clear_avi_infoframe` / `clear_audio_infoframe` functions are called at the start of each write function to handle the clearing.
**Tags:** Fixes tag, Cc: stable, and Signed-off-by are all present and appropriate.
**No issues found.**
Reviewed-by recommendation: This patch is correct and ready to merge.
---
Generated by Claude Code Patch Reviewer
prev parent reply other threads:[~2026-03-11 20:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-11 19:16 [PATCH] drm/msm/hdmi: Fix wrong CTRL1 register used in writing info frames Krzysztof Kozlowski
2026-03-11 20:46 ` Claude review: " Claude Code Review Bot
2026-03-11 20:46 ` Claude Code Review Bot [this message]
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-patch1-20260311191620.245394-2-krzysztof.kozlowski@oss.qualcomm.com \
--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