convert_custom_brightness() adds the firmware minimum before
convert_brightness_from_user() applies it again, so a zero request
through a custom curve never reaches the panel minimum. Patch 1 keeps
the curve output in the userspace domain. Patch 2 adds KUnit coverage
with a non-zero firmware minimum.

Changes in v3:

- rebase onto amd-staging-drm-next (77f548b12);
- drop v2 patches 3 and 4, which changed the PWM path to the power
  module; "drm/amd/display: map PWM brightness through custom backlight
  curve" has since reworked that path;
- describe which panels still reach the helper: AUX panels with a custom
  curve, and PWM panels on stable kernels before the power module.

The amdgpu_dm KUnit suites were run under UML on this base with and
without the series: 1897 and 1906 cases, all passing; the backlight
suite goes from 70 to 79 cases. The rebase and the test runs were
LLM-assisted.

v2: https://lore.kernel.org/r/[email protected]

Andrei Rusu de Castro (2):
  drm/amd/display: keep custom brightness curve in userspace domain
  drm/amd/display: test custom brightness with non-zero minimum

 .../display/amdgpu_dm/amdgpu_dm_backlight.c   |  13 +-
 .../display/amdgpu_dm/amdgpu_dm_backlight.h   |   3 +-
 .../tests/amdgpu_dm_backlight_test.c          | 294 +++++++++++++++++-
 3 files changed, 286 insertions(+), 24 deletions(-)


base-commit: 77f548b127c6de34ce271fa09ba270cb1ef9f2da
-- 
2.56.0


Reply via email to