public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Alex Hung <alex.hung@amd.com>,
	Harry Wentland <harry.wentland@amd.com>,
	Alex Deucher <alexander.deucher@amd.com>,
	Sasha Levin <sashal@kernel.org>,
	sunpeng.li@amd.com, Rodrigo.Siqueira@amd.com,
	christian.koenig@amd.com, Xinhui.Pan@amd.com, airlied@gmail.com,
	daniel@ffwll.ch, alvin.lee2@amd.com, wayne.lin@amd.com,
	dillon.varone@amd.com, qingqing.zhuo@amd.com,
	aurabindo.pillai@amd.com, amd-gfx@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org
Subject: [PATCH AUTOSEL 5.4 06/24] drm/amd/display: Fix writeback_info never got updated
Date: Mon, 22 Jan 2024 10:16:20 -0500	[thread overview]
Message-ID: <20240122151659.997085-6-sashal@kernel.org> (raw)
In-Reply-To: <20240122151659.997085-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 71b10b45a9b9..6e2b7bb47f38 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
@@ -448,18 +448,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


  parent reply	other threads:[~2024-01-22 15:17 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-22 15:16 [PATCH AUTOSEL 5.4 01/24] f2fs: fix to check return value of f2fs_reserve_new_block() Sasha Levin
2024-01-22 15:16 ` [PATCH AUTOSEL 5.4 02/24] ALSA: hda: Refer to correct stream index at loops Sasha Levin
2024-01-22 15:16 ` [PATCH AUTOSEL 5.4 03/24] ASoC: doc: Fix undefined SND_SOC_DAPM_NOPM argument Sasha Levin
2024-01-22 15:16 ` [PATCH AUTOSEL 5.4 04/24] fast_dput(): handle underflows gracefully Sasha Levin
2024-01-22 15:16 ` [PATCH AUTOSEL 5.4 05/24] RDMA/IPoIB: Fix error code return in ipoib_mcast_join Sasha Levin
2024-01-22 15:16 ` Sasha Levin [this message]
2024-01-22 15:16 ` [PATCH AUTOSEL 5.4 07/24] drm/drm_file: fix use of uninitialized variable Sasha Levin
2024-01-22 15:16 ` [PATCH AUTOSEL 5.4 08/24] drm/framebuffer: Fix " Sasha Levin
2024-01-22 15:16 ` [PATCH AUTOSEL 5.4 09/24] drm/mipi-dsi: Fix detach call without attach Sasha Levin
2024-01-22 15:16 ` [PATCH AUTOSEL 5.4 10/24] media: stk1160: Fixed high volume of stk1160_dbg messages Sasha Levin
2024-01-22 15:16 ` [PATCH AUTOSEL 5.4 11/24] media: rockchip: rga: fix swizzling for RGB formats Sasha Levin
2024-01-22 15:16 ` [PATCH AUTOSEL 5.4 12/24] PCI: add INTEL_HDA_ARL to pci_ids.h Sasha Levin
2024-01-22 15:16 ` [PATCH AUTOSEL 5.4 13/24] ALSA: hda: Intel: add HDA_ARL PCI ID support Sasha Levin
2024-01-22 15:16 ` [PATCH AUTOSEL 5.4 14/24] hwmon: (pc87360) Bounds check data->innr usage Sasha Levin
2024-01-22 15:16 ` [PATCH AUTOSEL 5.4 15/24] drm/exynos: Call drm_atomic_helper_shutdown() at shutdown/unbind time Sasha Levin
2024-01-22 15:16 ` [PATCH AUTOSEL 5.4 16/24] IB/ipoib: Fix mcast list locking Sasha Levin
2024-01-22 15:16 ` [PATCH AUTOSEL 5.4 17/24] media: ddbridge: fix an error code problem in ddb_probe Sasha Levin
2024-01-22 15:16 ` [PATCH AUTOSEL 5.4 18/24] drm/msm/dpu: Ratelimit framedone timeout msgs Sasha Levin
2024-01-22 15:16 ` [PATCH AUTOSEL 5.4 19/24] clk: hi3620: Fix memory leak in hi3620_mmc_clk_init() Sasha Levin
2024-01-22 15:16 ` [PATCH AUTOSEL 5.4 20/24] clk: mmp: pxa168: Fix memory leak in pxa168_clk_init() Sasha Levin
2024-01-22 15:16 ` [PATCH AUTOSEL 5.4 21/24] watchdog: it87_wdt: Keep WDTCTRL bit 3 unmodified for IT8784/IT8786 Sasha Levin
2024-01-22 15:16 ` [PATCH AUTOSEL 5.4 22/24] drm/amd/display: make flip_timestamp_in_us a 64-bit variable Sasha Levin
2024-01-22 15:16 ` [PATCH AUTOSEL 5.4 23/24] drm/amdgpu: Let KFD sync with VM fences Sasha Levin
2024-01-22 15:16 ` [PATCH AUTOSEL 5.4 24/24] 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=20240122151659.997085-6-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=linux-kernel@vger.kernel.org \
    --cc=qingqing.zhuo@amd.com \
    --cc=stable@vger.kernel.org \
    --cc=sunpeng.li@amd.com \
    --cc=wayne.lin@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