public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] backlight: ktd2801: enable BL_CORE_SUSPENDRESUME
@ 2026-03-28 20:42 Duje Mihanović
  2026-03-31  7:51 ` Claude review: " Claude Code Review Bot
  2026-03-31  7:51 ` Claude Code Review Bot
  0 siblings, 2 replies; 3+ messages in thread
From: Duje Mihanović @ 2026-03-28 20:42 UTC (permalink / raw)
  To: Lee Jones, Daniel Thompson, Jingoo Han, Helge Deller
  Cc: Karel Balej, dri-devel, linux-fbdev, phone-devel,
	~postmarketos/upstreaming, linux-kernel, Duje Mihanović,
	stable

From: Duje Mihanović <duje@dujemihanovic.xyz>

Boards using this backlight chip do not power the backlight off on
suspend. Enable BL_CORE_SUSPENDRESUME so the chip gets powered off by
the backlight core on suspend.

Tested on samsung,coreprimevelte.

Cc: stable@vger.kernel.org # v6.19
Signed-off-by: Duje Mihanović <duje@dujemihanovic.xyz>
---
 drivers/video/backlight/ktd2801-backlight.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/video/backlight/ktd2801-backlight.c b/drivers/video/backlight/ktd2801-backlight.c
index 17eac1b3bce4..1b1307e03b20 100644
--- a/drivers/video/backlight/ktd2801-backlight.c
+++ b/drivers/video/backlight/ktd2801-backlight.c
@@ -53,6 +53,7 @@ static int ktd2801_update_status(struct backlight_device *bd)
 }
 
 static const struct backlight_ops ktd2801_backlight_ops = {
+	.options = BL_CORE_SUSPENDRESUME,
 	.update_status = ktd2801_update_status,
 };
 

---
base-commit: 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f
change-id: 20260314-ktd2801-pm-fix-17e8715f8c37

Best regards,
--  
Duje Mihanović <duje@dujemihanovic.xyz>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Claude review: backlight: ktd2801: enable BL_CORE_SUSPENDRESUME
  2026-03-28 20:42 [PATCH] backlight: ktd2801: enable BL_CORE_SUSPENDRESUME Duje Mihanović
@ 2026-03-31  7:51 ` Claude Code Review Bot
  2026-03-31  7:51 ` Claude Code Review Bot
  1 sibling, 0 replies; 3+ messages in thread
From: Claude Code Review Bot @ 2026-03-31  7:51 UTC (permalink / raw)
  To: dri-devel-reviews

Overall Series Review

Subject: backlight: ktd2801: enable BL_CORE_SUSPENDRESUME
Author: =?utf-8?q?Duje_Mihanovi=C4=87?= <dujemihanovic32@gmail.com>
Patches: 1
Reviewed: 2026-03-31T17:51:56.057017

---

This is a single-patch series that adds `BL_CORE_SUSPENDRESUME` to the KTD2801 backlight driver's ops. The fix is straightforward, correct, and well-motivated. The backlight core's suspend/resume handling will call `update_status` with brightness=0 on suspend and restore brightness on resume, which is the standard mechanism for backlight power management. The driver's `ktd2801_update_status` already handles the blank/unblank transitions correctly via `expresswire_power_off` / `expresswire_enable`, so this flag is all that's needed.

**Verdict: Looks good.** This is a minimal, correct fix.

---
Generated by Claude Code Patch Reviewer

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Claude review: backlight: ktd2801: enable BL_CORE_SUSPENDRESUME
  2026-03-28 20:42 [PATCH] backlight: ktd2801: enable BL_CORE_SUSPENDRESUME Duje Mihanović
  2026-03-31  7:51 ` Claude review: " Claude Code Review Bot
@ 2026-03-31  7:51 ` Claude Code Review Bot
  1 sibling, 0 replies; 3+ messages in thread
From: Claude Code Review Bot @ 2026-03-31  7:51 UTC (permalink / raw)
  To: dri-devel-reviews

Patch Review

**Status: Good to merge**

The change adds a single line to `ktd2801_backlight_ops`:

```c
static const struct backlight_ops ktd2801_backlight_ops = {
	.options = BL_CORE_SUSPENDRESUME,
	.update_status = ktd2801_update_status,
};
```

This is the standard pattern used by many other backlight drivers (e.g., `pwm_bl`, `lp855x`, `gpio_backlight`, etc.) to have the backlight core handle suspend/resume automatically. When this flag is set, the core calls `backlight_suspend()` / `backlight_resume()` which sets `fb_blank` to `FB_BLANK_POWERDOWN` on suspend and restores it on resume, triggering `update_status`.

The existing `ktd2801_update_status` already handles this correctly:
- `backlight_is_blank()` returning true triggers `expresswire_power_off()` (line 40)
- On resume, `expresswire_enable()` is called followed by the brightness write (lines 46-50)

The `was_on` tracking (lines 41, 45-48) ensures the enable/disable sequencing is correct across suspend/resume cycles.

The `Cc: stable@vger.kernel.org # v6.19` tag is appropriate since this is a bug fix for a driver introduced in that version.

No issues found.

---
Generated by Claude Code Patch Reviewer

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-03-31  7:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-28 20:42 [PATCH] backlight: ktd2801: enable BL_CORE_SUSPENDRESUME Duje Mihanović
2026-03-31  7:51 ` Claude review: " Claude Code Review Bot
2026-03-31  7:51 ` Claude Code Review Bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox