diff --git a/.gitignore b/.gitignore index fbb7850..cf526eb 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/xf86-video-vesa-2.3.2.tar.bz2 +SOURCES/xf86-video-vesa-2.4.0.tar.bz2 diff --git a/.xorg-x11-drv-vesa.metadata b/.xorg-x11-drv-vesa.metadata index 47b0b29..eb0553c 100644 --- a/.xorg-x11-drv-vesa.metadata +++ b/.xorg-x11-drv-vesa.metadata @@ -1 +1 @@ -d49a57de24e7923bf17270084ce91ecf2feb4286 SOURCES/xf86-video-vesa-2.3.2.tar.bz2 +99b69044c34292ba062e365c07dcd024462e794b SOURCES/xf86-video-vesa-2.4.0.tar.bz2 diff --git a/SOURCES/0001-Disable-shadow-by-default-on-known-virtual-GPUs.patch b/SOURCES/0001-Disable-shadow-by-default-on-known-virtual-GPUs.patch new file mode 100644 index 0000000..8395ce8 --- /dev/null +++ b/SOURCES/0001-Disable-shadow-by-default-on-known-virtual-GPUs.patch @@ -0,0 +1,63 @@ +From 57301015f16e26f12caf6f6cb4d730e7793cb2c3 Mon Sep 17 00:00:00 2001 +From: Adam Jackson +Date: Wed, 30 May 2018 11:46:46 -0400 +Subject: [PATCH xf86-video-vesa] Disable shadow by default on known-virtual + GPUs + +Device memory is the same domain as host memory, in this case, so the +shadow just introduces more memcpy. + +Signed-off-by: Adam Jackson +--- + src/vesa.c | 35 ++++++++++++++++++++++++++++++++--- + 1 file changed, 32 insertions(+), 3 deletions(-) + +diff --git a/src/vesa.c b/src/vesa.c +index 2300f4e..7d2bf94 100644 +--- a/src/vesa.c ++++ b/src/vesa.c +@@ -844,9 +844,38 @@ VESAPreInit(ScrnInfoPtr pScrn, int flags) + memcpy(pVesa->Options, VESAOptions, sizeof(VESAOptions)); + xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, pVesa->Options); + +- /* Use shadow by default */ +- pVesa->shadowFB = xf86ReturnOptValBool(pVesa->Options, OPTION_SHADOW_FB, +- TRUE); ++ /* Use shadow by default, for non-virt hardware */ ++ if (!xf86GetOptValBool(pVesa->Options, OPTION_SHADOW_FB, &pVesa->shadowFB)) ++ { ++ switch (pVesa->pciInfo->vendor_id) { ++ case 0x1234: /* bochs vga (not in pci.ids) */ ++ case 0x15ad: /* vmware */ ++ case 0x1b36: /* qemu qxl */ ++ case 0x80ee: /* virtualbox */ ++ case 0xaaaa: /* parallels (not in pci.ids) */ ++ pVesa->shadowFB = FALSE; ++ break; ++ ++ case 0x1013: /* qemu's cirrus emulation */ ++ if (pVesa->pciInfo->subvendor_id == 0x1af4) ++ pVesa->shadowFB = FALSE; ++ else ++ pVesa->shadowFB = TRUE; ++ break; ++ ++ case 0x1414: /* microsoft hyper-v */ ++ if (pVesa->pciInfo->device_id == 0x5353) ++ pVesa->shadowFB = FALSE; ++ else ++ pVesa->shadowFB = TRUE; ++ break; ++ ++ default: ++ pVesa->shadowFB = TRUE; ++ break; ++ } ++ } ++ + /* Use default refresh by default. Too many VBE 3.0 + * BIOSes are incorrectly implemented. + */ +-- +2.17.0 + diff --git a/SOURCES/0001-Fix-check-function-in-VESASaveRestore.patch b/SOURCES/0001-Fix-check-function-in-VESASaveRestore.patch deleted file mode 100644 index 230c9e7..0000000 --- a/SOURCES/0001-Fix-check-function-in-VESASaveRestore.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 7aafaf56fbca97f36c775462c1ceea3e03700c42 Mon Sep 17 00:00:00 2001 -From: Alexandr Shadchin -Date: Sat, 18 Aug 2012 20:53:34 +0600 -Subject: [PATCH 1/2] Fix check function in VESASaveRestore - -Signed-off-by: Alexandr Shadchin -Reviewed-by: Peter Hutterer -Signed-off-by: Peter Hutterer ---- - src/vesa.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/vesa.c b/src/vesa.c -index 8ac77da..11cd26c 100644 ---- a/src/vesa.c -+++ b/src/vesa.c -@@ -1626,7 +1626,7 @@ VESASaveRestore(ScrnInfoPtr pScrn, vbeSaveRestoreFunction function) - { - VESAPtr pVesa; - -- if (MODE_QUERY < 0 || function > MODE_RESTORE) -+ if (function < MODE_QUERY || function > MODE_RESTORE) - return (FALSE); - - pVesa = VESAGetRec(pScrn); --- -1.8.0.2 - diff --git a/SOURCES/0002-Remove-mibstore.h.patch b/SOURCES/0002-Remove-mibstore.h.patch deleted file mode 100644 index df8a233..0000000 --- a/SOURCES/0002-Remove-mibstore.h.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 60d2dc115c4b6210d3b1e05f5b0c39d1f7917cbc Mon Sep 17 00:00:00 2001 -From: Adam Jackson -Date: Tue, 25 Sep 2012 08:55:03 -0400 -Subject: [PATCH 2/2] Remove mibstore.h - -Signed-off-by: Adam Jackson ---- - src/vesa.c | 4 ---- - 1 file changed, 4 deletions(-) - -diff --git a/src/vesa.c b/src/vesa.c -index 11cd26c..b73d104 100644 ---- a/src/vesa.c -+++ b/src/vesa.c -@@ -49,9 +49,6 @@ - /* All drivers initialising the SW cursor need this */ - #include "mipointer.h" - --/* All drivers implementing backing store need this */ --#include "mibstore.h" -- - /* Colormap handling */ - #include "micmap.h" - #include "xf86cmap.h" -@@ -1081,7 +1078,6 @@ VESAScreenInit(SCREEN_INIT_ARGS_DECL) - VESADGAInit(pScrn, pScreen); - - xf86SetBlackWhitePixels(pScreen); -- miInitializeBackingStore(pScreen); - xf86SetBackingStore(pScreen); - - /* software cursor */ --- -1.8.0.2 - diff --git a/SOURCES/vesa-2.3.0-24bpp-sucks.patch b/SOURCES/vesa-2.3.0-24bpp-sucks.patch deleted file mode 100644 index b22e5ce..0000000 --- a/SOURCES/vesa-2.3.0-24bpp-sucks.patch +++ /dev/null @@ -1,17 +0,0 @@ -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/SOURCES/vesa-2.3.0-no-virt-shadowfb.patch b/SOURCES/vesa-2.3.0-no-virt-shadowfb.patch deleted file mode 100644 index 4b847df..0000000 --- a/SOURCES/vesa-2.3.0-no-virt-shadowfb.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 5abddb02644d2a63d5dff21c936374d6ac3df31e Mon Sep 17 00:00:00 2001 -From: Adam Jackson -Date: Wed, 16 Feb 2011 17:19:00 -0500 -Subject: [PATCH] Turn shadowfb off on virtualized hardware - -There's no benefit to shadowfb, since the framebuffer is in the same -memory domain as host memory; all you're doing is adding extra copies. - -Signed-off-by: Adam Jackson ---- - src/vesa.c | 34 +++++++++++++++++++++++++++++++--- - 1 files changed, 31 insertions(+), 3 deletions(-) - -diff --git a/src/vesa.c b/src/vesa.c -index 61d3550..9fd166f 100644 ---- a/src/vesa.c -+++ b/src/vesa.c -@@ -841,9 +841,37 @@ VESAPreInit(ScrnInfoPtr pScrn, int flags) - memcpy(pVesa->Options, VESAOptions, sizeof(VESAOptions)); - xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, pVesa->Options); - -- /* Use shadow by default */ -- if (xf86ReturnOptValBool(pVesa->Options, OPTION_SHADOW_FB, TRUE)) -- pVesa->shadowFB = TRUE; -+ /* Use shadow by default, for non-virt hardware */ -+ if (!xf86GetOptValBool(pVesa->Options, OPTION_SHADOW_FB, &pVesa->shadowFB)) -+ { -+ switch (pVesa->pciInfo->vendor_id) { -+ case 0x1234: /* bochs vga (not in pci.ids) */ -+ case 0x15ad: /* vmware */ -+ case 0x1b36: /* qemu qxl */ -+ case 0x80ee: /* virtualbox */ -+ case 0xaaaa: /* parallels (not in pci.ids) */ -+ pVesa->shadowFB = FALSE; -+ break; -+ -+ case 0x1013: /* qemu's cirrus emulation */ -+ if (pVesa->pciInfo->subvendor_id == 0x1af4) -+ pVesa->shadowFB = FALSE; -+ else -+ pVesa->shadowFB = TRUE; -+ break; -+ -+ case 0x1414: /* microsoft hyper-v */ -+ if (pVesa->pciInfo->device_id == 0x5353) -+ pVesa->shadowFB = FALSE; -+ else -+ pVesa->shadowFB = TRUE; -+ break; -+ -+ default: -+ pVesa->shadowFB = TRUE; -+ break; -+ } -+ } - - if (xf86ReturnOptValBool(pVesa->Options, OPTION_DFLT_REFRESH, FALSE)) - pVesa->defaultRefresh = TRUE; --- -1.7.3.5 - diff --git a/SPECS/xorg-x11-drv-vesa.spec b/SPECS/xorg-x11-drv-vesa.spec index 700e0c0..7ae6988 100644 --- a/SPECS/xorg-x11-drv-vesa.spec +++ b/SPECS/xorg-x11-drv-vesa.spec @@ -6,17 +6,14 @@ Summary: Xorg X11 vesa video driver Name: xorg-x11-drv-vesa -Version: 2.3.2 -Release: 25.1%{?dist} -URL: http://www.x.org -Source0: http://xorg.freedesktop.org/releases/individual/driver/%{tarball}-%{version}.tar.bz2 +Version: 2.4.0 +Release: 1%{?dist} +URL: https://www.x.org +Source0: https://xorg.freedesktop.org/releases/individual/driver/%{tarball}-%{version}.tar.bz2 License: MIT Group: User Interface/X Hardware Support -Patch0: vesa-2.3.0-24bpp-sucks.patch -Patch1: vesa-2.3.0-no-virt-shadowfb.patch -Patch2: 0001-Fix-check-function-in-VESASaveRestore.patch -Patch3: 0002-Remove-mibstore.h.patch +Patch0: 0001-Disable-shadow-by-default-on-known-virtual-GPUs.patch ExclusiveArch: %{ix86} x86_64 BuildRequires: xorg-x11-server-devel >= 1.10.99.902 @@ -29,14 +26,10 @@ Requires: Xorg %([ -e /usr/bin/xserver-sdk-abi-requires ] && xserver-sdk-abi-req X.Org X11 vesa video driver. %prep -%setup -q -n %{tarball}-%{version} -%patch0 -p1 -b .24 -%patch1 -p1 -b .virt -%patch2 -p1 -%patch3 -p1 +%autosetup -p1 -n %{tarball}-%{version} %build -autoreconf -v --install || exit 1 +autoreconf -f -v --install || exit 1 %configure --disable-static make @@ -57,6 +50,12 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man4/vesa.4* %changelog +* Wed May 30 2018 Adam Jackson - 2.4.0-1 +- vesa 2.4.0 + +* Wed May 30 2018 Adam Jackson - 2.3.2-25.1.1 +- Rebuild for xserver 1.20 + * Mon Feb 06 2017 Adam Jackson - 2.3.2-25.1 - Fix Requires for RHEL