mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hugo Sales <hugo@hsal.es>
To: Ray Wu <ray.wu@amd.com>,
	alexander.deucher@amd.com, sunpeng.li@amd.com,
	harry.wentland@amd.com, siqueira@igalia.com,
	amd-gfx@lists.freedesktop.org
Cc: simona@ffwll.ch, alex.hung@amd.com, mario.limonciello@amd.com,
	linux-kernel@vger.kernel.org, lohita.mudimela@amd.com,
	bhawanpreet.lakha@amd.com, dri-devel@lists.freedesktop.org,
	roman.li@amd.com, airlied@gmail.com, christian.koenig@amd.com
Subject: Re: [PATCH RFC RFT 0/8] drm/amd/display: Stop rounding backlight levels to whole percents
Date: Fri, 13 Nov 2026 21:11:36 +0000 (WET)	[thread overview]
Message-ID: <1406290810.470231.1794604296696@app.mailbox.org> (raw)
In-Reply-To: <7099a8ba-6508-4771-a97f-c681d0a8ceae@amd.com>

On 11/11/2026 9:22 AM WET Ray Wu <ray.wu@amd.com> wrote:
> Patches 2/8 and 3/8 (LUT interpolation in the power module) are still
> useful on top of it, and I have already given my Reviewed-by on those.
>
> Could you test it on your machine?

Hi Ray,

Thanks, and sorry for the delay. I tested your four patches with 2/8 and
3/8 on top, on an ASUS ROG Flow X13 GV301QH, a Cezanne laptop with a PWM
backlight. I have no AUX panel, so this only covers the PWM path

With ABM off, I wrote these levels to brightness and read
actual_brightness back:

   level   actual   PWM
       1        1   0x0004
     500      500   0x055d
    1000     1000   0x0ab9
    2000     1999   0x0f1c
   32768    32769   0x6263
   65534    65534   0xfffd

From 0 to 3000 in steps of 50, the 61 levels got 61 different PWM
values. Across the whole range, in steps of 1024, the PWM never went
down. With your patches alone, 1 to 655 read back as 0, 1000 as 655 and
65534 as 64880

v1's 4/8 still matters for released kernels. Since commit 3c108046e1d6
("drm/amd/display: Add power module on Linux") in 7.2, amdgpu_dm hands
the power module whole percents, so PWM panels get at most 101 levels.
Before it, amdgpu_dm passed a 16-bit PWM value straight to
dc_link_set_backlight_level(). Your series alone still rounds to whole
percents too, in the power module's LUT, so the rounding needs fixing
either way. 

Which would you prefer:

- I send a v2 now that fixes it on the current tree: 4/8 with a Fixes
  tag, plus 2/8, 3/8 and their tests, on top of "drm/amd/display: Fix
  the doubled AUX backlight minimum on the custom curve" [1]. Your
  series then replaces the amdgpu_dm part
- I wait for your series and fix it on top of that. Your series already
  removes the rounding in amdgpu_dm, so that only needs 2/8 and 3/8

Thanks,
Hugo

[1] https://lore.kernel.org/r/20261103-amdgpu-aux-curve-min-v1-0-62119efdcc6d@hsal.es

      reply	other threads:[~2026-11-13 21:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04  9:55 Hugo Sales
2026-11-04  9:55 ` [PATCH RFC RFT 1/8] drm/amd/display: Rename the user brightness range to user_min and user_max Hugo Sales
2026-11-04  9:55 ` [PATCH RFC RFT 2/8] drm/amd/display: Interpolate between backlight LUT entries Hugo Sales
2026-11-11  7:49   ` Ray Wu
2026-11-04  9:55 ` [PATCH RFC RFT 3/8] drm/amd/display: Interpolate when reading PWM back as a percentage Hugo Sales
2026-11-11  7:50   ` Ray Wu
2026-11-04  9:55 ` [PATCH RFC RFT 4/8] drm/amd/display: Stop rounding PWM brightness to whole percents Hugo Sales
2026-11-04  9:55 ` [PATCH RFC RFT 5/8] drm/amd/display: Add KUnit tests for the custom brightness curve Hugo Sales
2026-11-04  9:55 ` [PATCH RFC RFT 6/8] drm/amd/display: Add KUnit tests for backlight LUT interpolation Hugo Sales
2026-11-04  9:55 ` [PATCH RFC RFT 7/8] drm/amd/display: Map AUX brightness through the custom curve like PWM Hugo Sales
2026-11-04  9:55 ` [PATCH RFC RFT 8/8] drm/amd/display: Add KUnit tests for the AUX custom brightness curve Hugo Sales
2026-11-11  9:22 ` [PATCH RFC RFT 0/8] drm/amd/display: Stop rounding backlight levels to whole percents Ray Wu
2026-11-13 21:11   ` Hugo Sales [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=1406290810.470231.1794604296696@app.mailbox.org \
    --to=hugo@hsal.es \
    --cc=airlied@gmail.com \
    --cc=alex.hung@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=bhawanpreet.lakha@amd.com \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lohita.mudimela@amd.com \
    --cc=mario.limonciello@amd.com \
    --cc=ray.wu@amd.com \
    --cc=roman.li@amd.com \
    --cc=simona@ffwll.ch \
    --cc=siqueira@igalia.com \
    --cc=sunpeng.li@amd.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

all inboxes | Powered by JetHome®