summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
diff options
context:
space:
mode:
authorShirish S2017-10-27 05:25:55 +0200
committerAlex Deucher2017-10-27 19:15:57 +0200
commit7bef1af3b9c2a5690a41298b5986dbde82fbedbc (patch)
treedfaa8c5eafd02f030c5f55edca22b979f6bc3ccf /drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
parentdrm/amd/display: fix high part address in dm_plane_helper_prepare_fb() (diff)
downloadkernel-qcow2-linux-7bef1af3b9c2a5690a41298b5986dbde82fbedbc.tar.gz
kernel-qcow2-linux-7bef1af3b9c2a5690a41298b5986dbde82fbedbc.tar.xz
kernel-qcow2-linux-7bef1af3b9c2a5690a41298b5986dbde82fbedbc.zip
drm/amd/display: check if modeset is required before adding plane
Adding affected planes without checking if modeset is requested from the user space causes performance regression in video p/b scenarios when full screen p/b is not composited. Hence add a check before adding a plane as affected. bug: https://bugs.freedesktop.org/show_bug.cgi?id=103408 Acked-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Shirish S <shirish.s@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c')
-rw-r--r--drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index c2fefd3e657e..fd3e995fc426 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -4653,6 +4653,9 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
}
} else {
for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) {
+ if (!drm_atomic_crtc_needs_modeset(new_crtc_state))
+ continue;
+
if (!new_crtc_state->enable)
continue;