Commit 9d77c95d authored by Tianci Yin's avatar Tianci Yin Committed by Zheng Zengkai
Browse files

drm/amd/display: Enable fast plane updates on DCN3.2 and above

stable inclusion
from stable-v6.6.3
commit 9a5ae53e0f46ab17176ae8c50de3318be10c00b6
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8LBQP

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=9a5ae53e0f46ab17176ae8c50de3318be10c00b6



--------------------------------

commit 435f5b369657cffee4b04db1f5805b48599f4dbe upstream.

[WHY]
When cursor moves across screen boarder, lag cursor observed,
since subvp settings need to sync up with vblank that causes
cursor updates being delayed.

[HOW]
Enable fast plane updates on DCN3.2 to fix it.

Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Reviewed-by: default avatarAurabindo Pillai <aurabindo.pillai@amd.com>
Acked-by: default avatarAlex Hung <alex.hung@amd.com>
Signed-off-by: default avatarTianci Yin <tianci.yin@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 9f3a9e2a
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -9541,14 +9541,14 @@ static bool should_reset_plane(struct drm_atomic_state *state,
	struct drm_plane *other;
	struct drm_plane_state *old_other_state, *new_other_state;
	struct drm_crtc_state *new_crtc_state;
	struct amdgpu_device *adev = drm_to_adev(plane->dev);
	int i;

	/*
	 * TODO: Remove this hack once the checks below are sufficient
	 * enough to determine when we need to reset all the planes on
	 * the stream.
	 * TODO: Remove this hack for all asics once it proves that the
	 * fast updates works fine on DCN3.2+.
	 */
	if (state->allow_modeset)
	if (adev->ip_versions[DCE_HWIP][0] < IP_VERSION(3, 2, 0) && state->allow_modeset)
		return true;

	/* Exit early if we know that we're adding or removing the plane. */