From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/tidss: oldi: Convert OLDI to an aux driver
Date: Thu, 04 Jun 2026 16:54:13 +1000 [thread overview]
Message-ID: <review-patch12-20260529-beagley-ai-display-v3-12-7fefdc5d1adf@ideasonboard.com> (raw)
In-Reply-To: <20260529-beagley-ai-display-v3-12-7fefdc5d1adf@ideasonboard.com>
Patch Review
This is the largest and most significant patch. It converts OLDI from direct bridge creation to an auxiliary device/driver pattern to enable proper power-domain management.
**Good aspects:**
- The aux driver pattern is appropriate for the requirement
- Proper `of_node_put()` calls added to error paths (e.g., in `get_oldi_mode()`)
- Device links between primary/secondary OLDI and between OLDI/DSS for PM
- The `tidss_oldi_aux_device_release()` properly frees IDA, puts of_node, frees platform_data and the auxdev itself
**Concerns:**
1. **`pm_runtime_get_sync` without error handling in `atomic_pre_enable`:**
```c
+ WARN_ON(pm_runtime_get_sync(oldi->dev) < 0);
```
If `pm_runtime_get_sync()` fails, the code continues to configure OLDI hardware, which could lead to register access on a powered-down domain. A `WARN_ON` will alert but not prevent the damage. In the pre-enable path it's hard to return an error, so this is pragmatically acceptable but worth noting.
2. **`clk_put` called unconditionally in remove but clock is only acquired conditionally:**
```c
+static void tidss_oldi_remove(struct auxiliary_device *auxdev)
+{
...
+ clk_put(oldi->serial);
```
The `oldi->serial` is only acquired when `link_type != OLDI_MODE_SECONDARY_DUAL_LINK && link_type != OLDI_MODE_SECONDARY_CLONE_SINGLE_LINK`. In the secondary dual-link case, `oldi->serial` will be uninitialized (could be NULL or garbage). Similarly, in the error path of `tidss_oldi_probe()`:
```c
+err_bridge_remove:
...
+ clk_put(oldi->serial);
```
If the error occurs before `of_clk_get_by_name()`, `oldi->serial` will be uninitialized. Since `devm_drm_bridge_alloc` zeroes the struct, `oldi->serial` should be NULL, and `clk_put(NULL)` is a no-op, so this should be safe in practice. But it's fragile — if the allocation behavior changes, this could break.
3. **`device_link_del` never called on `link` between OLDI and tidss:**
In `tidss_oldi_probe()`, a device_link is created with `DL_FLAG_AUTOREMOVE_CONSUMER`, so it should be automatically removed. This is correct.
4. **Ordering of `auxiliary_device_destroy` in teardown:**
`tidss_oldi_destroy_devices()` iterates forward through `tidss->oldis[]`, which means if the primary was added first and the secondary was added as part of primary creation, the secondary may be destroyed after its primary's device_link to it is already gone. The `DL_FLAG_AUTOREMOVE_SUPPLIER` flag on the primary-secondary link should handle this, but the ordering deserves careful testing.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-06-04 6:54 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-29 8:45 [PATCH v3 00/15] drm/tidss: Add BeagleY-AI display support (and some more) Tomi Valkeinen
2026-05-29 8:45 ` [PATCH v3 01/15] dt-bindings: display: ti: Move ti,am62l-dss binding to a new binding file Tomi Valkeinen
2026-06-04 6:54 ` Claude review: " Claude Code Review Bot
2026-05-29 8:45 ` [PATCH v3 02/15] dt-bindings: display: ti,am65x-dss: Simplify binding Tomi Valkeinen
2026-06-04 6:54 ` Claude review: " Claude Code Review Bot
2026-05-29 8:45 ` [PATCH v3 03/15] dt-bindings: display: ti,am625-oldi: Add optional power-domain for OLDI Tomi Valkeinen
2026-05-30 8:55 ` Krzysztof Kozlowski
2026-06-04 6:54 ` Claude review: " Claude Code Review Bot
2026-05-29 8:45 ` [PATCH v3 04/15] dt-bindings: display: ti,am65x-dss: Add ti,dpi-io-ctrl Tomi Valkeinen
2026-05-30 8:58 ` Krzysztof Kozlowski
2026-06-04 6:54 ` Claude review: " Claude Code Review Bot
2026-05-29 8:45 ` [PATCH v3 05/15] dt-bindings: display: ti,am65x-dss: Add AM62P DSS Tomi Valkeinen
2026-06-04 6:54 ` Claude review: " Claude Code Review Bot
2026-05-29 8:45 ` [PATCH v3 06/15] drm/tidss: Remove extra pm_runtime_mark_last_busy Tomi Valkeinen
2026-06-04 6:54 ` Claude review: " Claude Code Review Bot
2026-05-29 8:45 ` [PATCH v3 07/15] drm/tidss: oldi: Remove define for unused register OLDI_LB_CTRL Tomi Valkeinen
2026-06-04 6:54 ` Claude review: " Claude Code Review Bot
2026-05-29 8:45 ` [PATCH v3 08/15] drm/tidss: Add mechanism to detect DPI output Tomi Valkeinen
2026-06-04 6:54 ` Claude review: " Claude Code Review Bot
2026-05-29 8:45 ` [PATCH v3 09/15] drm/tidss: Add external data and sync signal edge configuration Tomi Valkeinen
2026-06-04 6:54 ` Claude review: " Claude Code Review Bot
2026-05-29 8:45 ` [PATCH v3 10/15] drm/tidss: Add support for DPIENABLE bit Tomi Valkeinen
2026-06-04 6:54 ` Claude review: " Claude Code Review Bot
2026-05-29 8:45 ` [PATCH v3 11/15] drm/tidss: oldi: Fix OLDI signal polarities Tomi Valkeinen
2026-06-04 6:54 ` Claude review: " Claude Code Review Bot
2026-05-29 8:45 ` [PATCH v3 12/15] drm/tidss: oldi: Convert OLDI to an aux driver Tomi Valkeinen
2026-06-04 6:54 ` Claude Code Review Bot [this message]
2026-05-29 8:45 ` [PATCH v3 13/15] drm/tidss: Add support for AM62P display subsystem Tomi Valkeinen
2026-06-04 6:54 ` Claude review: " Claude Code Review Bot
2026-05-29 8:45 ` [PATCH v3 14/15] arm64: dts: ti: k3-am62p-j722s-common-main: Add support for DSS Tomi Valkeinen
2026-06-04 6:54 ` Claude review: " Claude Code Review Bot
2026-05-29 8:45 ` [PATCH v3 15/15] arm64: dts: ti: beagley-ai: Enable HDMI display and audio Tomi Valkeinen
2026-06-04 6:54 ` Claude review: " Claude Code Review Bot
2026-06-04 6:54 ` Claude review: drm/tidss: Add BeagleY-AI display support (and some more) Claude Code Review Bot
-- strict thread matches above, loose matches on Subject: below --
2026-05-13 13:17 [PATCH v2 00/16] " Tomi Valkeinen
2026-05-13 13:17 ` [PATCH v2 12/16] drm/tidss: oldi: Convert OLDI to an aux driver Tomi Valkeinen
2026-05-16 2:00 ` Claude review: " Claude Code Review Bot
2026-04-20 12:54 [PATCH 00/15] drm/tidss: Add BeagleY-AI display support (and some more) Tomi Valkeinen
2026-04-20 12:54 ` [PATCH 12/15] drm/tidss: oldi: Convert OLDI to an aux driver Tomi Valkeinen
2026-04-22 23:45 ` 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-patch12-20260529-beagley-ai-display-v3-12-7fefdc5d1adf@ideasonboard.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