Skip to content

Instantly share code, notes, and snippets.

amonakov / gist:c65b633f97e5b301f691563ea2f8c636
Created May 7, 2020
Firmware issue with TSC sync on Acer sf314-42
View gist:c65b633f97e5b301f691563ea2f8c636
There seems to be a firmware issue with TSC (timestamp counter) on new
AMD Ryzen CPUs in recently released Acer Swift 3 SF314-42 laptops.
The issue is that different cores of the CPU may have TSC running at
different rates or out of sync with each other. This causes a
performance penalty as the operating system is unable to use the TSC,
and has to fall back to another time source.
The issue can be easily reproduced by booting Linux (Windows should be
affected too, but I'm not sure how to diagnose it there). After
View metsort.c
// SPDX-License-Identifier: MIT
// Copyright 2018 Alexander Monakov <>
/* This implements a sort function suitable for GCC use cases:
- signature-compatible to C qsort, but with relaxed contract:
- may apply the comparator to elements moved to a temporary buffer
- may abort on allocation failure
- deterministic (not stable, but allows a stable variant at low cost)
- fast, especially for common cases (0-5 elements of size 8 or 4)
View gist:7282731
diff --git a/src/mesa/drivers/dri/i965/intel_pixel_draw.c b/src/mesa/drivers/dri/i965/intel_pixel_draw.c
index af618a2..0ba7c9c 100644
--- a/src/mesa/drivers/dri/i965/intel_pixel_draw.c
+++ b/src/mesa/drivers/dri/i965/intel_pixel_draw.c
@@ -29,14 +29,110 @@
#include "main/enums.h"
#include "main/image.h"
#include "main/mtypes.h"
+#include "main/fbobject.h"
#include "main/teximage.h"
View gist:4702298
diff --git a/ENIGMAsystem/SHELL/Platforms/xlib/include.h b/ENIGMAsystem/SHELL/Platforms/xlib/include.h
index 824aa8b..86119a9 100644
--- a/ENIGMAsystem/SHELL/Platforms/xlib/include.h
+++ b/ENIGMAsystem/SHELL/Platforms/xlib/include.h
@@ -1,4 +1,5 @@
#include "XLIBwindow.h"
#include "XLIBthreads.h"
#include "LINUXjoystick.h"
+#include "file_manip.h"
View gist:4054703
--w------- 1 root root 4096 Nov 11 15:57 bind
lrwxrwxrwx 1 root root 0 Nov 11 15:57 LNXVIDEO:00 -> ../../../../devices/LNXSYSTM:00/device:00/PNP0A08:00/device:2f/LNXVIDEO:00
lrwxrwxrwx 1 root root 0 Nov 11 15:57 LNXVIDEO:01 -> ../../../../devices/LNXSYSTM:00/device:00/PNP0A08:00/LNXVIDEO:01
--w------- 1 root root 4096 Nov 11 15:43 uevent
--w------- 1 root root 4096 Nov 11 15:57 unbind
View gist:4054689