]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: Fix GPU scaling regression by FS video support
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Wed, 19 May 2021 20:12:19 +0000 (16:12 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 2 Jun 2021 21:48:32 +0000 (17:48 -0400)
commit0830c0a5e204c0d0e63d87628c574b1d728d853f
tree03b903629174a30e2b6ae49d1fcf005480d67e68
parentb6867ecb1c5c68ec44d6d6ae547d04dcb4f6cd0f
drm/amd/display: Fix GPU scaling regression by FS video support

[Why]
FS video support regressed GPU scaling and the scaled buffer ends up
stuck in the top left of the screen at native size - full, aspect,
center scaling modes do not function.

This is because decide_crtc_timing_for_drm_display_mode() does not
get called when scaling is enabled.

[How]
Split recalculate timing and scaling into two different flags.

We don't want to call drm_mode_set_crtcinfo() for scaling, but we
do want to call it for FS video.

Optimize and move preferred_refresh calculation next to
decide_crtc_timing_for_drm_display_mode() like it used to be since
that's not used for FS video.

We don't need to copy over the VIC or polarity in the case of FS video
modes because those don't change.

Fixes: 241bd8dda2d00b ("drm/amd/display: Skip modeset for front porch change")
Cc: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-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