[PATCH] drm/amdgpu/display: only enable aux backlight control for OLED panels

Li, Roman Roman.Li at amd.com
Mon Jul 26 19:05:31 UTC 2021


[Public]

Reviewed-by: Roman Li <Roman.Li at amd.com>

-----Original Message-----
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of Alex Deucher
Sent: Wednesday, July 21, 2021 6:18 PM
To: amd-gfx at lists.freedesktop.org
Cc: Deucher, Alexander <Alexander.Deucher at amd.com>
Subject: [PATCH] drm/amdgpu/display: only enable aux backlight control for OLED panels

We've gotten a number of reports about backlight control not working on panels which indicate that they use aux backlight control.  A recent patch:

commit 2d73eabe2984a435737498ab39bb1500a9ffe9a9
Author: Camille Cho <Camille.Cho at amd.com>
Date:   Thu Jul 8 18:28:37 2021 +0800

    drm/amd/display: Only set default brightness for OLED

    [Why]
    We used to unconditionally set backlight path as AUX for panels capable
    of backlight adjustment via DPCD in set default brightness.

    [How]
    This should be limited to OLED panel only since we control backlight via
    PWM path for SDR mode in LCD HDR panel.

    Reviewed-by: Krunoslav Kovac <krunoslav.kovac at amd.com>
    Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira at amd.com>
    Signed-off-by: Camille Cho <Camille.Cho at amd.com>
    Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

Changes some other code to only use aux for backlight control on OLED panels.  The commit message seems to indicate that PWM should be used for SDR mode on HDR panels.  Do something similar for backlight control in general.  This may need to be revisited if and when HDR started to get used.

Bug: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Fdrm%2Famd%2F-%2Fissues%2F1438&data=04%7C01%7Croman.li%40amd.com%7Caf093dc8782244c1a61008d94c9579a5%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637625027141336218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=lSPNjXlohpn%2FZ4kRFp0Y7Ir4qY8pNBSbHiGlccvBSRY%3D&reserved=0
Bug: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.kernel.org%2Fshow_bug.cgi%3Fid%3D213715&data=04%7C01%7Croman.li%40amd.com%7Caf093dc8782244c1a61008d94c9579a5%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637625027141336218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Km4sba6yF0UFMd8mTCamMJ2SaZrFQSkc7PNDLmptsO4%3D&reserved=0
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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 12db13d2bce9..986c9d29d686 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -2436,9 +2436,9 @@ static void update_connector_ext_caps(struct amdgpu_dm_connector *aconnector)
        max_cll = conn_base->hdr_sink_metadata.hdmi_type1.max_cll;
        min_cll = conn_base->hdr_sink_metadata.hdmi_type1.min_cll;

-       if (caps->ext_caps->bits.oled == 1 ||
+       if (caps->ext_caps->bits.oled == 1 /*||
            caps->ext_caps->bits.sdr_aux_backlight_control == 1 ||
-           caps->ext_caps->bits.hdr_aux_backlight_control == 1)
+           caps->ext_caps->bits.hdr_aux_backlight_control == 1*/)
                caps->aux_support = true;

        if (amdgpu_backlight == 0)
--
2.31.1

_______________________________________________
amd-gfx mailing list
amd-gfx at lists.freedesktop.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Croman.li%40amd.com%7Caf093dc8782244c1a61008d94c9579a5%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637625027141336218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=ttvmpBk9TOJvgr3HBPIW0VFFHvxiAZ4nvNx2pJfpz08%3D&reserved=0


More information about the amd-gfx mailing list