[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250114132856.19463-1-yangtiezhu@loongson.cn>
Date: Tue, 14 Jan 2025 21:28:56 +0800
From: Tiezhu Yang <yangtiezhu@...ngson.cn>
To: Alex Deucher <alexander.deucher@....com>,
Christian König <christian.koenig@....com>,
Xinhui Pan <Xinhui.Pan@....com>,
Harry Wentland <harry.wentland@....com>,
Leo Li <sunpeng.li@....com>,
Rodrigo Siqueira <Rodrigo.Siqueira@....com>
Cc: Nathan Chancellor <nathan@...nel.org>,
Josh Poimboeuf <jpoimboe@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
loongarch@...ts.linux.dev,
amd-gfx@...ts.freedesktop.org,
llvm@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: [PATCH v4 0/3] drm/amd/display: Stop control flow if the divisior is zero
As far as I can tell, with the current existing macro definitions, there
is no better way to do the minimal and proper changes to stop the control
flow if the divisior is zero.
In order to keep the current ability for the aim of debugging and avoid
printing the warning message twice, it is better to only use ASSERT_BUG()
and SPL_ASSERT_BUG() directly after doing the following two steps:
(1) Add ASSERT_BUG() macro definition
(2) Add SPL_ASSERT_BUG() macro definition
This version is based on 6.13-rc7, tested on x86 and LoongArch.
Tiezhu Yang (3):
drm/amd/display: Add ASSERT_BUG() macro definition
drm/amd/display: Add SPL_ASSERT_BUG() macro definition
drm/amd/display: Harden callers of division functions
drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c | 2 +-
drivers/gpu/drm/amd/display/dc/os_types.h | 7 +++++++
drivers/gpu/drm/amd/display/dc/spl/spl_debug.h | 11 +++++++++++
drivers/gpu/drm/amd/display/dc/spl/spl_fixpt31_32.c | 2 +-
4 files changed, 20 insertions(+), 2 deletions(-)
--
2.42.0
Powered by blists - more mailing lists