Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A5443C47095 for ; Mon, 7 Jun 2021 16:13:59 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7859E61585 for ; Mon, 7 Jun 2021 16:13:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7859E61585 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EC1286E90D; Mon, 7 Jun 2021 16:13:58 +0000 (UTC) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id 614596E90D; Mon, 7 Jun 2021 16:13:58 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 611B261431; Mon, 7 Jun 2021 16:13:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623082438; bh=1mLTm7tlUu/3NIRkN8US/DaZWW9nsvkCz4Gduns3kio=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IlcVW6R5qZj36sfxHU40jPV/NrVdaVlgG5j7Orv80xi3P8VE/t3L9WAaKeOjH20JN Xud5cnke7QZFQLNS8PIXyBmJkUHyHg1XD7BL2tto7R59RLMOBz6SPkgtUxOeZ2HE7y havuBvg7htgL1eWyvNZMJL5+/n/uKahtYiQJcOrfR7nw4rVPEXULtitJtAZLyDS/FB BjOB6M9SwhcPjIeF0tCG1Da0qF6LLU2ybs99sM6W54d3u7OhJ2lQLc05yzKAQwyU+Z L5181Qw1Vk9QcKq3OmYnZDGvwBjV69PYMJi1haAPHqUmyvMpE4Q+wSzORo/FUQdvvR ouLICt4qNNdzA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH AUTOSEL 5.10 31/39] drm/amd/display: Allow bandwidth validation for 0 streams. Date: Mon, 7 Jun 2021 12:13:10 -0400 Message-Id: <20210607161318.3583636-31-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210607161318.3583636-1-sashal@kernel.org> References: <20210607161318.3583636-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sasha Levin , Roman Li , dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, Alex Deucher , Bindu Ramamurthy Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Bindu Ramamurthy [ Upstream commit ba8e59773ae59818695d1e20b8939282da80ec8c ] [Why] Bandwidth calculations are triggered for non zero streams, and in case of 0 streams, these calculations were skipped with pstate status not being updated. [How] As the pstate status is applicable for non zero streams, check added for allowing 0 streams inline with dcn internal bandwidth validations. Signed-off-by: Bindu Ramamurthy Reviewed-by: Roman Li Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c index 33488b3c5c3c..1812ec7ee11b 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c @@ -3232,7 +3232,7 @@ static noinline bool dcn20_validate_bandwidth_fp(struct dc *dc, voltage_supported = dcn20_validate_bandwidth_internal(dc, context, false); dummy_pstate_supported = context->bw_ctx.bw.dcn.clk.p_state_change_support; - if (voltage_supported && dummy_pstate_supported) { + if (voltage_supported && (dummy_pstate_supported || !(context->stream_count))) { context->bw_ctx.bw.dcn.clk.p_state_change_support = false; goto restore_dml_state; } -- 2.30.2