OSDN Git Service

drm/amdgpu/display: Enable DC_FP for LoongArch
[tomoyo/tomoyo-test1.git] / drivers / gpu / drm / amd / display / amdgpu_dm / dc_fpu.c
index c42aa94..172aa10 100644 (file)
@@ -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)