]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amd/display: Change Brightness Control Priority
authorMuyuan Yang <muyuan.yang@amd.com>
Wed, 5 Jun 2024 14:24:59 +0000 (10:24 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 1 Oct 2024 21:37:21 +0000 (17:37 -0400)
Prioritize Aux-based over PWM-based brightness control
for more types of panels and introduce a new structure
to store and manage the type of brightness control used.

Reviewed-by: Anthony Koo <anthony.koo@amd.com>
Signed-off-by: Muyuan Yang <muyuan.yang@amd.com>
Signed-off-by: Fangzhi Zuo <jerry.zuo@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dc.h
drivers/gpu/drm/amd/display/dc/dc_types.h

index 8878a770c376574a68c49d5c35b590c9b53d0eb8..059e5f4ede49270b84fee7836952a9f898435835 100644 (file)
@@ -1786,6 +1786,7 @@ struct dc_link {
        // BW ALLOCATON USB4 ONLY
        struct dc_dpia_bw_alloc dpia_bw_alloc_config;
        bool skip_implict_edp_power_control;
+       enum backlight_control_type backlight_control_type;
 };
 
 /* Return an enumerated dc_link.
index b0b7102fdbc75dd723191a601d430076b5c15ac2..3401f4c9fb10e90b6ab6e92c2516bb6fa91a195c 100644 (file)
@@ -923,6 +923,12 @@ struct display_endpoint_id {
        enum display_endpoint_type ep_type;
 };
 
+enum backlight_control_type {
+       BACKLIGHT_CONTROL_PWM = 0,
+       BACKLIGHT_CONTROL_VESA_AUX = 1,
+       BACKLIGHT_CONTROL_AMD_AUX = 2,
+};
+
 #if defined(CONFIG_DRM_AMD_SECURE_DISPLAY)
 struct otg_phy_mux {
        uint8_t phy_output_num;