Skip to content

Commit 3362692

Browse files
superm1alexdeucher
authored andcommitted
drm/amd/display: Don't stretch non-native images by default in eDP
commit 978fa2f ("drm/amd/display: Use scaling for non-native resolutions on eDP") started using the GPU scaler hardware to scale when a non-native resolution was picked on eDP. This scaling was done to fill the screen instead of maintain aspect ratio. The idea was supposed to be that if a different scaling behavior is preferred then the compositor would request it. The not following aspect ratio behavior however isn't desirable, so adjust it to follow aspect ratio and still try to fill screen. Note: This will lead to black bars in some cases for non-native resolutions. Compositors can request the previous behavior if desired. Fixes: 978fa2f ("drm/amd/display: Use scaling for non-native resolutions on eDP") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4538 Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 825df7ff4bb1a383ad4827545e09aec60d230770)
1 parent 37e3567 commit 3362692

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8030,7 +8030,7 @@ static int dm_encoder_helper_atomic_check(struct drm_encoder *encoder,
80308030
"mode %dx%d@%dHz is not native, enabling scaling\n",
80318031
adjusted_mode->hdisplay, adjusted_mode->vdisplay,
80328032
drm_mode_vrefresh(adjusted_mode));
8033-
dm_new_connector_state->scaling = RMX_FULL;
8033+
dm_new_connector_state->scaling = RMX_ASPECT;
80348034
}
80358035
return 0;
80368036
}

0 commit comments

Comments
 (0)