Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2481042pxj; Mon, 10 May 2021 04:08:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0cQl7QpJxVQrI7S19hXz/opMoI0z2+GyO6BLVCRf0FYjke14u/r4x3IgWipjRTuhplliz X-Received: by 2002:a5e:930e:: with SMTP id k14mr6661584iom.136.1620644895695; Mon, 10 May 2021 04:08:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620644895; cv=none; d=google.com; s=arc-20160816; b=RnRjyWCqnQnbREL2d67GdvZpufQMtOKD4WAb3V7HNzpZLUin3aATM0BsUQfhqeF2YE URHavjGisybsCr3msLNqC6SnBdQpDFWSKov0lVZ6eglGCztTIpCmctJLKTTXurLB5yJj i5maBwYyB1Ly4QdLORwUXuWm2dSYMkWhjGRzXQQRVIXF4MbfVgjJQzfwpMybscpD8J3l wlxPuaEuh1u/7ImT6rXYfPLKilpMqbTfaiSx4BSTYN7N5lUqIdPHKaBLQN9yXEvj3HPN Nxv6MnR5WvS4Ls+AnyjsdfwTgYPcaNDjYy3rE9U/olMJWBJqkcV9lFd8tb1tu9jun9VN 4ANw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=NFidzUOXNz3iOq8oa/CnfT0dyqR47/KGZTD8LH8xfLY=; b=uAjd0JooftJgBZtjREv5QkuFJ15QaNxo39Ywrw88ooXtE0Abn8biz7EkjyBQ2tzdR4 Brup520bdUmxmxWyFRE11bmTwdkqvcYSUZtWlTO84K5/X2c9Y7j6mWu+cZC/Qt2qsq7c b9jH1oD4XIN777LFnRCP130UK3OPCa6O40lPG5DMeoPVTWxbv+hO7vbi0Ptyk4OKis6i DsbfHFQTCKyK3qsEwcF/42GbJIfNi7BSVk0w0p9Eq++3nnSNAIR0H9ZRlQIVXhY31hZ/ t5DNm+l9M3EB43hD8eiRqC915tgr8JUZwDY7vt+gNEQdPi8jPV4nFUQbBGW1bG2N9Qqn +Bbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=i7x11DXT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c22si5115307ioo.82.2021.05.10.04.08.03; Mon, 10 May 2021 04:08:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=i7x11DXT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233918AbhEJLDY (ORCPT + 99 others); Mon, 10 May 2021 07:03:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:57348 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233362AbhEJKpk (ORCPT ); Mon, 10 May 2021 06:45:40 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C3E0C619A3; Mon, 10 May 2021 10:36:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620642973; bh=zhsHhDc8rziiQp8dl5aqQwPnQIfXVxWbAScbRMyCpp8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i7x11DXTohm/HXMi+FgOHSqxjsP9Wjqb+T9v+wjorrSRCR/oLcveK6tlx9kEZLVuK 0HlPBi4SeLhN3Nq9r4ELfOMH5xc8dPza6v2HVxhhkwzhE+8mBvyNZ0QiNI9ttAbuJE syiiIIHn5FWpPng5dSIG8AmMeo47hXao5DRK4nU8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Aric Cyr , Bindu Ramamurthy , Daniel Wheeler , Alex Deucher , Sasha Levin Subject: [PATCH 5.10 120/299] drm/amd/display: Dont optimize bandwidth before disabling planes Date: Mon, 10 May 2021 12:18:37 +0200 Message-Id: <20210510102008.940233346@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210510102004.821838356@linuxfoundation.org> References: <20210510102004.821838356@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Aric Cyr [ Upstream commit 6ad98e8aeb0106f453bb154933e8355849244990 ] [Why] There is a window of time where we optimize bandwidth due to no streams enabled will enable PSTATE changing but HUBPs are not disabled yet. This results in underflow counter increasing in some hotplug scenarios. [How] Set the optimize-bandwidth flag for later processing once all the HUBPs are properly disabled. Signed-off-by: Aric Cyr Acked-by: Bindu Ramamurthy Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/dc/core/dc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c index ffb21196bf59..921c4ca6e902 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c @@ -2345,7 +2345,8 @@ static void commit_planes_do_stream_update(struct dc *dc, if (pipe_ctx->stream_res.audio && !dc->debug.az_endpoint_mute_only) pipe_ctx->stream_res.audio->funcs->az_disable(pipe_ctx->stream_res.audio); - dc->hwss.optimize_bandwidth(dc, dc->current_state); + dc->optimized_required = true; + } else { if (dc->optimize_seamless_boot_streams == 0) dc->hwss.prepare_bandwidth(dc, dc->current_state); -- 2.30.2