All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@kernel.org
To: dri-devel@lists.freedesktop.org
Subject: [Bug 221865] New: amdgpu: brightness 100% blacks out screen
Date: Mon, 10 Aug 2026 14:25:37 +0000	[thread overview]
Message-ID: <bug-221865-2300@https.bugzilla.kernel.org/> (raw)

https://bugzilla.kernel.org/show_bug.cgi?id=221865

            Bug ID: 221865
           Summary: amdgpu: brightness 100% blacks out screen
           Product: Drivers
           Version: 2.5
          Hardware: AMD
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: Video(DRI - non Intel)
          Assignee: drivers_video-dri@kernel-bugs.osdl.org
          Reporter: me@metantesan.com
        Regression: No

Hardware:
- ASUS ROG laptop, AMD Phoenix1 APU (DCN 3.1.4), eDP panel BOE NE134WUM-N82
(EISA BOE0B4A)
- Kernel 7.1.6 (regression: 7.1.5 works fine)
Symptom: Setting backlight above ~98.4% makes the internal display go black.
Setting it back down recovers instantly.
Diagnosis via amdgpu_dm_brightness tracepoint (/sys/kernel/tracing):
requested=64200 converted=65302  (works)
requested=64300 converted=65535  (true max, works)
requested=64500 converted=65535  (true max, works)
requested=64540 converted=65768  (> 65535, BLACK)
requested=65535 converted=66702  (> 65535, BLACK)
Root cause: convert_custom_brightness() in
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:
*user_brightness = scale_fw_to_input(min, max, DIV_ROUND_CLOSEST(lum *
brightness, 101));
The panel's ATIF QUERY_BRIGHTNESS_TRANSFER_CHARACTERISTICS (from ASUS BIOS)
returns luminance data points >100 (~103). So lum * brightness / 101 exceeds
65535, and the result is passed as backlight_pwm_u16_16 (u16) to
dc_link_set_backlight_level(), truncating to ~232 → black screen.
Regression: 7.1.6 changed amdgpu_dm_register_backlight_device() from
props.max_brightness = max - min / (max-min)*level/100 to max / max*level/100,
exposing the overflow zone to userspace. 7.1.5's 100% mapped below the overflow
threshold.
Suggested fix: clamp the converted level to max (this is what the hardware
accepts — 65535 is valid full brightness, the plateau at requested 64300–64500
proves it):
static u32 convert_brightness_from_user(const struct amdgpu_dm_backlight_caps
*caps, uint32_t brightness)
{
    unsigned int min, max;

    if (!get_brightness_range(caps, &min, &max))
        return brightness;

    convert_custom_brightness(caps, min, max, &brightness);

    return min_t(u32, min + DIV_ROUND_CLOSEST_ULL((u64)(max - min) *
brightness, max), max);
}

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

             reply	other threads:[~2026-08-10 14:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-10 14:25 bugzilla-daemon [this message]
2026-08-10 14:27 ` [Bug 221865] amdgpu: brightness 100% blacks out screen bugzilla-daemon
2026-08-10 14:28 ` bugzilla-daemon
2026-08-10 15:32 ` bugzilla-daemon

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=bug-221865-2300@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.