Add patches from upstream for use with xserver-1.19
- Rebuild against xserver-1.19
This commit is contained in:
parent
02420a456b
commit
cb4fb62293
32
0001-Adapt-Block-WakeupHandler-signature-for-ABI-23.patch
Normal file
32
0001-Adapt-Block-WakeupHandler-signature-for-ABI-23.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
From 55d8ea32a0aab73ea64b9b280fba08b2fe5bc5d9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Hans de Goede <hdegoede@redhat.com>
|
||||||
|
Date: Thu, 29 Sep 2016 19:37:22 +0200
|
||||||
|
Subject: [PATCH xf86-video-vmware] Adapt Block/WakeupHandler signature for ABI
|
||||||
|
23
|
||||||
|
|
||||||
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||||
|
---
|
||||||
|
src/compat-api.h | 5 +++++
|
||||||
|
1 file changed, 5 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/compat-api.h b/src/compat-api.h
|
||||||
|
index 205ac59..02876c5 100644
|
||||||
|
--- a/src/compat-api.h
|
||||||
|
+++ b/src/compat-api.h
|
||||||
|
@@ -75,8 +75,13 @@
|
||||||
|
|
||||||
|
#define SCREEN_INIT_ARGS_DECL ScreenPtr pScreen, int argc, char **argv
|
||||||
|
|
||||||
|
+#if ABI_VIDEODRV_VERSION >= SET_ABI_VERSION(23, 0)
|
||||||
|
+#define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout
|
||||||
|
+#define BLOCKHANDLER_ARGS arg, pTimeout
|
||||||
|
+#else
|
||||||
|
#define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout, pointer pReadmask
|
||||||
|
#define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
#define CLOSE_SCREEN_ARGS_DECL ScreenPtr pScreen
|
||||||
|
#define CLOSE_SCREEN_ARGS pScreen
|
||||||
|
--
|
||||||
|
2.9.3
|
||||||
|
|
@ -1,137 +0,0 @@
|
|||||||
From 957a38a715e3013d9ba7a41f1fb1255c4cbff5f9 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Hans de Goede <hdegoede@redhat.com>
|
|
||||||
Date: Tue, 6 May 2014 16:00:50 +0200
|
|
||||||
Subject: [PATCH xf86-video-vmware 1/2] Add support for XSERVER_PLATFORM_BUS
|
|
||||||
|
|
||||||
This is a preparation patch for adding support for server managed fds.
|
|
||||||
|
|
||||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
||||||
---
|
|
||||||
src/vmware.c | 3 ---
|
|
||||||
src/vmware_bootstrap.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++---
|
|
||||||
vmwgfx/vmwgfx_driver.c | 4 ++--
|
|
||||||
3 files changed, 53 insertions(+), 8 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/vmware.c b/src/vmware.c
|
|
||||||
index 6b74e14..17434ab 100644
|
|
||||||
--- a/src/vmware.c
|
|
||||||
+++ b/src/vmware.c
|
|
||||||
@@ -310,9 +310,6 @@ VMWAREPreInit(ScrnInfoPtr pScrn, int flags)
|
|
||||||
pVMWARE->pvtSema = &pScrn->vtSema;
|
|
||||||
|
|
||||||
pVMWARE->pEnt = xf86GetEntityInfo(pScrn->entityList[0]);
|
|
||||||
- if (pVMWARE->pEnt->location.type != BUS_PCI) {
|
|
||||||
- return FALSE;
|
|
||||||
- }
|
|
||||||
pVMWARE->PciInfo = xf86GetPciInfoForEntity(pVMWARE->pEnt->index);
|
|
||||||
if (pVMWARE->PciInfo == NULL) {
|
|
||||||
return FALSE;
|
|
||||||
diff --git a/src/vmware_bootstrap.c b/src/vmware_bootstrap.c
|
|
||||||
index ed6c740..b30cf2b 100644
|
|
||||||
--- a/src/vmware_bootstrap.c
|
|
||||||
+++ b/src/vmware_bootstrap.c
|
|
||||||
@@ -50,6 +50,10 @@
|
|
||||||
#include <xf86_libc.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+#ifdef XSERVER_PLATFORM_BUS
|
|
||||||
+#include "xf86platformBus.h"
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
#ifdef HaveDriverFuncs
|
|
||||||
#define VMWARE_DRIVER_FUNC HaveDriverFuncs
|
|
||||||
#else
|
|
||||||
@@ -247,9 +251,6 @@ VMwarePreinitStub(ScrnInfoPtr pScrn, int flags)
|
|
||||||
vmwlegacy_hookup(pScrn);
|
|
||||||
|
|
||||||
pEnt = xf86GetEntityInfo(pScrn->entityList[0]);
|
|
||||||
- if (pEnt->location.type != BUS_PCI)
|
|
||||||
- return FALSE;
|
|
||||||
-
|
|
||||||
pciInfo = xf86GetPciInfoForEntity(pEnt->index);
|
|
||||||
if (pciInfo == NULL)
|
|
||||||
return FALSE;
|
|
||||||
@@ -407,6 +408,45 @@ VMWAREProbe(DriverPtr drv, int flags)
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+#ifdef XSERVER_PLATFORM_BUS
|
|
||||||
+static Bool
|
|
||||||
+VMwarePlatformProbe(DriverPtr drv, int entity, int flags,
|
|
||||||
+ struct xf86_platform_device *dev, intptr_t match_data)
|
|
||||||
+{
|
|
||||||
+ ScrnInfoPtr pScrn;
|
|
||||||
+ int scrnFlag = 0;
|
|
||||||
+
|
|
||||||
+ if (!dev->pdev)
|
|
||||||
+ return FALSE;
|
|
||||||
+
|
|
||||||
+ if (flags & PLATFORM_PROBE_GPU_SCREEN)
|
|
||||||
+ scrnFlag = XF86_ALLOCATE_GPU_SCREEN;
|
|
||||||
+
|
|
||||||
+ pScrn = xf86AllocateScreen(drv, scrnFlag);
|
|
||||||
+ if (!pScrn)
|
|
||||||
+ return FALSE;
|
|
||||||
+
|
|
||||||
+ if (xf86IsEntitySharable(entity))
|
|
||||||
+ xf86SetEntityShared(entity);
|
|
||||||
+
|
|
||||||
+ xf86AddEntityToScreen(pScrn, entity);
|
|
||||||
+
|
|
||||||
+ pScrn->driverVersion = VMWARE_DRIVER_VERSION;
|
|
||||||
+ pScrn->driverName = VMWARE_DRIVER_NAME;
|
|
||||||
+ pScrn->name = VMWARE_NAME;
|
|
||||||
+ pScrn->Probe = NULL;
|
|
||||||
+#ifdef BUILD_VMWGFX
|
|
||||||
+ vmwgfx_hookup(pScrn);
|
|
||||||
+#else
|
|
||||||
+ vmwlegacy_hookup(pScrn);
|
|
||||||
+#endif
|
|
||||||
+ pScrn->driverPrivate = pScrn->PreInit;
|
|
||||||
+ pScrn->PreInit = VMwarePreinitStub;
|
|
||||||
+
|
|
||||||
+ return TRUE;
|
|
||||||
+}
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
static void
|
|
||||||
VMWAREIdentify(int flags)
|
|
||||||
{
|
|
||||||
@@ -481,6 +521,14 @@ _X_EXPORT DriverRec vmware = {
|
|
||||||
#if XSERVER_LIBPCIACCESS
|
|
||||||
VMwareDeviceMatch,
|
|
||||||
VMwarePciProbe,
|
|
||||||
+#else
|
|
||||||
+ NULL,
|
|
||||||
+ NULL,
|
|
||||||
+#endif
|
|
||||||
+#ifdef XSERVER_PLATFORM_BUS
|
|
||||||
+ VMwarePlatformProbe,
|
|
||||||
+#else
|
|
||||||
+ NULL,
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
diff --git a/vmwgfx/vmwgfx_driver.c b/vmwgfx/vmwgfx_driver.c
|
|
||||||
index 2d38d2a..7e5dc4e 100644
|
|
||||||
--- a/vmwgfx/vmwgfx_driver.c
|
|
||||||
+++ b/vmwgfx/vmwgfx_driver.c
|
|
||||||
@@ -465,13 +465,13 @@ drv_pre_init(ScrnInfoPtr pScrn, int flags)
|
|
||||||
|
|
||||||
pScrn->displayWidth = 640; /* default it */
|
|
||||||
|
|
||||||
- if (ms->pEnt->location.type != BUS_PCI) {
|
|
||||||
+ ms->PciInfo = xf86GetPciInfoForEntity(ms->pEnt->index);
|
|
||||||
+ if (!ms->PciInfo) {
|
|
||||||
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
|
|
||||||
"Incorrect bus for device.\n");
|
|
||||||
goto out_err_bus;
|
|
||||||
}
|
|
||||||
|
|
||||||
- ms->PciInfo = xf86GetPciInfoForEntity(ms->pEnt->index);
|
|
||||||
xf86SetPrimInitDone(pScrn->entityList[0]);
|
|
||||||
|
|
||||||
ms->hdriver = vmwgfx_hosted_detect();
|
|
||||||
--
|
|
||||||
1.9.0
|
|
||||||
|
|
@ -1,142 +0,0 @@
|
|||||||
From 9cc046e896d504d1725e03acd28ff169dfaa0ff8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Hans de Goede <hdegoede@redhat.com>
|
|
||||||
Date: Tue, 6 May 2014 16:33:21 +0200
|
|
||||||
Subject: [PATCH xf86-video-vmware 2/2] Add support for server managed fds
|
|
||||||
|
|
||||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
||||||
---
|
|
||||||
src/vmware_bootstrap.c | 5 +++++
|
|
||||||
vmwgfx/vmwgfx_driver.c | 31 +++++++++++++++++++++++++++----
|
|
||||||
vmwgfx/vmwgfx_driver.h | 2 ++
|
|
||||||
3 files changed, 34 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/vmware_bootstrap.c b/src/vmware_bootstrap.c
|
|
||||||
index b30cf2b..1635876 100644
|
|
||||||
--- a/src/vmware_bootstrap.c
|
|
||||||
+++ b/src/vmware_bootstrap.c
|
|
||||||
@@ -30,6 +30,7 @@
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "xf86.h"
|
|
||||||
+#include <xorgVersion.h>
|
|
||||||
#include "compiler.h"
|
|
||||||
#include "xf86Pci.h" /* pci */
|
|
||||||
#include "vm_device_version.h"
|
|
||||||
@@ -496,6 +497,10 @@ VMWareDriverFunc(ScrnInfoPtr pScrn,
|
|
||||||
pScrn->yDpi / 2) / pScrn->yDpi;
|
|
||||||
}
|
|
||||||
return TRUE;
|
|
||||||
+#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,15,99,902,0)
|
|
||||||
+ case SUPPORTS_SERVER_FDS:
|
|
||||||
+ return TRUE;
|
|
||||||
+#endif
|
|
||||||
default:
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
diff --git a/vmwgfx/vmwgfx_driver.c b/vmwgfx/vmwgfx_driver.c
|
|
||||||
index 7e5dc4e..03103a8 100644
|
|
||||||
--- a/vmwgfx/vmwgfx_driver.c
|
|
||||||
+++ b/vmwgfx/vmwgfx_driver.c
|
|
||||||
@@ -54,6 +54,10 @@
|
|
||||||
|
|
||||||
#include <pciaccess.h>
|
|
||||||
|
|
||||||
+#ifdef XSERVER_PLATFORM_BUS
|
|
||||||
+#include "xf86platformBus.h"
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
#include "vmwgfx_driver.h"
|
|
||||||
|
|
||||||
#include <saa.h>
|
|
||||||
@@ -243,6 +247,15 @@ static const xf86CrtcConfigFuncsRec crtc_config_funcs = {
|
|
||||||
.resize = drv_crtc_resize
|
|
||||||
};
|
|
||||||
|
|
||||||
+static Bool vmwgfx_use_server_fd(modesettingPtr ms)
|
|
||||||
+{
|
|
||||||
+#ifdef XF86_PDEV_SERVER_FD
|
|
||||||
+ return ms->platform_dev && (ms->platform_dev->flags & XF86_PDEV_SERVER_FD);
|
|
||||||
+#else
|
|
||||||
+ return FALSE;
|
|
||||||
+#endif
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
static Bool
|
|
||||||
drv_init_drm(ScrnInfoPtr pScrn)
|
|
||||||
{
|
|
||||||
@@ -253,6 +266,12 @@ drv_init_drm(ScrnInfoPtr pScrn)
|
|
||||||
|
|
||||||
ms->fd = vmwgfx_hosted_drm_fd(ms->hdriver, ms->hosted, ms->PciInfo);
|
|
||||||
|
|
||||||
+#ifdef ODEV_ATTRIB_FD
|
|
||||||
+ if (ms->fd < 0 && vmwgfx_use_server_fd(ms))
|
|
||||||
+ ms->fd = xf86_get_platform_device_int_attrib(ms->platform_dev,
|
|
||||||
+ ODEV_ATTRIB_FD, -1);
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
if (ms->fd < 0) {
|
|
||||||
|
|
||||||
char bus_id[64];
|
|
||||||
@@ -472,6 +491,9 @@ drv_pre_init(ScrnInfoPtr pScrn, int flags)
|
|
||||||
goto out_err_bus;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ if (pEnt->location.type == BUS_PLATFORM)
|
|
||||||
+ ms->platform_dev = pEnt->location.id.plat;
|
|
||||||
+
|
|
||||||
xf86SetPrimInitDone(pScrn->entityList[0]);
|
|
||||||
|
|
||||||
ms->hdriver = vmwgfx_hosted_detect();
|
|
||||||
@@ -605,7 +627,7 @@ drv_pre_init(ScrnInfoPtr pScrn, int flags)
|
|
||||||
free(ms->Options);
|
|
||||||
out_depth:
|
|
||||||
out_drm_version:
|
|
||||||
- if (!vmwgfx_is_hosted(ms->hdriver))
|
|
||||||
+ if (!vmwgfx_is_hosted(ms->hdriver) && !vmwgfx_use_server_fd(ms))
|
|
||||||
close(ms->fd);
|
|
||||||
out_no_drm:
|
|
||||||
vmwgfx_hosted_destroy(ms->hdriver, ms->hosted);
|
|
||||||
@@ -783,8 +805,8 @@ drv_set_master(ScrnInfoPtr pScrn)
|
|
||||||
{
|
|
||||||
modesettingPtr ms = modesettingPTR(pScrn);
|
|
||||||
|
|
||||||
- if (!vmwgfx_is_hosted(ms->hdriver) && !ms->isMaster &&
|
|
||||||
- drmSetMaster(ms->fd) != 0) {
|
|
||||||
+ if (!vmwgfx_is_hosted(ms->hdriver) && !vmwgfx_use_server_fd(ms) &&
|
|
||||||
+ !ms->isMaster && drmSetMaster(ms->fd) != 0) {
|
|
||||||
if (errno == EINVAL) {
|
|
||||||
xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
|
|
||||||
"drmSetMaster failed: 2.6.29 or newer kernel required for "
|
|
||||||
@@ -1184,7 +1206,8 @@ drv_leave_vt(VT_FUNC_ARGS_DECL)
|
|
||||||
|
|
||||||
vmwgfx_saa_drop_master(pScrn->pScreen);
|
|
||||||
|
|
||||||
- if (!vmwgfx_is_hosted(ms->hdriver) && drmDropMaster(ms->fd))
|
|
||||||
+ if (!vmwgfx_is_hosted(ms->hdriver) && !vmwgfx_use_server_fd(ms) &&
|
|
||||||
+ drmDropMaster(ms->fd))
|
|
||||||
xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
|
|
||||||
"drmDropMaster failed: %s\n", strerror(errno));
|
|
||||||
ms->isMaster = FALSE;
|
|
||||||
diff --git a/vmwgfx/vmwgfx_driver.h b/vmwgfx/vmwgfx_driver.h
|
|
||||||
index c044a81..31dfc0f 100644
|
|
||||||
--- a/vmwgfx/vmwgfx_driver.h
|
|
||||||
+++ b/vmwgfx/vmwgfx_driver.h
|
|
||||||
@@ -83,6 +83,7 @@ enum xorg_throttling_reason {
|
|
||||||
};
|
|
||||||
|
|
||||||
struct vmwgfx_hosted;
|
|
||||||
+struct xf86_platform_device;
|
|
||||||
|
|
||||||
typedef struct _modesettingRec
|
|
||||||
{
|
|
||||||
@@ -98,6 +99,7 @@ typedef struct _modesettingRec
|
|
||||||
int Chipset;
|
|
||||||
EntityInfoPtr pEnt;
|
|
||||||
struct pci_device *PciInfo;
|
|
||||||
+ struct xf86_platform_device *platform_dev;
|
|
||||||
|
|
||||||
/* Accel */
|
|
||||||
Bool accelerate_render;
|
|
||||||
--
|
|
||||||
1.9.0
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
|||||||
Summary: Xorg X11 vmware video driver
|
Summary: Xorg X11 vmware video driver
|
||||||
Name: xorg-x11-drv-vmware
|
Name: xorg-x11-drv-vmware
|
||||||
Version: 13.0.2
|
Version: 13.0.2
|
||||||
Release: 11%{?gver}%{?dist}
|
Release: 12%{?gver}%{?dist}
|
||||||
URL: http://www.x.org
|
URL: http://www.x.org
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: User Interface/X Hardware Support
|
Group: User Interface/X Hardware Support
|
||||||
@ -23,6 +23,7 @@ Source0: %{tarball}-%{gitdate}.tar.bz2
|
|||||||
%else
|
%else
|
||||||
Source0: ftp://ftp.x.org/pub/individual/driver/%{tarball}-%{version}.tar.bz2
|
Source0: ftp://ftp.x.org/pub/individual/driver/%{tarball}-%{version}.tar.bz2
|
||||||
%endif
|
%endif
|
||||||
|
Patch0: 0001-Adapt-Block-WakeupHandler-signature-for-ABI-23.patch
|
||||||
|
|
||||||
ExclusiveArch: %{ix86} x86_64 ia64
|
ExclusiveArch: %{ix86} x86_64 ia64
|
||||||
|
|
||||||
@ -42,6 +43,7 @@ X.Org X11 vmware video driver.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{tarball}-%{?gitdate:%{gitdate}}%{!?gitdate:%{version}}
|
%setup -q -n %{tarball}-%{?gitdate:%{gitdate}}%{!?gitdate:%{version}}
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if 0%{?gitdate}
|
%if 0%{?gitdate}
|
||||||
@ -62,6 +64,10 @@ find $RPM_BUILD_ROOT -regex ".*\.la$" | xargs rm -f --
|
|||||||
%{_mandir}/man4/vmware.4*
|
%{_mandir}/man4/vmware.4*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Sep 29 2016 Hans de Goede <hdegoede@redhat.com> - 13.0.2-12.20150211git8f0cf7c
|
||||||
|
- Add patches from upstream for use with xserver-1.19
|
||||||
|
- Rebuild against xserver-1.19
|
||||||
|
|
||||||
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 13.0.2-11.20150211git8f0cf7c
|
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 13.0.2-11.20150211git8f0cf7c
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user