diff --git a/vesa-2.3.0-24bpp-sucks.patch b/vesa-2.3.0-24bpp-sucks.patch new file mode 100644 index 0000000..b22e5ce --- /dev/null +++ b/vesa-2.3.0-24bpp-sucks.patch @@ -0,0 +1,17 @@ +diff -up xf86-video-vesa-2.3.0/src/vesa.c.jx xf86-video-vesa-2.3.0/src/vesa.c +--- xf86-video-vesa-2.3.0/src/vesa.c.jx 2010-01-04 14:16:31.000000000 -0500 ++++ xf86-video-vesa-2.3.0/src/vesa.c 2010-10-11 15:29:52.000000000 -0400 +@@ -651,10 +651,12 @@ VESAPreInit(ScrnInfoPtr pScrn, int flags + V_MODETYPE_VBE); + + /* Preferred order for default depth selection. */ +- if (depths & V_DEPTH_24) ++ if ((depths & V_DEPTH_24) && (flags24 & Support32bppFb)) + defaultDepth = 24; + else if (depths & V_DEPTH_16) + defaultDepth = 16; ++ else if (depths & V_DEPTH_24) ++ defaultDepth = 24; + else if (depths & V_DEPTH_15) + defaultDepth = 15; + else if (depths & V_DEPTH_8) diff --git a/vesa-Refuse-to-run-on-UEFI-machines.patch b/vesa-Refuse-to-run-on-UEFI-machines.patch new file mode 100644 index 0000000..7b62a2c --- /dev/null +++ b/vesa-Refuse-to-run-on-UEFI-machines.patch @@ -0,0 +1,46 @@ +From 2645e0aa9c17c2c966a0533e52ad00510311483e Mon Sep 17 00:00:00 2001 +From: Adam Jackson +Date: Wed, 29 Aug 2018 11:04:23 -0400 +Subject: [PATCH xf86-video-vesa] Refuse to run on UEFI machines + +No possible good can come of this. + +v2: Check for .../efi-framebuffer.0 ("is there an EFI framebuffer") +instead of /sys/firmware/efi ("is this an EFI machine"). Suggested by +Peter Jones. + +Reviewed-by: Peter Jones +Signed-off-by: Adam Jackson + +diff --git a/src/vesa.c b/src/vesa.c +index 9b65b9b..af750e2 100644 +--- a/src/vesa.c ++++ b/src/vesa.c +@@ -43,7 +43,7 @@ + #endif + + #include +- ++#include + #include "vesa.h" + + /* All drivers initialising the SW cursor need this */ +@@ -450,7 +450,14 @@ VESAPciProbe(DriverPtr drv, int entity_num, struct pci_device *dev, + intptr_t match_data) + { + ScrnInfoPtr pScrn; +- ++ ++#ifdef __linux__ ++ if (access("/sys/devices/platform/efi-framebuffer.0", F_OK) == 0) { ++ ErrorF("vesa: Refusing to run on UEFI\n"); ++ return FALSE; ++ } ++#endif ++ + pScrn = xf86ConfigPciEntity(NULL, 0, entity_num, NULL, + NULL, NULL, NULL, NULL, NULL); + if (pScrn != NULL) { +-- +2.17.1 + diff --git a/xorg-x11-drv-vesa.spec b/xorg-x11-drv-vesa.spec index b26b814..507e794 100644 --- a/xorg-x11-drv-vesa.spec +++ b/xorg-x11-drv-vesa.spec @@ -5,13 +5,15 @@ Name: xorg-x11-drv-vesa Version: 2.4.0 -Release: 1 +Release: 2 Summary: Xorg X11 vesa video driver License: MIT URL: https://www.x.org Source0: https://xorg.freedesktop.org/releases/individual/driver/xf86-video-vesa-%{version}.tar.bz2 +Patch0: vesa-2.3.0-24bpp-sucks.patch Patch1: 0001-Disable-shadow-by-default-on-known-virtual-GPUs.patch +Patch2: vesa-Refuse-to-run-on-UEFI-machines.patch ExclusiveArch: %{ix86} x86_64 @@ -51,5 +53,8 @@ autoreconf -v --install || exit 1 %{_mandir}/man4/vesa.4* %changelog +* Sat Mar 21 2020 fengtao - 2.4.0-2 +- Refuse vesa on UEFI + * Tue Mar 10 2020 hexiujun - 2.4.0-1 - Package init