From: Andrey Grodzovsky Date: Thu, 18 May 2017 17:35:22 +0000 (-0400) Subject: drm/amd/display: Remove redundant condition. X-Git-Tag: v4.15~362^2~23^2~473 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=83dc211702cb18e62741379fef48f2629b1c983c;p=mirror_ubuntu-bionic-kernel.git drm/amd/display: Remove redundant condition. You cannot have modeset and flip in the same call for same CRTC, in such case it will be set mode and set plane, not a flip. Signed-off-by: Andrey Grodzovsky Reviewed-by: Andrey Grodzovsky Acked-by: Harry Wentland Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c index a5b7c054d853..b3a4605858c1 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c @@ -3115,15 +3115,9 @@ int amdgpu_dm_atomic_check(struct drm_device *dev, action = get_dm_commit_action(crtc->state); - /* Surfaces are created under two scenarios: - * 1. This commit is not a page flip. - * 2. This commit is a page flip, and streams are created. - */ crtc_state = drm_atomic_get_crtc_state(state, crtc); pflip_needed = !state->allow_modeset; - if (!pflip_needed || - action == DM_COMMIT_ACTION_DPMS_ON || - action == DM_COMMIT_ACTION_SET) { + if (!pflip_needed) { struct dc_surface *surface; list_for_each_entry(connector,