mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2026-02-15 22:59:53 +08:00
Revert "AMX detect OS support for linux kernel"
This reverts commit 8c8a33762d64b916ae8469cc3fc602a64080a23a. Reason for revert: breaks sandbox Original change's description: > AMX detect OS support for linux kernel > > Bug: b/327013106 > Change-Id: Ie1784249f3a121c52e6504ff502bdc3eb245d858 > Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/5329907 > Commit-Queue: Frank Barchard <fbarchard@chromium.org> > Reviewed-by: richard winterton <rrwinterton@gmail.com> Bug: b/327013106 Change-Id: If54bb84bc1167177c1869763f6ccfdf1f92fbe09 Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/5332617 Reviewed-by: Frank Barchard <fbarchard@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Frank Barchard <fbarchard@chromium.org>
This commit is contained in:
parent
8c8a33762d
commit
b66c42d4a8
@ -1,6 +1,6 @@
|
|||||||
Name: libyuv
|
Name: libyuv
|
||||||
URL: https://chromium.googlesource.com/libyuv/libyuv/
|
URL: https://chromium.googlesource.com/libyuv/libyuv/
|
||||||
Version: 1888
|
Version: 1887
|
||||||
License: BSD
|
License: BSD
|
||||||
License File: LICENSE
|
License File: LICENSE
|
||||||
Shipped: yes
|
Shipped: yes
|
||||||
|
|||||||
@ -11,6 +11,6 @@
|
|||||||
#ifndef INCLUDE_LIBYUV_VERSION_H_
|
#ifndef INCLUDE_LIBYUV_VERSION_H_
|
||||||
#define INCLUDE_LIBYUV_VERSION_H_
|
#define INCLUDE_LIBYUV_VERSION_H_
|
||||||
|
|
||||||
#define LIBYUV_VERSION 1888
|
#define LIBYUV_VERSION 1887
|
||||||
|
|
||||||
#endif // INCLUDE_LIBYUV_VERSION_H_
|
#endif // INCLUDE_LIBYUV_VERSION_H_
|
||||||
|
|||||||
@ -19,12 +19,6 @@
|
|||||||
#include <immintrin.h> // For _xgetbv()
|
#include <immintrin.h> // For _xgetbv()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// For AMX OS support detect
|
|
||||||
#if (defined(__i386__) || defined(__x86_64__)) && defined(__linux__)
|
|
||||||
#include <sys/syscall.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// For ArmCpuCaps() but unittested on all platforms
|
// For ArmCpuCaps() but unittested on all platforms
|
||||||
#include <stdio.h> // For fopen()
|
#include <stdio.h> // For fopen()
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -138,18 +132,6 @@ static int GetXCR0() {
|
|||||||
#pragma optimize("g", on)
|
#pragma optimize("g", on)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (defined(__i386__) || defined(__x86_64__)) && defined(__linux__)
|
|
||||||
#define ARCH_REQ_XCOMP_PERM 0x1023
|
|
||||||
#define XFEATURE_XTILEDATA 18
|
|
||||||
/* SetTileDataUse() - Invoke syscall to set ARCH_SET_STATE_USE */
|
|
||||||
static bool SetTileDataUse(void) {
|
|
||||||
if (syscall(SYS_arch_prctl, ARCH_REQ_XCOMP_PERM, XFEATURE_XTILEDATA)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Based on libvpx arm_cpudetect.c
|
// Based on libvpx arm_cpudetect.c
|
||||||
// For Arm, but public to allow testing on any CPU
|
// For Arm, but public to allow testing on any CPU
|
||||||
LIBYUV_API SAFEBUFFERS int ArmCpuCaps(const char* cpuinfo_name) {
|
LIBYUV_API SAFEBUFFERS int ArmCpuCaps(const char* cpuinfo_name) {
|
||||||
@ -341,12 +323,8 @@ static SAFEBUFFERS int GetCpuFlags(void) {
|
|||||||
cpu_info |= (cpu_info7[2] & 0x00000800) ? kCpuHasAVX512VNNI : 0;
|
cpu_info |= (cpu_info7[2] & 0x00000800) ? kCpuHasAVX512VNNI : 0;
|
||||||
cpu_info |= (cpu_info7[2] & 0x00001000) ? kCpuHasAVX512VBITALG : 0;
|
cpu_info |= (cpu_info7[2] & 0x00001000) ? kCpuHasAVX512VBITALG : 0;
|
||||||
cpu_info |= (cpu_einfo7[3] & 0x00080000) ? kCpuHasAVX10 : 0;
|
cpu_info |= (cpu_einfo7[3] & 0x00080000) ? kCpuHasAVX10 : 0;
|
||||||
}
|
|
||||||
#if defined(__linux__)
|
|
||||||
if (SetTileDataUse()) {
|
|
||||||
cpu_info |= (cpu_info7[3] & 0x02000000) ? kCpuHasAMXINT8 : 0;
|
cpu_info |= (cpu_info7[3] & 0x02000000) ? kCpuHasAMXINT8 : 0;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if defined(__mips__) && defined(__linux__)
|
#if defined(__mips__) && defined(__linux__)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user