From nobody Thu Apr 9 18:57:13 2026 Received: from xry111.site (xry111.site [89.208.246.23]) (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 1FC3A37189E; Fri, 6 Mar 2026 06:41:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=89.208.246.23 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772779284; cv=none; b=pS4eEYm5Gfs9yuCdlFb+xIXBTJQlSD/MB9xqgRhLVOgXGX0mKi3uS0AWdAPfo9y904BUfNw1VdN0QGkABVhHyNBpEB35c/fZQDf5fepEYL6PDvrWiBVrF7VGzzr/9Xs5DQO8KTtco/iZ/Fsiot/P9VPFZVXCpYdB3dkebdG5ClA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772779284; c=relaxed/simple; bh=I1/cm5LttFDd0g4Y4v3qyD1slgVyu6rpnomFiYRE5Uk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ls3G2OAx88vaBi8UX6MU9GcPO3Ad5wLyJ2jMsmgFPc6a0cz6pddDpsj0GnaNyd5B2r7aDEJzVlMvr1FfzF83TuavmXINbygiDYo9s7YDxm+89LDRuTbu3WoZofXiWJ1vxCAhriGbv9oiv8Vz+SI5tqzVfjEZatFzr5ogY9FbHTo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=xry111.site; spf=pass smtp.mailfrom=xry111.site; dkim=pass (1024-bit key) header.d=xry111.site header.i=@xry111.site header.b=EYXZTqkQ; arc=none smtp.client-ip=89.208.246.23 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=xry111.site Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=xry111.site Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=xry111.site header.i=@xry111.site header.b="EYXZTqkQ" 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" [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 Reviewed-by: Alex Hung --- 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_s= tate *context, enum dc_valid =20 dc->res_pool->funcs->calculate_wm_and_dlg(dc, context, pipes, pipe_cnt, v= level); =20 + DC_FP_START(); dcn32_override_min_req_memclk(dc, context); + DC_FP_END(); + dcn32_override_min_req_dcfclk(dc, context); =20 BW_VAL_TRACE_END_WATERMARKS(); --=20 2.53.0