Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/dist/drm/amd/display/dc amdgpu: Define...



details:   https://anonhg.NetBSD.org/src/rev/6d29aa3fd7a1
branches:  trunk
changeset: 368654:6d29aa3fd7a1
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Jul 24 20:05:08 2022 +0000

description:
amdgpu: Define DC_FPU_START/END on Arm.

diffstat:

 sys/external/bsd/drm2/dist/drm/amd/display/dc/os_types.h |  14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diffs (42 lines):

diff -r 42167d9cf04c -r 6d29aa3fd7a1 sys/external/bsd/drm2/dist/drm/amd/display/dc/os_types.h
--- a/sys/external/bsd/drm2/dist/drm/amd/display/dc/os_types.h  Sun Jul 24 20:05:00 2022 +0000
+++ b/sys/external/bsd/drm2/dist/drm/amd/display/dc/os_types.h  Sun Jul 24 20:05:08 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: os_types.h,v 1.3 2021/12/19 11:35:07 riastradh Exp $   */
+/*     $NetBSD: os_types.h,v 1.4 2022/07/24 20:05:08 riastradh Exp $   */
 
 /*
  * Copyright 2012-16 Advanced Micro Devices, Inc.
@@ -53,16 +53,21 @@
 #define dm_error(fmt, ...) DRM_ERROR(fmt, ##__VA_ARGS__)
 
 #if defined(CONFIG_DRM_AMD_DC_DCN)
-#if defined(CONFIG_X86)
 #ifdef __NetBSD__
+#if defined(__i386__) || defined(__x86_64__)
 #include <x86/fpu.h>
 #define        DC_FP_START()   fpu_kern_enter()
 #define        DC_FP_END()     fpu_kern_leave()
-#else
+#elif defined(__arm__) || defined(__aarch64__)
+#include <arm/fpu.h>
+#define        DC_FP_START()   fpu_kern_enter()
+#define        DC_FP_END()     fpu_kern_leave()
+#endif
+#else  /* !__NetBSD__ */
+#if defined(CONFIG_X86)
 #include <asm/fpu/api.h>
 #define DC_FP_START() kernel_fpu_begin()
 #define DC_FP_END() kernel_fpu_end()
-#endif
 #elif defined(CONFIG_PPC64)
 #include <asm/switch_to.h>
 #include <asm/cputable.h>
@@ -92,6 +97,7 @@
 }
 #endif
 #endif
+#endif
 
 /*
  *



Home | Main Index | Thread Index | Old Index