From 249a95b93015b3d15102d15af87858779e861ac0 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 21 Sep 2023 16:15:14 +0200 Subject: [PATCH 012/204] drm/amd/display: Add a warning if the FPU is used outside from task context. Add a warning if the FPU is used from any context other than task context. This is only precaution since the code is not able to be used from softirq while the API allows it on x86 for instance. Link: https://lore.kernel.org/r/20230921141516.520471-4-bigeasy@linutronix.de Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- drivers/gpu/drm/amd/display/amdgpu_dm/dc_fpu.c | 1 + 1 file changed, 1 insertion(+) Index: linux-6.6.58-rt45/drivers/gpu/drm/amd/display/amdgpu_dm/dc_fpu.c =================================================================== @ linux-6.6.58-rt45/drivers/gpu/drm/amd/display/amdgpu_dm/dc_fpu.c:87 @ void dc_fpu_begin(const char *function_n { int depth; + WARN_ON_ONCE(!in_task()); preempt_disable(); depth = __this_cpu_inc_return(fpu_recursion_depth);