]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amd/display: Use scaling for non-native resolutions on LVDS
authorAlex Deucher <alexander.deucher@amd.com>
Tue, 1 Jul 2025 20:13:17 +0000 (16:13 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 7 Jul 2025 17:48:47 +0000 (13:48 -0400)
[Why]
Common resolutions are added to supported modes to enable compatibility
scenarios that compositors may use to do things like clone displays. There
is no guarantee however that the panel will natively support these modes.

[How]
If the compositor hasn't enabled scaling but a non-native resolution has
been picked for an LVDS panel turn the scaler on anyway.  This will ensure
compatibility.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

index 7a4fca9a61bbea9d3f076a93766b9fb3906fe8db..096b23ad4845d365dad707deed4e3e84b1f9945d 100644 (file)
@@ -7901,7 +7901,8 @@ static int dm_encoder_helper_atomic_check(struct drm_encoder *encoder,
        int clock, bpp = 0;
        bool is_y420 = false;
 
-       if (connector->connector_type == DRM_MODE_CONNECTOR_eDP) {
+       if ((connector->connector_type == DRM_MODE_CONNECTOR_eDP) ||
+           (connector->connector_type == DRM_MODE_CONNECTOR_LVDS)) {
                struct amdgpu_encoder *amdgpu_encoder = to_amdgpu_encoder(encoder);
                struct drm_display_mode *native_mode = &amdgpu_encoder->native_mode;
                enum drm_mode_status result;