mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
drm/amdgpu/display: Enable DC_FP for LoongArch
LoongArch now provides kernel_fpu_begin() and kernel_fpu_end() that are
used like the x86 counterparts in commit 2b3bd32ea3 ("LoongArch:
Provide kernel fpu functions"), so we can enable DC_FP on LoongArch for
supporting more DCN devices.
Signed-off-by: WANG Xuerui <kernel@xen0n.name>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
c488a9370d
commit
9a06655e73
@@ -33,6 +33,8 @@
|
||||
#include <asm/cputable.h>
|
||||
#elif defined(CONFIG_ARM64)
|
||||
#include <asm/neon.h>
|
||||
#elif defined(CONFIG_LOONGARCH)
|
||||
#include <asm/fpu.h>
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -88,7 +90,7 @@ void dc_fpu_begin(const char *function_name, const int line)
|
||||
*pcpu += 1;
|
||||
|
||||
if (*pcpu == 1) {
|
||||
#if defined(CONFIG_X86)
|
||||
#if defined(CONFIG_X86) || defined(CONFIG_LOONGARCH)
|
||||
migrate_disable();
|
||||
kernel_fpu_begin();
|
||||
#elif defined(CONFIG_PPC64)
|
||||
@@ -128,7 +130,7 @@ void dc_fpu_end(const char *function_name, const int line)
|
||||
pcpu = get_cpu_ptr(&fpu_recursion_depth);
|
||||
*pcpu -= 1;
|
||||
if (*pcpu <= 0) {
|
||||
#if defined(CONFIG_X86)
|
||||
#if defined(CONFIG_X86) || defined(CONFIG_LOONGARCH)
|
||||
kernel_fpu_end();
|
||||
migrate_enable();
|
||||
#elif defined(CONFIG_PPC64)
|
||||
|
||||
Reference in New Issue
Block a user