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/tegra: dsi: add support for Tegra20/Tegra30
Date: Sat, 16 May 2026 15:48:59 +1000	[thread overview]
Message-ID: <review-patch2-20260511074538.24563-2-clamor95@gmail.com> (raw)
In-Reply-To: <20260511074538.24563-2-clamor95@gmail.com>

Patch Review

**Overall: Reasonable fix, but has a potential issue with ganged mode and a style nit.**

This patch re-adds the workaround from commit b22fd0b9639e that was reverted in 660b299bed2a. The key insight is that the original workaround was placed *before* DSI hardware was prepared (causing a hang on devices where the bootloader didn't touch DSI), and this patch moves it *after* `tegra_dsi_prepare()` completes (which enables clocks and deasserts reset), so the register read is always safe.

**Issue — ganged-mode interaction:**

```c
+	value = tegra_dsi_readl(dsi, DSI_POWER_CONTROL);
+
+	if (value & DSI_POWER_CONTROL_ENABLE)
+		tegra_dsi_disable(dsi);
```

`tegra_dsi_disable()` checks `dsi->slave` and, if non-NULL, calls `tegra_dsi_ganged_disable(dsi->slave)` and then recursively `tegra_dsi_disable(dsi->slave)`. In `tegra_dsi_encoder_enable()`, this new code runs right after `tegra_dsi_prepare(dsi)`, which at line 903-904 calls `tegra_dsi_prepare(dsi->slave)` — so the slave hardware *is* prepared. However, `tegra_dsi_disable()` also calls `tegra_dsi_ganged_disable()` which writes to `DSI_GANGED_MODE_*` registers on the slave. In the bootloader-init case for ganged panels, this should be fine since both DSI controllers would have been set up. But the logic feels fragile: it assumes that if the master's `DSI_POWER_CONTROL_ENABLE` is set by the bootloader, the slave's is too, and that both are in a consistent ganged state. This probably works in practice (a bootloader wouldn't set up half a ganged link), but worth a comment or consideration of whether the check/disable should also be slave-aware.

**Style nit — comment format:**

```c
+	/* If the bootloader enabled DSI it needs to be disabled
+	 * in order for the panel initialization commands to be
+	 * properly sent.
+	 */
```

This uses the `/* ... */` network-style multi-line comment format. The preferred kernel DRM subsystem style is:

```c
	/*
	 * If the bootloader enabled DSI it needs to be disabled
	 * in order for the panel initialization commands to be
	 * properly sent.
	 */
```

The opening `/*` should be on its own line for multi-line comments (as used throughout the rest of this file — see e.g., the existing comment at line 929 "The D-PHY timing fields are expressed in byte-clock cycles...").

**Commit message:**

The commit message is excellent — it clearly explains the history (original commit, revert, why the original placement was wrong, and how this fix addresses both cases). The testing matrix across T20/T114/T124 is thorough and helpful. The dual `Fixes:` tags referencing both the original and the revert are appropriate.

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-05-16  5:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-11  7:45 [PATCH v4 0/2 RESEND] gpu/drm: tegra: add DSI support for Tegra20/Tegra30 Svyatoslav Ryhel
2026-05-11  7:45 ` [PATCH v4 1/2 RESEND] drm/tegra: dsi: add " Svyatoslav Ryhel
2026-05-16  5:48   ` Claude Code Review Bot [this message]
2026-05-11  7:45 ` [PATCH v4 2/2 RESEND] drm/tegra: dsi: re-add clear enable register if DSI was powered by bootloader Svyatoslav Ryhel
2026-05-16  5:48 ` Claude review: gpu/drm: tegra: add DSI support for Tegra20/Tegra30 Claude Code Review Bot
2026-05-16  5:48 ` Claude Code Review Bot
  -- strict thread matches above, loose matches on Subject: below --
2026-03-09  7:52 [PATCH v4 0/2] " Svyatoslav Ryhel
2026-03-09  7:52 ` [PATCH v4 1/2] drm/tegra: dsi: add " Svyatoslav Ryhel
2026-03-10  2:38   ` 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-patch2-20260511074538.24563-2-clamor95@gmail.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