From: Edson Juliano Drosdeck <edson.drosdeck@gmail.com>
To: harry.wentland@amd.com
Cc: sunpeng.li@amd.com, siqueira@igalia.com,
alexander.deucher@amd.com, christian.koenig@amd.com,
airlied@gmail.com, simona@ffwll.ch, mario.limonciello@amd.com,
alex.hung@amd.com, Wayne.Lin@amd.com, timur.kristof@gmail.com,
superm1@kernel.org, aurabindo.pillai@amd.com,
ivan.lipski@amd.com, chen-yu.chen@amd.com,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, edson.drosdeck@gmail.com
Subject: [PATCH] drm/amd/display: Avoid using zero AC/DC brightness levels
Date: Tue, 26 May 2026 18:00:48 -0300 [thread overview]
Message-ID: <20260526210048.1162477-1-edson.drosdeck@gmail.com> (raw)
Some systems report zero AC/DC brightness levels during
backlight initialization, causing the panel brightness to
start at the minimum level on boot.
Only use the firmware brightness levels when both AC and DC
values are non-zero
Signed-off-by: Edson Juliano Drosdeck <edson.drosdeck@gmail.com>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 5fc5d5608506..f947ce2a8625 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -5380,7 +5380,9 @@ amdgpu_dm_register_backlight_device(struct amdgpu_dm_connector *aconnector)
}
caps = &dm->backlight_caps[aconnector->bl_idx];
- if (get_brightness_range(caps, &min, &max)) {
+ if (get_brightness_range(caps, &min, &max) &&
+ caps->ac_level > 0 &&
+ caps->dc_level > 0) {
if (power_supply_is_system_supplied() > 0)
props.brightness = DIV_ROUND_CLOSEST((max - min) * caps->ac_level, 100);
else
--
2.47.3
next reply other threads:[~2026-05-27 7:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-26 21:00 Edson Juliano Drosdeck [this message]
2026-05-28 2:44 ` Claude review: drm/amd/display: Avoid using zero AC/DC brightness levels Claude Code Review Bot
2026-05-28 2:44 ` Claude Code Review Bot
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=20260526210048.1162477-1-edson.drosdeck@gmail.com \
--to=edson.drosdeck@gmail.com \
--cc=Wayne.Lin@amd.com \
--cc=airlied@gmail.com \
--cc=alex.hung@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=aurabindo.pillai@amd.com \
--cc=chen-yu.chen@amd.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=ivan.lipski@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=simona@ffwll.ch \
--cc=siqueira@igalia.com \
--cc=sunpeng.li@amd.com \
--cc=superm1@kernel.org \
--cc=timur.kristof@gmail.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