diff options
author | Sebastian Andrzej Siewior <[email protected]> | 2023-09-21 16:15:14 +0200 |
---|---|---|
committer | Alex Deucher <[email protected]> | 2023-10-09 16:47:37 -0400 |
commit | 80364500c02367cd0901c2d6e0d5d1e3e3e42abc (patch) | |
tree | c5bd402bf42cf3a3e95344d63e99b19ef1d502bf | |
parent | 0f0e59075b5c22f1e871fbd508d6e4f495048356 (diff) |
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.
Acked-by: Harry Wentland <[email protected]>
Reviewed-by: Rodrigo Siqueira <[email protected]>
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
Signed-off-by: Hamza Mahfooz <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r-- | drivers/gpu/drm/amd/display/amdgpu_dm/dc_fpu.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/dc_fpu.c b/drivers/gpu/drm/amd/display/amdgpu_dm/dc_fpu.c index 8bd5926b47e0..4ae4720535a5 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/dc_fpu.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/dc_fpu.c @@ -84,6 +84,7 @@ void dc_fpu_begin(const char *function_name, const int line) { int depth; + WARN_ON_ONCE(!in_task()); preempt_disable(); depth = __this_cpu_inc_return(fpu_recursion_depth); |