]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amd/display: Disable common modes for eDP
authorMario Limonciello <mario.limonciello@amd.com>
Tue, 3 Jun 2025 04:50:31 +0000 (23:50 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 18 Jun 2025 16:19:20 +0000 (12:19 -0400)
[Why]
Common modes are added to eDP for compatibility in clone mode, but
not all panels support them.  Non-native modes were disabled in the past
but this caused problems because compositors didn't use scaling for non
native modes. Now non-native modes on eDP will enable the scaler by
default.

[How]
Check the connector type.  If the connector is eDP avoid adding common
modes.

Reviewed-by: Roman Li <roman.li@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

index 12cbfd7ffbc7e33ce25a4e8e03ef97cd61ab8a7f..3972427f47961778d51505c9bd86b8c422304d50 100644 (file)
@@ -8364,7 +8364,7 @@ static int amdgpu_dm_connector_get_modes(struct drm_connector *connector)
                                drm_add_modes_noedid(connector, 1920, 1080);
        } else {
                amdgpu_dm_connector_ddc_get_modes(connector, drm_edid);
-               if (encoder)
+               if (encoder && connector->connector_type != DRM_MODE_CONNECTOR_eDP)
                        amdgpu_dm_connector_add_common_modes(encoder, connector);
                amdgpu_dm_connector_add_freesync_modes(connector, drm_edid);
        }