From mboxrd@z Thu Jan 1 00:00:00 1970 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=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 0CACAC47094 for ; Mon, 7 Jun 2021 16:15:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EB0C761931 for ; Mon, 7 Jun 2021 16:15:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232236AbhFGQRJ (ORCPT ); Mon, 7 Jun 2021 12:17:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:47564 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231863AbhFGQPD (ORCPT ); Mon, 7 Jun 2021 12:15:03 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 809C161431; Mon, 7 Jun 2021 16:13:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623082386; bh=TphpqG65VcUpX5OfHGY506kWnLKwdbUh7j08C20Yb7Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jAx2qL5jcD1nOOZs3gr0jQA16TM3b6lV+xtTV7w/ep0OxJYCMSL2wJQIJfcXCIm37 XuHQRf8ckFiePLykCe4ojtASwEEHrmlLyS6WDq3uL16KUaVwT+mr7vPBj5McV2xH8z Xreg4GnTQXDOVA93Mf2HDw6JKlZrotbj2wyF7U6lDYA8jS7nmUDOzSkwfh+W9sIiEp qp4XEtJCRulsJ2jFOrJcJAh5SRRbI1gFGCBQHkRWj/B0hov2dHc59LwGNYYnQ+cX86 nrh0ax5unCGpPRKaeJk9TML421682Pwx4Tpx6m9K94S0ultwBE8Srw7TUYqsf68Zh0 SG3NwkcDxtukg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Bindu Ramamurthy , Roman Li , Alex Deucher , Sasha Levin , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 5.12 41/49] drm/amd/display: Allow bandwidth validation for 0 streams. Date: Mon, 7 Jun 2021 12:12:07 -0400 Message-Id: <20210607161215.3583176-41-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210607161215.3583176-1-sashal@kernel.org> References: <20210607161215.3583176-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 bfbc23b76cd5..3e3c898848bd 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c @@ -3231,7 +3231,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 From mboxrd@z Thu Jan 1 00:00:00 1970 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 D4C06C47082 for ; Mon, 7 Jun 2021 16:13:09 +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 A2DDF613F3 for ; Mon, 7 Jun 2021 16:13:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A2DDF613F3 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 0FD746E8FE; Mon, 7 Jun 2021 16:13:07 +0000 (UTC) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id 948D16E8FE; Mon, 7 Jun 2021 16:13:06 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 809C161431; Mon, 7 Jun 2021 16:13:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623082386; bh=TphpqG65VcUpX5OfHGY506kWnLKwdbUh7j08C20Yb7Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jAx2qL5jcD1nOOZs3gr0jQA16TM3b6lV+xtTV7w/ep0OxJYCMSL2wJQIJfcXCIm37 XuHQRf8ckFiePLykCe4ojtASwEEHrmlLyS6WDq3uL16KUaVwT+mr7vPBj5McV2xH8z Xreg4GnTQXDOVA93Mf2HDw6JKlZrotbj2wyF7U6lDYA8jS7nmUDOzSkwfh+W9sIiEp qp4XEtJCRulsJ2jFOrJcJAh5SRRbI1gFGCBQHkRWj/B0hov2dHc59LwGNYYnQ+cX86 nrh0ax5unCGpPRKaeJk9TML421682Pwx4Tpx6m9K94S0ultwBE8Srw7TUYqsf68Zh0 SG3NwkcDxtukg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH AUTOSEL 5.12 41/49] drm/amd/display: Allow bandwidth validation for 0 streams. Date: Mon, 7 Jun 2021 12:12:07 -0400 Message-Id: <20210607161215.3583176-41-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210607161215.3583176-1-sashal@kernel.org> References: <20210607161215.3583176-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 bfbc23b76cd5..3e3c898848bd 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c @@ -3231,7 +3231,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 From mboxrd@z Thu Jan 1 00:00:00 1970 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 526C6C47094 for ; Mon, 7 Jun 2021 16:13:10 +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 29C8C61407 for ; Mon, 7 Jun 2021 16:13:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 29C8C61407 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=amd-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6AFE66E8FF; Mon, 7 Jun 2021 16:13:07 +0000 (UTC) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id 948D16E8FE; Mon, 7 Jun 2021 16:13:06 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 809C161431; Mon, 7 Jun 2021 16:13:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623082386; bh=TphpqG65VcUpX5OfHGY506kWnLKwdbUh7j08C20Yb7Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jAx2qL5jcD1nOOZs3gr0jQA16TM3b6lV+xtTV7w/ep0OxJYCMSL2wJQIJfcXCIm37 XuHQRf8ckFiePLykCe4ojtASwEEHrmlLyS6WDq3uL16KUaVwT+mr7vPBj5McV2xH8z Xreg4GnTQXDOVA93Mf2HDw6JKlZrotbj2wyF7U6lDYA8jS7nmUDOzSkwfh+W9sIiEp qp4XEtJCRulsJ2jFOrJcJAh5SRRbI1gFGCBQHkRWj/B0hov2dHc59LwGNYYnQ+cX86 nrh0ax5unCGpPRKaeJk9TML421682Pwx4Tpx6m9K94S0ultwBE8Srw7TUYqsf68Zh0 SG3NwkcDxtukg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH AUTOSEL 5.12 41/49] drm/amd/display: Allow bandwidth validation for 0 streams. Date: Mon, 7 Jun 2021 12:12:07 -0400 Message-Id: <20210607161215.3583176-41-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210607161215.3583176-1-sashal@kernel.org> References: <20210607161215.3583176-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" 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 bfbc23b76cd5..3e3c898848bd 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c @@ -3231,7 +3231,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 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx