Received: by 2002:a05:7412:7c14:b0:fa:6e18:a558 with SMTP id ii20csp387221rdb; Mon, 22 Jan 2024 07:17:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IHhSAAjGGTAytdNtrTIl7a1dUaxCNFNa3sttDAhuasszuClpkkr/K5E9YyaP51acZ6hyKIx X-Received: by 2002:a05:6a20:4f84:b0:19a:c0ac:f037 with SMTP id gh4-20020a056a204f8400b0019ac0acf037mr1436431pzb.57.1705936679407; Mon, 22 Jan 2024 07:17:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705936679; cv=pass; d=google.com; s=arc-20160816; b=Z56g2D7r15oryMyp4r5UJAHjRMvgY/ak+M61pB7s1GTZZz2kxNTJ96K2nSoG5VYaRz qsJ2xSDy9EFV2VCgzHA83DRqgnnxzGu05D+wWVv33AYsbCajOzyDwv4VJXr+SysHwTFr D3ru6q/6gF9+pvOgZFW0dUXRCtl2LZnlSrXaZaNWSO3HnSPJl5vMsSOI0WGDxkWJEB32 SSrDpDaldl3mhJPSc65KLLkm/qIT+LPtBKWZ/DS7xJkRET6Lej/RQyTb2FP312cD1tbJ rYYBjHb+PoKMjsiy686YOPWwHsqYlrBZuyxWisVbrMANadsn0uOe+ww5ePCmjnmQtJME MR9Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=48Q1R2lXkpf4K5NP9PVfOBe66xjL32o43kI2sYjXfcY=; fh=b5o9u12ti0Mz2xWwyRoAy5bYMqzxagk0j7CxlOwe1h8=; b=LuxBUfssPmxS2g24n9Ed8dsqTTXf8Wc4gt1DFwtQZ5lIf0s9ou790f23ZnqeNYzl38 PSOLfwxe1Up4+7UbWh+Ws14W8zENaAhLw6K9Kk24zBGXY3+Mx3hsBKDz+zIDxKQjGJdk ukxUcgibsM2TpYWLvsJGvt+Hq0C4G9xziz5sO7vNpQlDZLSbqsX0C/vOfVwOyLJLG1n1 wN/LgWl/H+BN82pKeRGMHKoLT2JJMf4bxDHnAM4D4ex7p+DIYUd4A9n2zRlDk/hOPNc4 jHMubfagbuhYI+99+0Fntvsk790Ec4diziEk0KK7D0seT3UkFY8HPO0K5c9rtYfsp4m4 0v3Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OxG3Iup2; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-33240-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33240-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id t8-20020a63dd08000000b005c65eb2bc63si8142141pgg.608.2024.01.22.07.17.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 07:17:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-33240-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OxG3Iup2; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-33240-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33240-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 819F528B108 for ; Mon, 22 Jan 2024 15:10:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 911CE3EA95; Mon, 22 Jan 2024 14:57:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OxG3Iup2" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D4C173EA84; Mon, 22 Jan 2024 14:57:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705935472; cv=none; b=UnsRIqnRLsHCmAmXs7lWe74Qmxl5H2sXO51FTE/bf4CS66CruZDrBiVGET+i/W5QGnVKg8Jqnucg6c7yxmxTlMUGdR0/ejt2pZFmRo4HPdH8fRdr84gzt8VTsDjxDKD8BICkHS40/kbU6ZYocjE5jNW77Lb6Sq2Np67ldth5w20= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705935472; c=relaxed/simple; bh=WXssKxsGBsR/yKY6ti/K+rL0PFBq1lOYw7LKaLLK+1Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mH/xWjUxANUU/1JmDN9MJVcBbNeGKPdip8qxz2WJ/B+TUnqVvRhv5MGr/6fSV38iEt+qOATBlvQyuZPNd7QoD2soS5tk15V85MB3wgGN3+AEdcSKhZD7bEpPfAFQT4qDa6KF4jdrTOvR8wWe4IbELGtKKpNZKxFqvePRaovhZmw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OxG3Iup2; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7F6ABC43394; Mon, 22 Jan 2024 14:57:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705935471; bh=WXssKxsGBsR/yKY6ti/K+rL0PFBq1lOYw7LKaLLK+1Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OxG3Iup2OvZbewgNU4jdbFb2lEU2qzV/5hnHF9sHly2BbZNBaBxvZM7GwaoM8supu 43t+hYRwg4EBpujiH4HwQKsiRDA/kk1U2jIdEbl7tHXteizpvdVKFxYn6UtMloruBz +BFS7qcUD1U8BK5DHZuohn/KK8COML7zkbYsftRMyuiFKmfKO2i54yNfWB+4AoT48k 9Lq8dgCG5XYiKvaJizwtHQhFrGwpXElnAb+aRL3qcQPDTGzPsxZ08HSbsY2u2UUZsw aRHWfBvsm5MQkmqc6bXmrZxyOwjSAswVQegZtMdAf3hu9ND1DjmV8uaxlRpIxD2kP/ KglYN5JzL8riw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Alex Hung , Daniel Wheeler , Harry Wentland , Alex Deucher , Sasha Levin , 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, jun.lei@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 6.7 22/88] drm/amd/display: Fix writeback_info never got updated Date: Mon, 22 Jan 2024 09:50:55 -0500 Message-ID: <20240122145608.990137-22-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240122145608.990137-1-sashal@kernel.org> References: <20240122145608.990137-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.7.1 Content-Transfer-Encoding: 8bit From: Alex Hung [ Upstream commit c09919e6ea5fefd49d8b7b54aa5b222937163108 ] [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. Tested-by: Daniel Wheeler Reviewed-by: Harry Wentland Signed-off-by: Alex Hung Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- 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 4bdf105d1d71..5055af147c20 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c @@ -490,18 +490,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 (j < i) /* trim the array */ memcpy(&stream->writeback_info[j], &stream->writeback_info[i], -- 2.43.0