dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] drm/amd/display: fix brightness ownership through power module
@ 2026-09-02 12:31 Andrei Rusu de Castro
  2026-09-02 12:31 ` [PATCH 1/4] drm/amd/display: keep custom brightness curve in userspace domain Andrei Rusu de Castro
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Andrei Rusu de Castro @ 2026-09-02 12:31 UTC (permalink / raw)
  To: amd-gfx
  Cc: harry.wentland, sunpeng.li, siqueira, alexander.deucher,
	christian.koenig, airlied, simona, alex.hung, roman.li,
	mario.limonciello, dri-devel, linux-kernel, chen-yu.chen, ray.wu

Linux passes PWM eDP brightness through two owners. The display manager
maps the request into the firmware range and applies the ATIF custom
curve. The power module then derives a percentage from that hardware
value and applies the same curve and range again. A non-zero firmware
minimum consequently prevents zero from reaching the panel minimum.
The split also leaves the custom-curve disable policy and final PWM mask
attached to the wrong owner.

Patch 1 keeps pre-power-module custom-curve output in the userspace
domain, which also fixes affected stable kernels. Patch 2 covers that
conversion with a non-zero firmware minimum. Patch 3 passes zero-anchored
millipercent into the power module and moves the panel policy, curve,
range, trace units, and final effective-PWM mask to that owner. Patch 4
covers ordinary PWM, forced PWM, AMD-AUX fallback, true AUX, multiple
panels, endpoints, interior values, clamping, and invalid ranges.

The complete series passed all 85 AMD backlight UML KUnit cases on the
current base and after clean application to Linux 7.3-rc1. It was built
into one kernel, booted on two Strix Halo systems, and produced the same
AMDGPU module on both. An instrumented physical panel test observed:

  request 0     -> 0 millipercent      -> PWM 3084  -> success
  request 65535 -> 100000 millipercent -> PWM 65535 -> success

The panel visibly reached minimum and maximum brightness, then returned
to its starting level. No fatal kernel event followed. The true AUX path
was covered by KUnit but was not available for a physical test. The
existing LUT-unaware hardware readback inverse is unchanged.

Andrei Rusu de Castro (4):
  drm/amd/display: keep custom brightness curve in userspace domain
  drm/amd/display: test custom brightness with non-zero minimum
  drm/amd/display: pass userspace brightness to power module
  drm/amd/display: test power module brightness input domain

 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |   6 +-
 .../display/amdgpu_dm/amdgpu_dm_backlight.c   |  59 ++-
 .../display/amdgpu_dm/amdgpu_dm_backlight.h   |   5 +-
 .../amd/display/amdgpu_dm/amdgpu_dm_trace.h   |   3 +-
 .../tests/amdgpu_dm_backlight_test.c          | 447 +++++++++++++++++-
 .../drm/amd/display/modules/inc/mod_power.h   |   1 +
 .../gpu/drm/amd/display/modules/power/power.c |   2 +
 .../drm/amd/display/modules/power/power_abm.c |   6 +-
 .../amd/display/modules/power/power_helpers.h |   1 +
 9 files changed, 494 insertions(+), 36 deletions(-)



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

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

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-02 12:31 [PATCH 0/4] drm/amd/display: fix brightness ownership through power module Andrei Rusu de Castro
2026-09-02 12:31 ` [PATCH 1/4] drm/amd/display: keep custom brightness curve in userspace domain Andrei Rusu de Castro
2026-09-02 12:31 ` [PATCH 2/4] drm/amd/display: test custom brightness with non-zero minimum Andrei Rusu de Castro
2026-09-02 12:32 ` [PATCH 3/4] drm/amd/display: pass userspace brightness to power module Andrei Rusu de Castro
2026-09-02 12:57   ` sashiko-bot
2026-09-02 12:33 ` [PATCH 4/4] drm/amd/display: test power module brightness input domain Andrei Rusu de Castro
2026-09-02 22:31 ` [PATCH v2 0/4] drm/amd/display: fix brightness ownership through power module Andrei Rusu de Castro
2026-09-02 22:31   ` [PATCH v2 1/4] drm/amd/display: keep custom brightness curve in userspace domain Andrei Rusu de Castro
2026-09-02 22:31   ` [PATCH v2 2/4] drm/amd/display: test custom brightness with non-zero minimum Andrei Rusu de Castro
2026-09-02 22:31   ` [PATCH v2 3/4] drm/amd/display: pass userspace brightness to power module Andrei Rusu de Castro
2026-09-03  7:50     ` sashiko-bot
2026-09-02 22:32   ` [PATCH v2 4/4] drm/amd/display: test power module brightness input domain Andrei Rusu de Castro

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