]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amd/display: Don't allow OLED to go down to fully off
authorMario Limonciello <mario.limonciello@amd.com>
Thu, 19 Jun 2025 14:29:13 +0000 (09:29 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 30 Jun 2025 15:59:09 +0000 (11:59 -0400)
[Why]
OLED panels can be fully off, but this behavior is unexpected.

[How]
Ensure that minimum luminance is at least 1.

Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4338
Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Ray Wu <ray.wu@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

index 9310cb7629a2087363cbd4c21286037b80075c0b..3dd4f9e9931d27e7d056f26991d19081f4eedb7b 100644 (file)
@@ -3644,13 +3644,15 @@ static void update_connector_ext_caps(struct amdgpu_dm_connector *aconnector)
 
        luminance_range = &conn_base->display_info.luminance_range;
 
-       if (luminance_range->max_luminance) {
-               caps->aux_min_input_signal = luminance_range->min_luminance;
+       if (luminance_range->max_luminance)
                caps->aux_max_input_signal = luminance_range->max_luminance;
-       } else {
-               caps->aux_min_input_signal = 0;
+       else
                caps->aux_max_input_signal = 512;
-       }
+
+       if (luminance_range->min_luminance)
+               caps->aux_min_input_signal = luminance_range->min_luminance;
+       else
+               caps->aux_min_input_signal = 1;
 
        min_input_signal_override = drm_get_panel_min_brightness_quirk(aconnector->drm_edid);
        if (min_input_signal_override >= 0)