From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Sasha Levin <sashal@kernel.org>,
dillon.varone@amd.com, dri-devel@lists.freedesktop.org,
Alex Hung <alex.hung@amd.com>,
airlied@gmail.com, qingqing.zhuo@amd.com, Xinhui.Pan@amd.com,
Rodrigo.Siqueira@amd.com, amd-gfx@lists.freedesktop.org,
sunpeng.li@amd.com, aurabindo.pillai@amd.com, alvin.lee2@amd.com,
daniel@ffwll.ch, Alex Deucher <alexander.deucher@amd.com>,
jun.lei@amd.com, Harry Wentland <harry.wentland@amd.com>,
christian.koenig@amd.com
Subject: [PATCH AUTOSEL 5.10 09/28] drm/amd/display: Fix writeback_info never got updated
Date: Mon, 22 Jan 2024 10:14:35 -0500 [thread overview]
Message-ID: <20240122151521.996443-9-sashal@kernel.org> (raw)
In-Reply-To: <20240122151521.996443-1-sashal@kernel.org>
From: Alex Hung <alex.hung@amd.com>
[ Upstream commit 8a307777c36e15f38c9f23778babcd368144c7d8 ]
[WHY]
wb_enabled field is set to false before it is used, and the following
code will never be executed.
[HOW]
Setting wb_enable to false after all removal work is completed.
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
index 8206c6edba74..c54691166871 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
@@ -481,18 +481,13 @@ bool dc_stream_remove_writeback(struct dc *dc,
return false;
}
-// stream->writeback_info[dwb_pipe_inst].wb_enabled = false;
- for (i = 0; i < stream->num_wb_info; i++) {
- /*dynamic update*/
- if (stream->writeback_info[i].wb_enabled &&
- stream->writeback_info[i].dwb_pipe_inst == dwb_pipe_inst) {
- stream->writeback_info[i].wb_enabled = false;
- }
- }
-
/* remove writeback info for disabled writeback pipes from stream */
for (i = 0, j = 0; i < stream->num_wb_info; i++) {
if (stream->writeback_info[i].wb_enabled) {
+
+ if (stream->writeback_info[i].dwb_pipe_inst == dwb_pipe_inst)
+ stream->writeback_info[i].wb_enabled = false;
+
if (i != j)
/* trim the array */
stream->writeback_info[j] = stream->writeback_info[i];
--
2.43.0
next prev parent reply other threads:[~2024-01-22 15:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240122151521.996443-1-sashal@kernel.org>
2024-01-22 15:14 ` [PATCH AUTOSEL 5.10 07/28] drm/amd/display: Fix tiled display misalignment Sasha Levin
2024-01-22 15:14 ` Sasha Levin [this message]
2024-01-22 15:14 ` [PATCH AUTOSEL 5.10 26/28] drm/amd/display: make flip_timestamp_in_us a 64-bit variable Sasha Levin
2024-01-22 15:14 ` [PATCH AUTOSEL 5.10 27/28] drm/amdgpu: Let KFD sync with VM fences Sasha Levin
2024-01-22 15:14 ` [PATCH AUTOSEL 5.10 28/28] drm/amdgpu: Drop 'fence' check in 'to_amdgpu_amdkfd_fence()' Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240122151521.996443-9-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=Rodrigo.Siqueira@amd.com \
--cc=Xinhui.Pan@amd.com \
--cc=airlied@gmail.com \
--cc=alex.hung@amd.com \
--cc=alexander.deucher@amd.com \
--cc=alvin.lee2@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=aurabindo.pillai@amd.com \
--cc=christian.koenig@amd.com \
--cc=daniel@ffwll.ch \
--cc=dillon.varone@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=jun.lei@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=qingqing.zhuo@amd.com \
--cc=stable@vger.kernel.org \
--cc=sunpeng.li@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox