Skip to content

Commit

Permalink
https://gitlab.freedesktop.org/drm/amd/-/issues/3441#note_2535944
Browse files Browse the repository at this point in the history
  • Loading branch information
fewtarius committed Aug 21, 2024
1 parent 7935e53 commit 950d98d
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
From e061400d7b09c27ffa14fa160733043fa5e23733 Mon Sep 17 00:00:00 2001
From: Melissa Wen <[email protected]>
Date: Tue, 20 Aug 2024 20:32:19 -0100
Subject: [PATCH] drm/amd/display: let update_planes_and_stream_state defines
minimal state

We see artifacts when using current state as the minimal one in a
context where update_planes_and_stream_state set the update type as
FULL. Therefore, instead of define the minimal state by adding or
removing planes, let update_planes_and_stream_state define the proper
state.

Signed-off-by: Melissa Wen <[email protected]>
---
drivers/gpu/drm/amd/display/dc/core/dc.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index c8dabb081b3d..599633649012 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -4883,11 +4883,6 @@ static bool update_planes_and_stream_v2(struct dc *dc,
surface_count,
&is_plane_addition);

- /* on plane addition, minimal state is the current one */
- if (force_minimal_pipe_splitting && is_plane_addition &&
- !commit_minimal_transition_state(dc, dc->current_state))
- return false;
-
if (!update_planes_and_stream_state(
dc,
srf_updates,
@@ -4898,13 +4893,14 @@ static bool update_planes_and_stream_v2(struct dc *dc,
&context))
return false;

- /* on plane removal, minimal state is the new one */
- if (force_minimal_pipe_splitting && !is_plane_addition) {
+ /* minimal state is the determined by update_planes_and_stream_state: current or new context */
+ if (force_minimal_pipe_splitting) {
if (!commit_minimal_transition_state(dc, context)) {
dc_state_release(context);
return false;
}
- update_type = UPDATE_TYPE_FULL;
+ if (!is_plane_addition)
+ update_type = UPDATE_TYPE_FULL;
}

if (dc->hwss.is_pipe_topology_transition_seamless &&
--
2.43.0

4 changes: 3 additions & 1 deletion PKGBUILD/linux/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

pkgbase=linux
pkgver=6.10.6
pkgrel=1
pkgrel=2
pkgdesc="Linux Stable"
arch=(x86_64)
url="https://kernel.org/"
Expand Down Expand Up @@ -53,6 +53,7 @@ source=(
0038-fixup-aw87xx-warnings.patch
0040-Add-Atari-VCS-quirk.patch
0050-AMD-Pstate-Core-Performance-Boost.patch
0051-drm-amd-display-let-update_planes_and_stream_state-d.patch
0099-add-ayaneo-and-ayn-platform-drivers.patch
)
validpgpkeys=(
Expand All @@ -78,6 +79,7 @@ sha256sums=('SKIP'
'23d91695bf8e5d5cdb9503a47468c6c5cf220bc7966a4720aa46645357e29ee6' # 0038-fixup-aw87xx-warnings.patch
'1822769c05fd3b2126870a853c41ab167a95cf91d23f0d50bb103838857489eb' # 0040-Add-Atari-VCS-quirk.patch
'c6ff653b1e55c5524b237a40683a34240d4ec7b95e524441ed3ae09ed885f674' # 0050-AMD-Pstate-Core-Performance-Boost.patch
'7c7df8d4427c807e2cea0f1e147efcdfb1e7c1c5271823cc6bb49f10b1846d19' # 0051-drm-amd-display-let-update_planes_and_stream_state-d.patch
'23673c33ea69f3508ff9265d27171e2e58899950d563a1726a6049afe9e92067' # 0099-add-ayaneo-and-ayn-platform-drivers.patch
)

Expand Down

0 comments on commit 950d98d

Please sign in to comment.