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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id DACD5F01811 for ; Fri, 6 Mar 2026 08:35:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A28D810E3BC; Fri, 6 Mar 2026 08:35:03 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=xry111.site header.i=@xry111.site header.b="EYXZTqkQ"; dkim-atps=neutral X-Greylist: delayed 507 seconds by postgrey-1.36 at gabe; Fri, 06 Mar 2026 06:49:43 UTC Received: from xry111.site (xry111.site [89.208.246.23]) by gabe.freedesktop.org (Postfix) with ESMTPS id 979EB10E387; Fri, 6 Mar 2026 06:49:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xry111.site; s=default; t=1772779270; bh=V06FD4fP1WIlRIby4zy56+KfUfGL0hLt7tHMLgURozw=; h=From:To:Cc:Subject:Date:From; b=EYXZTqkQ5bGe3BLEovkWeLcFXBJylZBTXxIoFlcObKjm2bH8K8Z6bwPOs1PrcxsRm nmqmshBlbjNztWfkduw1/73BvZh2sOK+BkZWh2OpVSOK7/v8JHMMJSgiz/TouwRp9H KP7vSdjMzEiBFIkgLRk6UQfRbNFbFDzCq4eBNtCg= Received: from stargazer (unknown [IPv6:2409:8a4c:e11:4510:818c:b334:624:49f8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 81F801A3F28; Fri, 6 Mar 2026 01:41:01 -0500 (EST) From: Xi Ruoyao To: Alex Hung , Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= Cc: loongarch@lists.linux.dev, Mingcong Bai , Zixing Liu , Ard Biesheuvel , Xi Ruoyao , LiarOnce , stable@vger.kernel.org, Harry Wentland , Leo Li , Rodrigo Siqueira , David Airlie , Simona Vetter , Alvin Lee , Dillon Varone , Ray Wu , Kees Cook , Yan Li , Ryan Seto , Saaem Rizvi , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/amd/display: Wrap dcn32_override_min_req_memclk() in DC_FP_{START, END} Date: Fri, 6 Mar 2026 14:28:03 +0800 Message-ID: <20260306062805.1464383-2-xry111@xry111.site> X-Mailer: git-send-email 2.53.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Fri, 06 Mar 2026 08:35:02 +0000 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" [Why] The dcn32_override_min_req_memclk function is in dcn32_fpu.c, which is compiled with CC_FLAGS_FPU into FP instructions. So when we call it we must use DC_FP_{START,END} to save and restore the FP context, and prepare the FP unit on architectures like LoongArch where the FP unit isn't always on. Reported-by: LiarOnce Fixes: ee7be8f3de1c ("drm/amd/display: Limit DCN32 8 channel or less parts to DPM1 for FPO") Cc: stable@vger.kernel.org Signed-off-by: Xi Ruoyao --- drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c index 7ebb7d1193af..c7fd604024d6 100644 --- a/drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c +++ b/drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c @@ -1785,7 +1785,10 @@ static bool dml1_validate(struct dc *dc, struct dc_state *context, enum dc_valid dc->res_pool->funcs->calculate_wm_and_dlg(dc, context, pipes, pipe_cnt, vlevel); + DC_FP_START(); dcn32_override_min_req_memclk(dc, context); + DC_FP_END(); + dcn32_override_min_req_dcfclk(dc, context); BW_VAL_TRACE_END_WATERMARKS(); -- 2.53.0