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/msm/dp: Skip push_idle in atomic_disable if display is not powered on
Date: Sat, 16 May 2026 15:42:51 +1000	[thread overview]
Message-ID: <review-patch1-20260511-edp_suspend-v1-1-128555968d7c@oss.qualcomm.com> (raw)
In-Reply-To: <20260511-edp_suspend-v1-1-128555968d7c@oss.qualcomm.com>

Patch Review

**Commit message:** Well-written. It clearly explains the root cause (eDP with no panel → DPCD read failure → `ST_DISCONNECTED` → `atomic_enable` exits early → `power_on` stays false → `push_idle` writes to unpowered register → NoC error). Good.

**Code change:**

```c
+	if (!dp->power_on)
+		return;
+
 	msm_dp_ctrl_push_idle(msm_dp_display->ctrl);
```

**Correctness:** The guard is logically correct. If `power_on` is `false`, the link clocks are not enabled, so writing to `REG_DP_STATE_CTRL` via `msm_dp_ctrl_push_idle()` would access unpowered hardware. The check is consistent with the guard in `msm_dp_display_disable()` which does the same pattern (`if (!msm_dp_display->power_on) return 0;`).

**Minor concern — early return skips post_disable flow:** The `atomic_disable` → `atomic_post_disable` sequence means that even when we return early here, `msm_dp_bridge_atomic_post_disable()` will still be called. That function calls `msm_dp_display_disable()`, which has its own `power_on` guard, so the early return here is safe — `atomic_post_disable` won't crash either. The `pm_runtime_put_sync()` at the end of `atomic_post_disable` could be called without a matching `pm_runtime_get`, but looking at the enable path, `pm_runtime_get_sync` is called in `atomic_pre_enable`, which would also have been called before `atomic_post_disable` during the suspend teardown. So this should be balanced correctly.

**Nit — comment length:** The 3-line comment is fine for explaining a non-obvious guard, though it could be slightly more concise. This is a minor style preference and not a blocker.

**No other issues found.** The patch is minimal, well-scoped, and addresses a real crash. It could benefit from a `Fixes:` tag referencing the commit that introduced the unconditional `msm_dp_ctrl_push_idle()` call in `atomic_disable`, which would help stable backporting.

---
Generated by Claude Code Patch Reviewer

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

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-11  8:36 [PATCH] drm/msm/dp: Skip push_idle in atomic_disable if display is not powered on Yongxing Mou
2026-05-13 13:28 ` Dmitry Baryshkov
2026-05-16  5:42 ` Claude review: " Claude Code Review Bot
2026-05-16  5:42 ` 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-20260511-edp_suspend-v1-1-128555968d7c@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