Received: by 2002:a05:7412:7c14:b0:fa:6e18:a558 with SMTP id ii20csp399375rdb; Mon, 22 Jan 2024 07:37:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IEpVxwH1TZQMb8PLyajzdpBXw2iJBS8BzwIR838ECddlIFDjAAj9/Gwl/Q6+Fedc8Yq2c0J X-Received: by 2002:a05:6a20:4fa3:b0:19a:e284:1cdc with SMTP id gh35-20020a056a204fa300b0019ae2841cdcmr1391761pzb.66.1705937847809; Mon, 22 Jan 2024 07:37:27 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705937847; cv=pass; d=google.com; s=arc-20160816; b=L/nlPb/k+JMJLB7aAvkiCbom6+75+p6nmZqQovibXzKIXqnqtY+4N5q7qRzSEloF6/ y7F0dc5v5p2g5P53JjLHQ27yZVduIGKdLlpm2J8g3wJ5vV92lOrXBhyB72WO5MpM8BOW NQmte2+uYItLSAzyPS81upKVvTyDz/1zETBxq2gWyvEWsRmU5k8sl5YxDnYW2hX6+Z+t npHgreWx/jeD9lewGkz0lrXkMweM5ZXWEytEctCEbLHqOAwmcHYUXSHmzzFXpfpkgX2u jEyfdSBmb1aVf4Z90xgruV+t0OP1Qb1YeDE+U/nzW5VgcOKNckdUg7RqSXRp9npHBYZ0 AfAA== 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=AmhPtMnNyzebj0zhpKq69qhFuqzUQtaP6EhH5NQmfgE=; fh=ZBSNpzEE2aatk2VAihjGb+EfiYweOOewoEEig1AA8MI=; b=RSLsWXCX9ZcLYIHpRUNgNf1naR2m7bFLlYFLyMxMy139z3twosodtJJULc4dQiJS1J HcXD0O7codO6rbzo2vPBrApVz3Jr8LgT0h8kTsEg3972o/U7WdOQq1uUqrIse/pr44bD ZZEeCj+EvdSqGrksHsToWETWiepYXXqhJoUA+JXqfcsuhqarpXLoWz4AeDntRXImIKr8 FFzgt1aqLrKBsfYUVH8zZ6s796edgJKxawa6Ws3GJ5U8ZxGEjusRWdafyGNb4fXjvt3A qCO408y9nN+IQo9XiOavtLiit5vpVKvZS+AHYE4BLSGpc63o9CanDJPhVduL2K4KXrb7 p9CQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AuMZnMNC; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-33234-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33234-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id g5-20020a170902c38500b001d721ef5b06si5905532plg.456.2024.01.22.07.37.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 07:37:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-33234-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AuMZnMNC; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-33234-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33234-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 6C7D6B2C9FF for ; Mon, 22 Jan 2024 15:09:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6C1354C3CC; Mon, 22 Jan 2024 14:57:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="AuMZnMNC" 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 985F74C3AE; Mon, 22 Jan 2024 14:57:21 +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=1705935441; cv=none; b=a22k5aem9Bk8hJb686DyoH4mnigExojfEz2/6K+arUpB9WC9NWvw3Hilwk3PjXM/0Ft7MaBxb2xMrx+TNwpBr7q9Qz7KzclbsmD5C/+Om+BTfHczkwlFVPp169NqAX8jyQsxSOV3EeVr2jjwG/yHP6EFvW3eoKk5hu77kajqvGU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705935441; c=relaxed/simple; bh=f9Sk/+C5kcX0il63I5n35DiRElG5AdEB1o+Ds2m2Xc8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HKnc04LI1uv70/27HEXqCG1CvIY/W4dFnrbGJK6zvMi2oEn/P4J3AdAQb2Eop+CFAW5ZPrYSNFnBeMicToXgtlfIY7XjwEwVO8OhLb9+owM+lRPPPX4MXyYSO11BN2FgxMYR1l44QKg1ltDWwXGyHpkoK2Qfpy7Bs/S3TIpSzho= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=AuMZnMNC; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03A49C433F1; Mon, 22 Jan 2024 14:57:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705935441; bh=f9Sk/+C5kcX0il63I5n35DiRElG5AdEB1o+Ds2m2Xc8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AuMZnMNCnOyqXSECFryi+JKq66wrIcKIVdf0qtKgGgiBXe5gY+nFIPVOC1Op4C6ip I11waZXZE6yC4Wtsjr3obY5bx36n8Xb5ljQjVwjJZoDBZHnDe+Xf5x8HXPipVgd0X3 eYdZwt1rTZ/R3G0rnHeuQhykDdTVydk0KAdaGVsdM3iBf+t0ZSMJI7QqXnxbrGCZEp r+saZLuhOKPHhjXtgQsTwkHGQEDI5Adkw+a3betZHQsUQB7JfEVQ5VKje+zxcPSjFx jhHh76XaE8id0a8CA92KGNn855OA48IZUOizoZ8UbhoQ0CHqTRLzKLe2QnLvUDsYW9 blO4tbXg1Iq2Q== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Nicholas Susanto , Daniel Wheeler , Nicholas Kazlauskas , Rodrigo Siqueira , Alex Deucher , Sasha Levin , harry.wentland@amd.com, sunpeng.li@amd.com, Rodrigo.Siqueira@amd.com, christian.koenig@amd.com, Xinhui.Pan@amd.com, airlied@gmail.com, daniel@ffwll.ch, charlene.liu@amd.com, hamza.mahfooz@amd.com, sungkim@amd.com, yang.lee@linux.alibaba.com, ovidiu.bunea@amd.com, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 6.7 19/88] drm/amd/display: Fix disable_otg_wa logic Date: Mon, 22 Jan 2024 09:50:52 -0500 Message-ID: <20240122145608.990137-19-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: Nicholas Susanto [ Upstream commit 2ce156482a6fef349d2eba98e5070c412d3af662 ] [Why] When switching to another HDMI mode, we are unnecesarilly disabling/enabling FIFO causing both HPO and DIG registers to be set at the same time when only HPO is supposed to be set. This can lead to a system hang the next time we change refresh rates as there are cases when we don't disable OTG/FIFO but FIFO is enabled when it isn't supposed to be. [How] Removing the enable/disable FIFO entirely. Tested-by: Daniel Wheeler Reviewed-by: Nicholas Kazlauskas Acked-by: Rodrigo Siqueira Signed-off-by: Nicholas Susanto Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- .../gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c index d5fde7d23fbf..f3b0af2c0295 100644 --- a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c +++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c @@ -126,21 +126,13 @@ static void dcn35_disable_otg_wa(struct clk_mgr *clk_mgr_base, struct dc_state * continue; if (pipe->stream && (pipe->stream->dpms_off || dc_is_virtual_signal(pipe->stream->signal) || !pipe->stream->link_enc)) { - struct stream_encoder *stream_enc = pipe->stream_res.stream_enc; - if (disable) { - if (stream_enc && stream_enc->funcs->disable_fifo) - pipe->stream_res.stream_enc->funcs->disable_fifo(stream_enc); - if (pipe->stream_res.tg && pipe->stream_res.tg->funcs->immediate_disable_crtc) pipe->stream_res.tg->funcs->immediate_disable_crtc(pipe->stream_res.tg); reset_sync_context_for_pipe(dc, context, i); } else { pipe->stream_res.tg->funcs->enable_crtc(pipe->stream_res.tg); - - if (stream_enc && stream_enc->funcs->enable_fifo) - pipe->stream_res.stream_enc->funcs->enable_fifo(stream_enc); } } } -- 2.43.0