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/tiny: panel-ssd16xx: Add power management support
Date: Tue, 05 May 2026 10:10:10 +1000	[thread overview]
Message-ID: <review-patch4-20260430183311.2978142-5-devarsht@ti.com> (raw)
In-Reply-To: <20260430183311.2978142-5-devarsht@ti.com>

Patch Review

The PM implementation is generally well-thought-out for e-paper's bistable nature. Some issues:

**`ssd16xx_remove()` ordering:**
```c
+	pm_runtime_dont_use_autosuspend(&spi->dev);
+	pm_runtime_disable(&spi->dev);
 	drm_dev_unplug(&panel->drm);
 	drm_atomic_helper_shutdown(&panel->drm);
```
PM is disabled before DRM shutdown. If `drm_atomic_helper_shutdown()` triggers `crtc_atomic_disable` which does `pm_runtime_resume_and_get()`, it will fail because PM is already disabled. The shutdown should happen first, then PM teardown.

**Double PM get/put in commit path:**
`crtc_atomic_enable` does `pm_runtime_resume_and_get()`/`pm_runtime_put_autosuspend()`, and `plane_atomic_update` also does its own pair. Since `drm_atomic_helper_commit_tail_rpm` is used, the RPM framework handles the overall commit lifecycle. Having nested get/put pairs is correct from a refcount perspective but adds unnecessary wake-up latency if the autosuspend fires between enable and update (extremely unlikely with 35s timeout, but architecturally fragile).

**System suspend when already RPM-suspended:**
```c
+	if (pm_runtime_status_suspended(dev)) {
+		...
+		ssd16xx_hw_reset(panel);
+		ssd16xx_send_cmd(panel, SSD16XX_CMD_DEEP_SLEEP_MODE, &err);
+		ssd16xx_send_data(panel, panel->controller_cfg->deep_sleep_mode_level2, &err);
+		panel->pm_force_suspended = false;
+		return err;
+	}
```
This does a hardware reset followed immediately by a deep sleep command. There's no software reset or wait-for-busy between the HWRESET and sending the deep sleep command. Per SSD1683 datasheet, after HWRESET a busy period occurs -- the code should call `ssd16xx_wait_for_panel()` before sending commands.

---

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-05-05  0:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-30 18:33 [PATCH 0/6] Add DRM driver for Solomon SSD16xx e-paper display controllers Devarsh Thakkar
2026-04-30 18:33 ` [PATCH 1/6] dt-bindings: vendor-prefixes: Add Dalian Good Display Co., Ltd Devarsh Thakkar
2026-05-04 10:18   ` Krzysztof Kozlowski
2026-05-05  0:10   ` Claude review: " Claude Code Review Bot
2026-04-30 18:33 ` [PATCH 2/6] dt-bindings/display: Add Solomon SSD16xx e-paper controller binding Devarsh Thakkar
2026-05-05  0:10   ` Claude review: " Claude Code Review Bot
2026-04-30 18:33 ` [PATCH 3/6] drm/tiny: Add DRM driver for Solomon SSD16xx e-paper display controllers Devarsh Thakkar
2026-05-05  0:10   ` Claude review: " Claude Code Review Bot
2026-04-30 18:33 ` [PATCH 4/6] drm/tiny: panel-ssd16xx: Add power management support Devarsh Thakkar
2026-05-05  0:10   ` Claude Code Review Bot [this message]
2026-04-30 18:33 ` [PATCH 5/6] MAINTAINERS: Add entry for Solomon SSD16xx DRM driver Devarsh Thakkar
2026-05-05  0:10   ` Claude review: " Claude Code Review Bot
2026-04-30 18:33 ` [PATCH 6/6] arm64: defconfig: Enable DRM_PANEL_SSD16XX Devarsh Thakkar
2026-05-01  9:30   ` Krzysztof Kozlowski
2026-05-05  0:10   ` Claude review: " Claude Code Review Bot
2026-05-05  0:10 ` Claude review: Add DRM driver for Solomon SSD16xx e-paper display controllers 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-patch4-20260430183311.2978142-5-devarsht@ti.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