All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mario Limonciello <superm1@kernel.org>
To: amd-gfx@lists.freedesktop.org
Cc: Kaitlyn.Tse@amd.com, nicholas.kazlauskas@amd.com,
	zaeem.mohamed@amd.com, daniel.wheeler@amd.com,
	harry.wentland@amd.com, regressions@lists.linux.dev,
	Mario Limonciello <mario.limonciello@amd.com>,
	Luke Jones <luke@ljones.dev>
Subject: [PATCH] drm/amd/display: Fix programming backlight on OLED panels
Date: Wed, 27 Nov 2024 21:22:00 -0600	[thread overview]
Message-ID: <20241128032200.2085398-1-superm1@kernel.org> (raw)

From: Mario Limonciello <mario.limonciello@amd.com>

commit 38077562e0594 ("drm/amd/display: Implement new
backlight_level_params structure") adjusted DC core to require
the backlight type to be programmed in the dc link when changing
brightness.  This isn't initialized in amdgpu_dm for OLED panels
though which broke brightness.

Explicitly initialize when aux support is enabled.

Reported-and-tested-by: Luke Jones <luke@ljones.dev>
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3792
Fixes: 38077562e059 ("drm/amd/display: Implement new backlight_level_params structure")
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++
 1 file changed, 2 insertions(+)

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 19a58630e7740..243cee2841312 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -3483,6 +3483,8 @@ static void update_connector_ext_caps(struct amdgpu_dm_connector *aconnector)
 		caps->aux_support = false;
 	else if (amdgpu_backlight == 1)
 		caps->aux_support = true;
+	if (caps->aux_support)
+		aconnector->dc_link->backlight_control_type = BACKLIGHT_CONTROL_AMD_AUX;
 
 	luminance_range = &conn_base->display_info.luminance_range;
 
-- 
2.43.0


             reply	other threads:[~2024-11-28  3:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-28  3:22 Mario Limonciello [this message]
2024-11-28 16:14 ` [PATCH] drm/amd/display: Fix programming backlight on OLED panels Harry Wentland
  -- strict thread matches above, loose matches on Subject: below --
2024-12-04 18:13 Kainoa

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=20241128032200.2085398-1-superm1@kernel.org \
    --to=superm1@kernel.org \
    --cc=Kaitlyn.Tse@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=daniel.wheeler@amd.com \
    --cc=harry.wentland@amd.com \
    --cc=luke@ljones.dev \
    --cc=mario.limonciello@amd.com \
    --cc=nicholas.kazlauskas@amd.com \
    --cc=regressions@lists.linux.dev \
    --cc=zaeem.mohamed@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 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.