Toshaan Bharvani
2 years ago
commit
7ae942dff7
30 changed files with 3477 additions and 0 deletions
@ -0,0 +1,41 @@ |
|||||||
|
From 38ae53c94a88c7bd5877c72a12582b60865e07ff Mon Sep 17 00:00:00 2001 |
||||||
|
From: Hans de Goede <hdegoede@redhat.com> |
||||||
|
Date: Thu, 17 Apr 2014 15:50:44 +0200 |
||||||
|
Subject: [PATCH] Fedora hack: Make the suid-root wrapper start the server with |
||||||
|
root rights |
||||||
|
|
||||||
|
Do NOT upstream. |
||||||
|
|
||||||
|
Since most display managers are not ready yet to start Xorg in way which will |
||||||
|
keep it working without root-rights, see: |
||||||
|
https://fedoraproject.org/wiki/Changes/XorgWithoutRootRights |
||||||
|
|
||||||
|
Just keep starting X as root for now, but do it through the wrapper, by |
||||||
|
overriding the needs_root_rights = -1 (auto) default and setting it to 1. |
||||||
|
|
||||||
|
We set a special environment variable when starting X in a way where root |
||||||
|
rights are not needed (from gdm and startx) and keep the upstream |
||||||
|
needs_root_rights = -1 (auto) default in that case. |
||||||
|
|
||||||
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com> |
||||||
|
--- |
||||||
|
hw/xfree86/xorg-wrapper.c | 3 +++ |
||||||
|
1 file changed, 3 insertions(+) |
||||||
|
|
||||||
|
diff --git a/hw/xfree86/xorg-wrapper.c b/hw/xfree86/xorg-wrapper.c |
||||||
|
index 4c37cfc..ae5d27f 100644 |
||||||
|
--- a/hw/xfree86/xorg-wrapper.c |
||||||
|
+++ b/hw/xfree86/xorg-wrapper.c |
||||||
|
@@ -198,6 +198,9 @@ int main(int argc, char *argv[]) |
||||||
|
int needs_root_rights = -1; |
||||||
|
char *const empty_envp[1] = { NULL, }; |
||||||
|
|
||||||
|
+ if (getenv("XORG_RUN_AS_USER_OK") == NULL) |
||||||
|
+ needs_root_rights = 1; |
||||||
|
+ |
||||||
|
progname = argv[0]; |
||||||
|
|
||||||
|
parse_config(&allowed, &needs_root_rights); |
||||||
|
-- |
||||||
|
2.4.3 |
||||||
|
|
@ -0,0 +1,293 @@ |
|||||||
|
From 471289fa1dc359555ceed6302f7d9605ab6be3ea Mon Sep 17 00:00:00 2001 |
||||||
|
From: Dave Airlie <airlied@redhat.com> |
||||||
|
Date: Mon, 2 Apr 2018 16:49:02 -0400 |
||||||
|
Subject: [PATCH] autobind GPUs to the screen |
||||||
|
|
||||||
|
This is a modified version of a patch we've been carry-ing in Fedora and |
||||||
|
RHEL for years now. This patch automatically adds secondary GPUs to the |
||||||
|
master as output sink / offload source making e.g. the use of |
||||||
|
slave-outputs just work, with requiring the user to manually run |
||||||
|
"xrandr --setprovideroutputsource" before he can hookup an external |
||||||
|
monitor to his hybrid graphics laptop. |
||||||
|
|
||||||
|
There is one problem with this patch, which is why it was not upstreamed |
||||||
|
before. What to do when a secondary GPU gets detected really is a policy |
||||||
|
decission (e.g. one may want to autobind PCI GPUs but not USB ones) and |
||||||
|
as such should be under control of the Desktop Environment. |
||||||
|
|
||||||
|
Unconditionally adding autobinding support to the xserver will result |
||||||
|
in races between the DE dealing with the hotplug of a secondary GPU |
||||||
|
and the server itself dealing with it. |
||||||
|
|
||||||
|
However we've waited for years for any Desktop Environments to actually |
||||||
|
start doing some sort of autoconfiguration of secondary GPUs and there |
||||||
|
is still not a single DE dealing with this, so I believe that it is |
||||||
|
time to upstream this now. |
||||||
|
|
||||||
|
To avoid potential future problems if any DEs get support for doing |
||||||
|
secondary GPU configuration themselves, the new autobind functionality |
||||||
|
is made optional. Since no DEs currently support doing this themselves it |
||||||
|
is enabled by default. When DEs grow support for doing this themselves |
||||||
|
they can disable the servers autobinding through the servers cmdline or a |
||||||
|
xorg.conf snippet. |
||||||
|
|
||||||
|
Signed-off-by: Dave Airlie <airlied@gmail.com> |
||||||
|
[hdegoede@redhat.com: Make configurable, fix with nvidia, submit upstream] |
||||||
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com> |
||||||
|
--- |
||||||
|
hw/xfree86/common/xf86Config.c | 19 +++++++++++++++++++ |
||||||
|
hw/xfree86/common/xf86Globals.c | 2 ++ |
||||||
|
hw/xfree86/common/xf86Init.c | 20 ++++++++++++++++++++ |
||||||
|
hw/xfree86/common/xf86Priv.h | 1 + |
||||||
|
hw/xfree86/common/xf86Privstr.h | 1 + |
||||||
|
hw/xfree86/common/xf86platformBus.c | 4 ++++ |
||||||
|
hw/xfree86/man/Xorg.man | 7 +++++++ |
||||||
|
hw/xfree86/man/xorg.conf.man | 6 ++++++ |
||||||
|
randr/randrstr.h | 3 +++ |
||||||
|
randr/rrprovider.c | 22 ++++++++++++++++++++++ |
||||||
|
10 files changed, 85 insertions(+) |
||||||
|
|
||||||
|
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c |
||||||
|
index 2c1d335..d7d7c2e 100644 |
||||||
|
--- a/hw/xfree86/common/xf86Config.c |
||||||
|
+++ b/hw/xfree86/common/xf86Config.c |
||||||
|
@@ -643,6 +643,7 @@ typedef enum { |
||||||
|
FLAG_DRI2, |
||||||
|
FLAG_USE_SIGIO, |
||||||
|
FLAG_AUTO_ADD_GPU, |
||||||
|
+ FLAG_AUTO_BIND_GPU, |
||||||
|
FLAG_MAX_CLIENTS, |
||||||
|
FLAG_IGLX, |
||||||
|
FLAG_DEBUG, |
||||||
|
@@ -699,6 +700,8 @@ static OptionInfoRec FlagOptions[] = { |
||||||
|
{0}, FALSE}, |
||||||
|
{FLAG_AUTO_ADD_GPU, "AutoAddGPU", OPTV_BOOLEAN, |
||||||
|
{0}, FALSE}, |
||||||
|
+ {FLAG_AUTO_BIND_GPU, "AutoBindGPU", OPTV_BOOLEAN, |
||||||
|
+ {0}, FALSE}, |
||||||
|
{FLAG_MAX_CLIENTS, "MaxClients", OPTV_INTEGER, |
||||||
|
{0}, FALSE }, |
||||||
|
{FLAG_IGLX, "IndirectGLX", OPTV_BOOLEAN, |
||||||
|
@@ -779,6 +782,22 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) |
||||||
|
} |
||||||
|
xf86Msg(from, "%sutomatically adding GPU devices\n", |
||||||
|
xf86Info.autoAddGPU ? "A" : "Not a"); |
||||||
|
+ |
||||||
|
+ if (xf86AutoBindGPUDisabled) { |
||||||
|
+ xf86Info.autoBindGPU = FALSE; |
||||||
|
+ from = X_CMDLINE; |
||||||
|
+ } |
||||||
|
+ else if (xf86IsOptionSet(FlagOptions, FLAG_AUTO_BIND_GPU)) { |
||||||
|
+ xf86GetOptValBool(FlagOptions, FLAG_AUTO_BIND_GPU, |
||||||
|
+ &xf86Info.autoBindGPU); |
||||||
|
+ from = X_CONFIG; |
||||||
|
+ } |
||||||
|
+ else { |
||||||
|
+ from = X_DEFAULT; |
||||||
|
+ } |
||||||
|
+ xf86Msg(from, "%sutomatically binding GPU devices\n", |
||||||
|
+ xf86Info.autoBindGPU ? "A" : "Not a"); |
||||||
|
+ |
||||||
|
/* |
||||||
|
* Set things up based on the config file information. Some of these |
||||||
|
* settings may be overridden later when the command line options are |
||||||
|
diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c |
||||||
|
index e890f05..7b27b4c 100644 |
||||||
|
--- a/hw/xfree86/common/xf86Globals.c |
||||||
|
+++ b/hw/xfree86/common/xf86Globals.c |
||||||
|
@@ -131,6 +131,7 @@ xf86InfoRec xf86Info = { |
||||||
|
#else |
||||||
|
.autoAddGPU = FALSE, |
||||||
|
#endif |
||||||
|
+ .autoBindGPU = TRUE, |
||||||
|
}; |
||||||
|
|
||||||
|
const char *xf86ConfigFile = NULL; |
||||||
|
@@ -191,6 +192,7 @@ Bool xf86FlipPixels = FALSE; |
||||||
|
Gamma xf86Gamma = { 0.0, 0.0, 0.0 }; |
||||||
|
|
||||||
|
Bool xf86AllowMouseOpenFail = FALSE; |
||||||
|
+Bool xf86AutoBindGPUDisabled = FALSE; |
||||||
|
|
||||||
|
#ifdef XF86VIDMODE |
||||||
|
Bool xf86VidModeDisabled = FALSE; |
||||||
|
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c |
||||||
|
index ea42ec9..ec255b6 100644 |
||||||
|
--- a/hw/xfree86/common/xf86Init.c |
||||||
|
+++ b/hw/xfree86/common/xf86Init.c |
||||||
|
@@ -76,6 +76,7 @@ |
||||||
|
#include "xf86DDC.h" |
||||||
|
#include "xf86Xinput.h" |
||||||
|
#include "xf86InPriv.h" |
||||||
|
+#include "xf86Crtc.h" |
||||||
|
#include "picturestr.h" |
||||||
|
#include "randrstr.h" |
||||||
|
#include "glxvndabi.h" |
||||||
|
@@ -237,6 +238,19 @@ xf86PrivsElevated(void) |
||||||
|
return PrivsElevated(); |
||||||
|
} |
||||||
|
|
||||||
|
+static void |
||||||
|
+xf86AutoConfigOutputDevices(void) |
||||||
|
+{ |
||||||
|
+ int i; |
||||||
|
+ |
||||||
|
+ if (!xf86Info.autoBindGPU) |
||||||
|
+ return; |
||||||
|
+ |
||||||
|
+ for (i = 0; i < xf86NumGPUScreens; i++) |
||||||
|
+ RRProviderAutoConfigGpuScreen(xf86ScrnToScreen(xf86GPUScreens[i]), |
||||||
|
+ xf86ScrnToScreen(xf86Screens[0])); |
||||||
|
+} |
||||||
|
+ |
||||||
|
static void |
||||||
|
TrapSignals(void) |
||||||
|
{ |
||||||
|
@@ -770,6 +784,8 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) |
||||||
|
for (i = 0; i < xf86NumGPUScreens; i++) |
||||||
|
AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen); |
||||||
|
|
||||||
|
+ xf86AutoConfigOutputDevices(); |
||||||
|
+ |
||||||
|
xf86VGAarbiterWrapFunctions(); |
||||||
|
if (sigio_blocked) |
||||||
|
input_unlock(); |
||||||
|
@@ -1278,6 +1294,10 @@ ddxProcessArgument(int argc, char **argv, int i) |
||||||
|
xf86Info.iglxFrom = X_CMDLINE; |
||||||
|
return 0; |
||||||
|
} |
||||||
|
+ if (!strcmp(argv[i], "-noautoBindGPU")) { |
||||||
|
+ xf86AutoBindGPUDisabled = TRUE; |
||||||
|
+ return 1; |
||||||
|
+ } |
||||||
|
|
||||||
|
/* OS-specific processing */ |
||||||
|
return xf86ProcessArgument(argc, argv, i); |
||||||
|
diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h |
||||||
|
index 4fe2b5f..6566622 100644 |
||||||
|
--- a/hw/xfree86/common/xf86Priv.h |
||||||
|
+++ b/hw/xfree86/common/xf86Priv.h |
||||||
|
@@ -46,6 +46,7 @@ |
||||||
|
extern _X_EXPORT const char *xf86ConfigFile; |
||||||
|
extern _X_EXPORT const char *xf86ConfigDir; |
||||||
|
extern _X_EXPORT Bool xf86AllowMouseOpenFail; |
||||||
|
+extern _X_EXPORT Bool xf86AutoBindGPUDisabled; |
||||||
|
|
||||||
|
#ifdef XF86VIDMODE |
||||||
|
extern _X_EXPORT Bool xf86VidModeDisabled; |
||||||
|
diff --git a/hw/xfree86/common/xf86Privstr.h b/hw/xfree86/common/xf86Privstr.h |
||||||
|
index 21c2e1f..6c71863 100644 |
||||||
|
--- a/hw/xfree86/common/xf86Privstr.h |
||||||
|
+++ b/hw/xfree86/common/xf86Privstr.h |
||||||
|
@@ -98,6 +98,7 @@ typedef struct { |
||||||
|
|
||||||
|
Bool autoAddGPU; |
||||||
|
const char *debug; |
||||||
|
+ Bool autoBindGPU; |
||||||
|
} xf86InfoRec, *xf86InfoPtr; |
||||||
|
|
||||||
|
/* ISC's cc can't handle ~ of UL constants, so explicitly type cast them. */ |
||||||
|
diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c |
||||||
|
index cef47da..913a324 100644 |
||||||
|
--- a/hw/xfree86/common/xf86platformBus.c |
||||||
|
+++ b/hw/xfree86/common/xf86platformBus.c |
||||||
|
@@ -49,6 +49,7 @@ |
||||||
|
#include "Pci.h" |
||||||
|
#include "xf86platformBus.h" |
||||||
|
#include "xf86Config.h" |
||||||
|
+#include "xf86Crtc.h" |
||||||
|
|
||||||
|
#include "randrstr.h" |
||||||
|
int platformSlotClaimed; |
||||||
|
@@ -665,6 +666,9 @@ xf86platformAddDevice(int index) |
||||||
|
} |
||||||
|
/* attach unbound to 0 protocol screen */ |
||||||
|
AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen); |
||||||
|
+ if (xf86Info.autoBindGPU) |
||||||
|
+ RRProviderAutoConfigGpuScreen(xf86ScrnToScreen(xf86GPUScreens[i]), |
||||||
|
+ xf86ScrnToScreen(xf86Screens[0])); |
||||||
|
|
||||||
|
RRResourcesChanged(xf86Screens[0]->pScreen); |
||||||
|
RRTellChanged(xf86Screens[0]->pScreen); |
||||||
|
diff --git a/hw/xfree86/man/Xorg.man b/hw/xfree86/man/Xorg.man |
||||||
|
index 13a9dc3..745f986 100644 |
||||||
|
--- a/hw/xfree86/man/Xorg.man |
||||||
|
+++ b/hw/xfree86/man/Xorg.man |
||||||
|
@@ -283,6 +283,13 @@ is a comma separated list of directories to search for |
||||||
|
server modules. This option is only available when the server is run |
||||||
|
as root (i.e, with real-uid 0). |
||||||
|
.TP 8 |
||||||
|
+.B \-noautoBindGPU |
||||||
|
+Disable automatically setting secondary GPUs up as output sinks and offload |
||||||
|
+sources. This is equivalent to setting the |
||||||
|
+.B AutoBindGPU |
||||||
|
+xorg.conf(__filemansuffix__) file option. To |
||||||
|
+.B false. |
||||||
|
+.TP 8 |
||||||
|
.B \-nosilk |
||||||
|
Disable Silken Mouse support. |
||||||
|
.TP 8 |
||||||
|
diff --git a/hw/xfree86/man/xorg.conf.man b/hw/xfree86/man/xorg.conf.man |
||||||
|
index 9589262..8d51e06 100644 |
||||||
|
--- a/hw/xfree86/man/xorg.conf.man |
||||||
|
+++ b/hw/xfree86/man/xorg.conf.man |
||||||
|
@@ -672,6 +672,12 @@ Enabled by default. |
||||||
|
If this option is disabled, then no GPU devices will be added from the udev |
||||||
|
backend. Enabled by default. (May need to be disabled to setup Xinerama). |
||||||
|
.TP 7 |
||||||
|
+.BI "Option \*qAutoBindGPU\*q \*q" boolean \*q |
||||||
|
+If enabled then secondary GPUs will be automatically set up as output-sinks and |
||||||
|
+offload-sources. Making e.g. laptop outputs connected only to the secondary |
||||||
|
+GPU directly available for use without needing to run |
||||||
|
+"xrandr --setprovideroutputsource". Enabled by default. |
||||||
|
+.TP 7 |
||||||
|
.BI "Option \*qLog\*q \*q" string \*q |
||||||
|
This option controls whether the log is flushed and/or synced to disk after |
||||||
|
each message. |
||||||
|
diff --git a/randr/randrstr.h b/randr/randrstr.h |
||||||
|
index f94174b..092d726 100644 |
||||||
|
--- a/randr/randrstr.h |
||||||
|
+++ b/randr/randrstr.h |
||||||
|
@@ -1039,6 +1039,9 @@ RRProviderLookup(XID id, RRProviderPtr *provider_p); |
||||||
|
extern _X_EXPORT void |
||||||
|
RRDeliverProviderEvent(ClientPtr client, WindowPtr pWin, RRProviderPtr provider); |
||||||
|
|
||||||
|
+extern _X_EXPORT void |
||||||
|
+RRProviderAutoConfigGpuScreen(ScreenPtr pScreen, ScreenPtr masterScreen); |
||||||
|
+ |
||||||
|
/* rrproviderproperty.c */ |
||||||
|
|
||||||
|
extern _X_EXPORT void |
||||||
|
diff --git a/randr/rrprovider.c b/randr/rrprovider.c |
||||||
|
index e4bc2bf..e04c18f 100644 |
||||||
|
--- a/randr/rrprovider.c |
||||||
|
+++ b/randr/rrprovider.c |
||||||
|
@@ -485,3 +485,25 @@ RRDeliverProviderEvent(ClientPtr client, WindowPtr pWin, RRProviderPtr provider) |
||||||
|
|
||||||
|
WriteEventsToClient(client, 1, (xEvent *) &pe); |
||||||
|
} |
||||||
|
+ |
||||||
|
+void |
||||||
|
+RRProviderAutoConfigGpuScreen(ScreenPtr pScreen, ScreenPtr masterScreen) |
||||||
|
+{ |
||||||
|
+ rrScrPrivPtr pScrPriv = rrGetScrPriv(pScreen); |
||||||
|
+ rrScrPrivPtr masterPriv = rrGetScrPriv(masterScreen); |
||||||
|
+ RRProviderPtr provider = pScrPriv->provider; |
||||||
|
+ RRProviderPtr master_provider = masterPriv->provider; |
||||||
|
+ |
||||||
|
+ if (!provider || !master_provider) |
||||||
|
+ return; |
||||||
|
+ |
||||||
|
+ if ((provider->capabilities & RR_Capability_SinkOutput) && |
||||||
|
+ (master_provider->capabilities & RR_Capability_SourceOutput)) { |
||||||
|
+ pScrPriv->rrProviderSetOutputSource(pScreen, provider, master_provider); |
||||||
|
+ RRInitPrimeSyncProps(pScreen); |
||||||
|
+ } |
||||||
|
+ |
||||||
|
+ if ((provider->capabilities & RR_Capability_SourceOffload) && |
||||||
|
+ (master_provider->capabilities & RR_Capability_SinkOffload)) |
||||||
|
+ pScrPriv->rrProviderSetOffloadSink(pScreen, provider, master_provider); |
||||||
|
+} |
||||||
|
-- |
||||||
|
2.16.2 |
||||||
|
|
@ -0,0 +1,49 @@ |
|||||||
|
From 88f0787f93f097a125a0aa156eb9a5628adfc2c2 Mon Sep 17 00:00:00 2001 |
||||||
|
From: Alex Goins <agoins@nvidia.com> |
||||||
|
Date: Thu, 12 Dec 2019 20:18:53 -0600 |
||||||
|
Subject: [PATCH xserver] modesetting: Fix msSharePixmapBacking Segfault |
||||||
|
Regression |
||||||
|
MIME-Version: 1.0 |
||||||
|
Content-Type: text/plain; charset=UTF-8 |
||||||
|
Content-Transfer-Encoding: 8bit |
||||||
|
|
||||||
|
Commit cb1b1e184 modified msSharePixmapBacking() to derive modesettingPtr from |
||||||
|
the 'screen' argument. Unfortunately, the name of the argument is misleading -- |
||||||
|
the screen is the slave screen. If the master is modesetting, |
||||||
|
and the slave is not modesetting, it will segfault. |
||||||
|
|
||||||
|
To fix the problem, this change derives modesettingPtr from |
||||||
|
ppix->drawable.pScreen. This method is already used when calling |
||||||
|
ms->glamor.shareable_fd_from_pixmap() later in the function. |
||||||
|
|
||||||
|
To avoid future issues, this change also renames the 'screen' argument to |
||||||
|
'slave'. |
||||||
|
|
||||||
|
Signed-off-by: Alex Goins <agoins@nvidia.com> |
||||||
|
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com> |
||||||
|
(cherry picked from commit 456dff1bf890459840718339279dcb84d36531eb) |
||||||
|
--- |
||||||
|
hw/xfree86/drivers/modesetting/driver.c | 5 +++-- |
||||||
|
1 file changed, 3 insertions(+), 2 deletions(-) |
||||||
|
|
||||||
|
diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c |
||||||
|
index ce8bac9f5..0817fa470 100644 |
||||||
|
--- a/hw/xfree86/drivers/modesetting/driver.c |
||||||
|
+++ b/hw/xfree86/drivers/modesetting/driver.c |
||||||
|
@@ -1454,10 +1454,11 @@ CreateScreenResources(ScreenPtr pScreen) |
||||||
|
} |
||||||
|
|
||||||
|
static Bool |
||||||
|
-msSharePixmapBacking(PixmapPtr ppix, ScreenPtr screen, void **handle) |
||||||
|
+msSharePixmapBacking(PixmapPtr ppix, ScreenPtr slave, void **handle) |
||||||
|
{ |
||||||
|
#ifdef GLAMOR_HAS_GBM |
||||||
|
- modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(screen)); |
||||||
|
+ modesettingPtr ms = |
||||||
|
+ modesettingPTR(xf86ScreenToScrn(ppix->drawable.pScreen)); |
||||||
|
int ret; |
||||||
|
CARD16 stride; |
||||||
|
CARD32 size; |
||||||
|
-- |
||||||
|
2.34.1 |
||||||
|
|
@ -0,0 +1,83 @@ |
|||||||
|
From b3afd9ccefe156ab2dee993118fcdba40341f66e Mon Sep 17 00:00:00 2001 |
||||||
|
From: Adam Jackson <ajax@redhat.com> |
||||||
|
Date: Fri, 1 Oct 2021 11:47:21 -0400 |
||||||
|
Subject: [PATCH xserver] mustard: xfree86: Disable the PCI probe path |
||||||
|
|
||||||
|
RHEL 9 does not support userspace modesetting drivers for Xorg. Ideally |
||||||
|
it would only support DRM drivers, but there are some fallback paths |
||||||
|
(efifb mainly) that still require fbdev support. Since the primary use |
||||||
|
of the PCI probe path is devices _without_ kernel support, we can safely |
||||||
|
disable it. And indeed we want to, because there are some devices |
||||||
|
(hyperv v1 e.g.) with both a platform and a PCI presentation, which the |
||||||
|
PCI probe code fails to handle such that the server fails to start. |
||||||
|
|
||||||
|
Thus: we #if 0 out the PCI probe in xf86CallDriverProbe. |
||||||
|
|
||||||
|
It might be nice if the platform code knew about fbdev devices, but it |
||||||
|
does not, and teaching it would be a large change for little benefit |
||||||
|
given we do intend to sunset the fbdev path as well. Since the fbdev |
||||||
|
path exists solely for cases where we have only the rudimentary firmare |
||||||
|
framebuffer, we should only use it if _no_ platform driver is available. |
||||||
|
|
||||||
|
Thus: we only call the legacy probe method if xf86ProbeIgnorePrimary. |
||||||
|
|
||||||
|
Having done this, we need to go back into fbdevhw and undo fc78bcca: |
||||||
|
|
||||||
|
commit fc78bcca21e767697de6ad4d8e03b6728856f613 (merge-requests/38) |
||||||
|
Author: Adam Jackson <ajax@redhat.com> |
||||||
|
Date: Wed Oct 10 14:09:11 2018 -0400 |
||||||
|
|
||||||
|
fbdevhw: Refuse to touch PCI devices on the fallback probe path |
||||||
|
|
||||||
|
Which was well intentioned, but given the above changes we know by the |
||||||
|
time we're trying to probe fbdev we really do want it, either because of |
||||||
|
the above fallback path or because xorg.conf asked for it. In either |
||||||
|
case we shouldn't spuriously fail just because it happens to be PCI. |
||||||
|
|
||||||
|
Thus: We if (0) out the code added in fc78bcca. |
||||||
|
|
||||||
|
Any one of the above might be questionable upstream, hence the mustard |
||||||
|
nature of this patch. |
||||||
|
--- |
||||||
|
hw/xfree86/common/xf86Bus.c | 4 ++-- |
||||||
|
hw/xfree86/fbdevhw/fbdevhw.c | 2 +- |
||||||
|
2 files changed, 3 insertions(+), 3 deletions(-) |
||||||
|
|
||||||
|
diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c |
||||||
|
index fd144dbe7a..844ce5a890 100644 |
||||||
|
--- a/hw/xfree86/common/xf86Bus.c |
||||||
|
+++ b/hw/xfree86/common/xf86Bus.c |
||||||
|
@@ -84,7 +84,7 @@ xf86CallDriverProbe(DriverPtr drv, Bool detect_only) |
||||||
|
} |
||||||
|
#endif |
||||||
|
|
||||||
|
-#ifdef XSERVER_LIBPCIACCESS |
||||||
|
+#if 0 |
||||||
|
if (!foundScreen && (drv->PciProbe != NULL)) { |
||||||
|
if (xf86DoConfigure && xf86DoConfigurePass1) { |
||||||
|
assert(detect_only); |
||||||
|
@@ -96,7 +96,7 @@ xf86CallDriverProbe(DriverPtr drv, Bool detect_only) |
||||||
|
} |
||||||
|
} |
||||||
|
#endif |
||||||
|
- if (!foundScreen && (drv->Probe != NULL)) { |
||||||
|
+ if (!foundScreen && xf86ProbeIgnorePrimary && (drv->Probe != NULL)) { |
||||||
|
xf86Msg(X_WARNING, "Falling back to old probe method for %s\n", |
||||||
|
drv->driverName); |
||||||
|
foundScreen = (*drv->Probe) (drv, (detect_only) ? PROBE_DETECT |
||||||
|
diff --git a/hw/xfree86/fbdevhw/fbdevhw.c b/hw/xfree86/fbdevhw/fbdevhw.c |
||||||
|
index 3d8b92e669..171038f46d 100644 |
||||||
|
--- a/hw/xfree86/fbdevhw/fbdevhw.c |
||||||
|
+++ b/hw/xfree86/fbdevhw/fbdevhw.c |
||||||
|
@@ -330,7 +330,7 @@ fbdev_open(int scrnIndex, const char *dev, char **namep) |
||||||
|
} |
||||||
|
|
||||||
|
/* only touch non-PCI devices on this path */ |
||||||
|
- { |
||||||
|
+ if (0) { |
||||||
|
char buf[PATH_MAX]; |
||||||
|
char *sysfs_path = NULL; |
||||||
|
char *node = strrchr(dev, '/') + 1; |
||||||
|
-- |
||||||
|
2.31.1 |
||||||
|
|
@ -0,0 +1,43 @@ |
|||||||
|
From 94b4a3d45451d29e9539ea234ce8b5e9ed58546c Mon Sep 17 00:00:00 2001 |
||||||
|
From: =?UTF-8?q?B=C5=82a=C5=BCej=20Szczygie=C5=82?= <spaz16@wp.pl> |
||||||
|
Date: Thu, 13 Jan 2022 00:47:27 +0100 |
||||||
|
Subject: [PATCH xserver] present: Check for NULL to prevent crash |
||||||
|
MIME-Version: 1.0 |
||||||
|
Content-Type: text/plain; charset=UTF-8 |
||||||
|
Content-Transfer-Encoding: 8bit |
||||||
|
|
||||||
|
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1275 |
||||||
|
Signed-off-by: Błażej Szczygieł <spaz16@wp.pl> |
||||||
|
Tested-by: Aaron Plattner <aplattner@nvidia.com> |
||||||
|
(cherry picked from commit 22d5818851967408bb7c903cb345b7ca8766094c) |
||||||
|
--- |
||||||
|
present/present_scmd.c | 6 ++++++ |
||||||
|
1 file changed, 6 insertions(+) |
||||||
|
|
||||||
|
diff --git a/present/present_scmd.c b/present/present_scmd.c |
||||||
|
index 3c68e690b..11391adbb 100644 |
||||||
|
--- a/present/present_scmd.c |
||||||
|
+++ b/present/present_scmd.c |
||||||
|
@@ -168,6 +168,9 @@ present_scmd_get_crtc(present_screen_priv_ptr screen_priv, WindowPtr window) |
||||||
|
if (!screen_priv->info) |
||||||
|
return NULL; |
||||||
|
|
||||||
|
+ if (!screen_priv->info->get_crtc) |
||||||
|
+ return NULL; |
||||||
|
+ |
||||||
|
return (*screen_priv->info->get_crtc)(window); |
||||||
|
} |
||||||
|
|
||||||
|
@@ -206,6 +209,9 @@ present_flush(WindowPtr window) |
||||||
|
if (!screen_priv->info) |
||||||
|
return; |
||||||
|
|
||||||
|
+ if (!screen_priv->info->flush) |
||||||
|
+ return; |
||||||
|
+ |
||||||
|
(*screen_priv->info->flush) (window); |
||||||
|
} |
||||||
|
|
||||||
|
-- |
||||||
|
2.34.1 |
||||||
|
|
@ -0,0 +1,35 @@ |
|||||||
|
From acc50e6097d51fec0c6c34d84c35018a50c52d5a Mon Sep 17 00:00:00 2001 |
||||||
|
From: Povilas Kanapickas <povilas@radix.lt> |
||||||
|
Date: Tue, 14 Dec 2021 15:00:00 +0200 |
||||||
|
Subject: [PATCH xserver 1/4] record: Fix out of bounds access in |
||||||
|
SwapCreateRegister() |
||||||
|
|
||||||
|
ZDI-CAN-14952, CVE-2021-4011 |
||||||
|
|
||||||
|
This vulnerability was discovered and the fix was suggested by: |
||||||
|
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative |
||||||
|
|
||||||
|
Signed-off-by: Povilas Kanapickas <povilas@radix.lt> |
||||||
|
(cherry picked from commit e56f61c79fc3cee26d83cda0f84ae56d5979f768) |
||||||
|
--- |
||||||
|
record/record.c | 4 ++-- |
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-) |
||||||
|
|
||||||
|
diff --git a/record/record.c b/record/record.c |
||||||
|
index 05d751ac2..a8aec23bd 100644 |
||||||
|
--- a/record/record.c |
||||||
|
+++ b/record/record.c |
||||||
|
@@ -2515,8 +2515,8 @@ SwapCreateRegister(ClientPtr client, xRecordRegisterClientsReq * stuff) |
||||||
|
swapl(pClientID); |
||||||
|
} |
||||||
|
if (stuff->nRanges > |
||||||
|
- client->req_len - bytes_to_int32(sz_xRecordRegisterClientsReq) |
||||||
|
- - stuff->nClients) |
||||||
|
+ (client->req_len - bytes_to_int32(sz_xRecordRegisterClientsReq) |
||||||
|
+ - stuff->nClients) / bytes_to_int32(sz_xRecordRange)) |
||||||
|
return BadLength; |
||||||
|
RecordSwapRanges((xRecordRange *) pClientID, stuff->nRanges); |
||||||
|
return Success; |
||||||
|
-- |
||||||
|
2.33.1 |
||||||
|
|
@ -0,0 +1,152 @@ |
|||||||
|
From acf5a0100c98a040e5e07a79ecf4a83627da770e Mon Sep 17 00:00:00 2001 |
||||||
|
From: Hans de Goede <hdegoede@redhat.com> |
||||||
|
Date: Thu, 23 Mar 2017 12:54:07 +0100 |
||||||
|
Subject: [PATCH xserver] xf86: dri2: Use va_gl as vdpau_driver for Intel i965 |
||||||
|
GPUs |
||||||
|
|
||||||
|
The modesetting driver (which now often is used with Intel GPUs), |
||||||
|
relies on dri2_probe_driver_name() to get the dri and vdpau driver |
||||||
|
names, before this commit it would always assign the same name to |
||||||
|
the 2 names. But the vdpau driver for i965 GPUs should be va_gl |
||||||
|
(i915 does not support vdpau at all). |
||||||
|
|
||||||
|
This commit modifies the used lookup table and dri2_probe_driver_name() |
||||||
|
to set the vdpau_driver to va_gl for i965 GPUs, it leaves the 2 |
||||||
|
names the same for all other GPUs. |
||||||
|
|
||||||
|
Note this commit adds a FIXME comment for a memory leak in |
||||||
|
dri2_probe_driver_name(), that leak was already present and fixing |
||||||
|
it falls outside of the scope of this commit. |
||||||
|
|
||||||
|
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1413733 |
||||||
|
Cc: kwizart@gmail.com |
||||||
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com> |
||||||
|
--- |
||||||
|
hw/xfree86/dri2/dri2.c | 31 +++++++++++++-------- |
||||||
|
hw/xfree86/dri2/pci_ids/pci_id_driver_map.h | 21 +++++++------- |
||||||
|
2 files changed, 31 insertions(+), 21 deletions(-) |
||||||
|
|
||||||
|
diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c |
||||||
|
index 6619e3aa7..1f8ad14bc 100644 |
||||||
|
--- a/hw/xfree86/dri2/dri2.c |
||||||
|
+++ b/hw/xfree86/dri2/dri2.c |
||||||
|
@@ -1437,14 +1437,18 @@ get_prime_id(void) |
||||||
|
|
||||||
|
#include "pci_ids/pci_id_driver_map.h" |
||||||
|
|
||||||
|
-static char * |
||||||
|
-dri2_probe_driver_name(ScreenPtr pScreen, DRI2InfoPtr info) |
||||||
|
+static void |
||||||
|
+dri2_probe_driver_name(ScreenPtr pScreen, DRI2InfoPtr info, |
||||||
|
+ const char **dri_driver_ret, |
||||||
|
+ const char **vdpau_driver_ret) |
||||||
|
{ |
||||||
|
#ifdef WITH_LIBDRM |
||||||
|
int i, j; |
||||||
|
- char *driver = NULL; |
||||||
|
drmDevicePtr dev; |
||||||
|
|
||||||
|
+ *dri_driver_ret = NULL; |
||||||
|
+ *vdpau_driver_ret = NULL; |
||||||
|
+ |
||||||
|
/* For non-PCI devices and drmGetDevice fail, just assume that |
||||||
|
* the 3D driver is named the same as the kernel driver. This is |
||||||
|
* currently true for vc4 and msm (freedreno). |
||||||
|
@@ -1456,12 +1460,14 @@ dri2_probe_driver_name(ScreenPtr pScreen, DRI2InfoPtr info) |
||||||
|
xf86DrvMsg(pScreen->myNum, X_ERROR, |
||||||
|
"[DRI2] Couldn't drmGetVersion() on non-PCI device, " |
||||||
|
"no driver name found.\n"); |
||||||
|
- return NULL; |
||||||
|
+ return; |
||||||
|
} |
||||||
|
|
||||||
|
- driver = strndup(version->name, version->name_len); |
||||||
|
+ /* FIXME this gets leaked */ |
||||||
|
+ *dri_driver_ret = strndup(version->name, version->name_len); |
||||||
|
+ *vdpau_driver_ret = *dri_driver_ret; |
||||||
|
drmFreeVersion(version); |
||||||
|
- return driver; |
||||||
|
+ return; |
||||||
|
} |
||||||
|
|
||||||
|
for (i = 0; driver_map[i].driver; i++) { |
||||||
|
@@ -1469,13 +1475,15 @@ dri2_probe_driver_name(ScreenPtr pScreen, DRI2InfoPtr info) |
||||||
|
continue; |
||||||
|
|
||||||
|
if (driver_map[i].num_chips_ids == -1) { |
||||||
|
- driver = strdup(driver_map[i].driver); |
||||||
|
+ *dri_driver_ret = driver_map[i].driver; |
||||||
|
+ *vdpau_driver_ret = driver_map[i].vdpau_driver; |
||||||
|
goto out; |
||||||
|
} |
||||||
|
|
||||||
|
for (j = 0; j < driver_map[i].num_chips_ids; j++) { |
||||||
|
if (driver_map[i].chip_ids[j] == dev->deviceinfo.pci->device_id) { |
||||||
|
- driver = strdup(driver_map[i].driver); |
||||||
|
+ *dri_driver_ret = driver_map[i].driver; |
||||||
|
+ *vdpau_driver_ret = driver_map[i].vdpau_driver; |
||||||
|
goto out; |
||||||
|
} |
||||||
|
} |
||||||
|
@@ -1487,9 +1495,9 @@ dri2_probe_driver_name(ScreenPtr pScreen, DRI2InfoPtr info) |
||||||
|
dev->deviceinfo.pci->vendor_id, dev->deviceinfo.pci->device_id); |
||||||
|
out: |
||||||
|
drmFreeDevice(&dev); |
||||||
|
- return driver; |
||||||
|
#else |
||||||
|
- return NULL; |
||||||
|
+ *dri_driver_ret = NULL; |
||||||
|
+ *vdpau_driver_ret = NULL; |
||||||
|
#endif |
||||||
|
} |
||||||
|
|
||||||
|
@@ -1610,7 +1618,8 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info) |
||||||
|
if (info->driverName) { |
||||||
|
ds->driverNames[0] = info->driverName; |
||||||
|
} else { |
||||||
|
- ds->driverNames[0] = ds->driverNames[1] = dri2_probe_driver_name(pScreen, info); |
||||||
|
+ dri2_probe_driver_name(pScreen, info, |
||||||
|
+ &ds->driverNames[0], &ds->driverNames[1]); |
||||||
|
if (!ds->driverNames[0]) |
||||||
|
return FALSE; |
||||||
|
} |
||||||
|
diff --git a/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h b/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h |
||||||
|
index da7ea1c1e..7036d1003 100644 |
||||||
|
--- a/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h |
||||||
|
+++ b/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h |
||||||
|
@@ -66,21 +66,22 @@ static const int vmwgfx_chip_ids[] = { |
||||||
|
static const struct { |
||||||
|
int vendor_id; |
||||||
|
const char *driver; |
||||||
|
+ const char *vdpau_driver; |
||||||
|
const int *chip_ids; |
||||||
|
int num_chips_ids; |
||||||
|
} driver_map[] = { |
||||||
|
- { 0x8086, "i915", i915_chip_ids, ARRAY_SIZE(i915_chip_ids) }, |
||||||
|
- { 0x8086, "i965", i965_chip_ids, ARRAY_SIZE(i965_chip_ids) }, |
||||||
|
+ { 0x8086, "i915", "i915", i915_chip_ids, ARRAY_SIZE(i915_chip_ids) }, |
||||||
|
+ { 0x8086, "i965", "va_gl", i965_chip_ids, ARRAY_SIZE(i965_chip_ids) }, |
||||||
|
#ifndef DRIVER_MAP_GALLIUM_ONLY |
||||||
|
- { 0x1002, "radeon", r100_chip_ids, ARRAY_SIZE(r100_chip_ids) }, |
||||||
|
- { 0x1002, "r200", r200_chip_ids, ARRAY_SIZE(r200_chip_ids) }, |
||||||
|
+ { 0x1002, "radeon", "radeon", r100_chip_ids, ARRAY_SIZE(r100_chip_ids) }, |
||||||
|
+ { 0x1002, "r200", "r200", r200_chip_ids, ARRAY_SIZE(r200_chip_ids) }, |
||||||
|
#endif |
||||||
|
- { 0x1002, "r300", r300_chip_ids, ARRAY_SIZE(r300_chip_ids) }, |
||||||
|
- { 0x1002, "r600", r600_chip_ids, ARRAY_SIZE(r600_chip_ids) }, |
||||||
|
- { 0x1002, "radeonsi", radeonsi_chip_ids, ARRAY_SIZE(radeonsi_chip_ids) }, |
||||||
|
- { 0x10de, "nouveau", NULL, -1 }, |
||||||
|
- { 0x1af4, "virtio_gpu", virtio_gpu_chip_ids, ARRAY_SIZE(virtio_gpu_chip_ids) }, |
||||||
|
- { 0x15ad, "vmwgfx", vmwgfx_chip_ids, ARRAY_SIZE(vmwgfx_chip_ids) }, |
||||||
|
+ { 0x1002, "r300", "r300", r300_chip_ids, ARRAY_SIZE(r300_chip_ids) }, |
||||||
|
+ { 0x1002, "r600","r600", r600_chip_ids, ARRAY_SIZE(r600_chip_ids) }, |
||||||
|
+ { 0x1002, "radeonsi", "radeonsi", radeonsi_chip_ids, ARRAY_SIZE(radeonsi_chip_ids) }, |
||||||
|
+ { 0x10de, "nouveau", "nouveau", NULL, -1 }, |
||||||
|
+ { 0x1af4, "virtio_gpu", "virtio_gpu", virtio_gpu_chip_ids, ARRAY_SIZE(virtio_gpu_chip_ids) }, |
||||||
|
+ { 0x15ad, "vmwgfx", "vmwgfx", vmwgfx_chip_ids, ARRAY_SIZE(vmwgfx_chip_ids) }, |
||||||
|
{ 0x0000, NULL, NULL, 0 }, |
||||||
|
}; |
||||||
|
|
||||||
|
-- |
||||||
|
2.19.0 |
||||||
|
|
@ -0,0 +1,52 @@ |
|||||||
|
From aa2f34d80ef3118eae0cce73b610c36cdcb978fe Mon Sep 17 00:00:00 2001 |
||||||
|
From: Ben Skeggs <bskeggs@redhat.com> |
||||||
|
Date: Sat, 22 Apr 2017 02:26:28 +1000 |
||||||
|
Subject: [PATCH xserver] xfree86: use modesetting driver by default on GeForce |
||||||
|
8 and newer |
||||||
|
|
||||||
|
Signed-off-by: Ben Skeggs <bskeggs@redhat.com> |
||||||
|
--- |
||||||
|
hw/xfree86/common/xf86pciBus.c | 20 ++++++++++++++++++++ |
||||||
|
1 file changed, 20 insertions(+) |
||||||
|
|
||||||
|
diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c |
||||||
|
index 8158c2b62..78d1c947d 100644 |
||||||
|
--- a/hw/xfree86/common/xf86pciBus.c |
||||||
|
+++ b/hw/xfree86/common/xf86pciBus.c |
||||||
|
@@ -37,6 +37,7 @@ |
||||||
|
#include <unistd.h> |
||||||
|
#include <X11/X.h> |
||||||
|
#include <pciaccess.h> |
||||||
|
+#include <xf86drm.h> |
||||||
|
#include "os.h" |
||||||
|
#include "Pci.h" |
||||||
|
#include "xf86.h" |
||||||
|
@@ -1190,6 +1191,25 @@ xf86VideoPtrToDriverList(struct pci_device *dev, |
||||||
|
int idx = 0; |
||||||
|
|
||||||
|
#if defined(__linux__) || defined(__NetBSD__) |
||||||
|
+ char busid[32]; |
||||||
|
+ int fd; |
||||||
|
+ |
||||||
|
+ snprintf(busid, sizeof(busid), "pci:%04x:%02x:%02x.%d", |
||||||
|
+ dev->domain, dev->bus, dev->dev, dev->func); |
||||||
|
+ |
||||||
|
+ /* 'modesetting' is preferred for GeForce 8 and newer GPUs */ |
||||||
|
+ fd = drmOpenWithType("nouveau", busid, DRM_NODE_RENDER); |
||||||
|
+ if (fd >= 0) { |
||||||
|
+ uint64_t args[] = { 11 /* NOUVEAU_GETPARAM_CHIPSET_ID */, 0 }; |
||||||
|
+ int ret = drmCommandWriteRead(fd, 0 /* DRM_NOUVEAU_GETPARAM */, |
||||||
|
+ &args, sizeof(args)); |
||||||
|
+ drmClose(fd); |
||||||
|
+ if (ret == 0) { |
||||||
|
+ if (args[1] == 0x050 || args[1] >= 0x80) |
||||||
|
+ break; |
||||||
|
+ } |
||||||
|
+ } |
||||||
|
+ |
||||||
|
driverList[idx++] = "nouveau"; |
||||||
|
#endif |
||||||
|
driverList[idx++] = "nv"; |
||||||
|
-- |
||||||
|
2.12.2 |
||||||
|
|
@ -0,0 +1,118 @@ |
|||||||
|
From 36bcef5e5fd175e95ed4e0a014f6b1d8598b719d Mon Sep 17 00:00:00 2001 |
||||||
|
From: Ray Strode <rstrode@redhat.com> |
||||||
|
Date: Mon, 4 Oct 2021 14:27:54 -0400 |
||||||
|
Subject: [PATCH] xkb: Drop check for XkbSetMapResizeTypes |
||||||
|
|
||||||
|
Commit 446ff2d3177087b8173fa779fa5b77a2a128988b added checks to |
||||||
|
prevalidate the size of incoming SetMap requests. |
||||||
|
|
||||||
|
That commit checks for the XkbSetMapResizeTypes flag to be set before |
||||||
|
allowing key types data to be processed. |
||||||
|
|
||||||
|
key types data can be changed or even just sent wholesale unchanged |
||||||
|
without the number of key types changing, however. The check for |
||||||
|
XkbSetMapResizeTypes rejects those legitimate requests. In particular, |
||||||
|
XkbChangeMap never sets XkbSetMapResizeTypes and so always fails now |
||||||
|
any time XkbKeyTypesMask is in the changed mask. |
||||||
|
|
||||||
|
This commit drops the check for XkbSetMapResizeTypes in flags when |
||||||
|
prevalidating the request length. |
||||||
|
--- |
||||||
|
xkb/xkb.c | 26 ++++++++++++-------------- |
||||||
|
1 file changed, 12 insertions(+), 14 deletions(-) |
||||||
|
|
||||||
|
diff --git a/xkb/xkb.c b/xkb/xkb.c |
||||||
|
index 183d6ffa1..62dee9cb6 100644 |
||||||
|
--- a/xkb/xkb.c |
||||||
|
+++ b/xkb/xkb.c |
||||||
|
@@ -2378,75 +2378,73 @@ SetVirtualModMap(XkbSrvInfoPtr xkbi, |
||||||
|
} |
||||||
|
changes->map.first_vmodmap_key = first; |
||||||
|
changes->map.num_vmodmap_keys = (last - first) + 1; |
||||||
|
} |
||||||
|
return (char *) wire; |
||||||
|
} |
||||||
|
|
||||||
|
#define _add_check_len(new) \ |
||||||
|
if (len > UINT32_MAX - (new) || len > req_len - (new)) goto bad; \ |
||||||
|
else len += new |
||||||
|
|
||||||
|
/** |
||||||
|
* Check the length of the SetMap request |
||||||
|
*/ |
||||||
|
static int |
||||||
|
_XkbSetMapCheckLength(xkbSetMapReq *req) |
||||||
|
{ |
||||||
|
size_t len = sz_xkbSetMapReq, req_len = req->length << 2; |
||||||
|
xkbKeyTypeWireDesc *keytype; |
||||||
|
xkbSymMapWireDesc *symmap; |
||||||
|
BOOL preserve; |
||||||
|
int i, map_count, nSyms; |
||||||
|
|
||||||
|
if (req_len < len) |
||||||
|
goto bad; |
||||||
|
/* types */ |
||||||
|
if (req->present & XkbKeyTypesMask) { |
||||||
|
keytype = (xkbKeyTypeWireDesc *)(req + 1); |
||||||
|
for (i = 0; i < req->nTypes; i++) { |
||||||
|
_add_check_len(XkbPaddedSize(sz_xkbKeyTypeWireDesc)); |
||||||
|
- if (req->flags & XkbSetMapResizeTypes) { |
||||||
|
- _add_check_len(keytype->nMapEntries |
||||||
|
- * sz_xkbKTSetMapEntryWireDesc); |
||||||
|
- preserve = keytype->preserve; |
||||||
|
- map_count = keytype->nMapEntries; |
||||||
|
- if (preserve) { |
||||||
|
- _add_check_len(map_count * sz_xkbModsWireDesc); |
||||||
|
- } |
||||||
|
- keytype += 1; |
||||||
|
- keytype = (xkbKeyTypeWireDesc *) |
||||||
|
- ((xkbKTSetMapEntryWireDesc *)keytype + map_count); |
||||||
|
- if (preserve) |
||||||
|
- keytype = (xkbKeyTypeWireDesc *) |
||||||
|
- ((xkbModsWireDesc *)keytype + map_count); |
||||||
|
+ _add_check_len(keytype->nMapEntries |
||||||
|
+ * sz_xkbKTSetMapEntryWireDesc); |
||||||
|
+ preserve = keytype->preserve; |
||||||
|
+ map_count = keytype->nMapEntries; |
||||||
|
+ if (preserve) { |
||||||
|
+ _add_check_len(map_count * sz_xkbModsWireDesc); |
||||||
|
} |
||||||
|
+ keytype += 1; |
||||||
|
+ keytype = (xkbKeyTypeWireDesc *) |
||||||
|
+ ((xkbKTSetMapEntryWireDesc *)keytype + map_count); |
||||||
|
+ if (preserve) |
||||||
|
+ keytype = (xkbKeyTypeWireDesc *) |
||||||
|
+ ((xkbModsWireDesc *)keytype + map_count); |
||||||
|
} |
||||||
|
} |
||||||
|
/* syms */ |
||||||
|
if (req->present & XkbKeySymsMask) { |
||||||
|
symmap = (xkbSymMapWireDesc *)((char *)req + len); |
||||||
|
for (i = 0; i < req->nKeySyms; i++) { |
||||||
|
_add_check_len(sz_xkbSymMapWireDesc); |
||||||
|
nSyms = symmap->nSyms; |
||||||
|
_add_check_len(nSyms*sizeof(CARD32)); |
||||||
|
symmap += 1; |
||||||
|
symmap = (xkbSymMapWireDesc *)((CARD32 *)symmap + nSyms); |
||||||
|
} |
||||||
|
} |
||||||
|
/* actions */ |
||||||
|
if (req->present & XkbKeyActionsMask) { |
||||||
|
_add_check_len(req->totalActs * sz_xkbActionWireDesc |
||||||
|
+ XkbPaddedSize(req->nKeyActs)); |
||||||
|
} |
||||||
|
/* behaviours */ |
||||||
|
if (req->present & XkbKeyBehaviorsMask) { |
||||||
|
_add_check_len(req->totalKeyBehaviors * sz_xkbBehaviorWireDesc); |
||||||
|
} |
||||||
|
/* vmods */ |
||||||
|
if (req->present & XkbVirtualModsMask) { |
||||||
|
_add_check_len(XkbPaddedSize(Ones(req->virtualMods))); |
||||||
|
} |
||||||
|
/* explicit */ |
||||||
|
if (req->present & XkbExplicitComponentsMask) { |
||||||
|
/* two bytes per non-zero explicit componen */ |
||||||
|
_add_check_len(XkbPaddedSize(req->totalKeyExplicit * sizeof(CARD16))); |
||||||
|
-- |
||||||
|
2.32.0 |
||||||
|
|
@ -0,0 +1,44 @@ |
|||||||
|
From 6bb8aeb30a2686facc48733016caade97ece10ad Mon Sep 17 00:00:00 2001 |
||||||
|
From: Povilas Kanapickas <povilas@radix.lt> |
||||||
|
Date: Tue, 14 Dec 2021 15:00:01 +0200 |
||||||
|
Subject: [PATCH xserver 2/4] xfixes: Fix out of bounds access in |
||||||
|
*ProcXFixesCreatePointerBarrier() |
||||||
|
|
||||||
|
ZDI-CAN-14950, CVE-2021-4009 |
||||||
|
|
||||||
|
This vulnerability was discovered and the fix was suggested by: |
||||||
|
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative |
||||||
|
|
||||||
|
Signed-off-by: Povilas Kanapickas <povilas@radix.lt> |
||||||
|
(cherry picked from commit b5196750099ae6ae582e1f46bd0a6dad29550e02) |
||||||
|
--- |
||||||
|
xfixes/cursor.c | 6 ++++-- |
||||||
|
1 file changed, 4 insertions(+), 2 deletions(-) |
||||||
|
|
||||||
|
diff --git a/xfixes/cursor.c b/xfixes/cursor.c |
||||||
|
index d4b68f3af..5f531a89a 100644 |
||||||
|
--- a/xfixes/cursor.c |
||||||
|
+++ b/xfixes/cursor.c |
||||||
|
@@ -1010,7 +1010,8 @@ ProcXFixesCreatePointerBarrier(ClientPtr client) |
||||||
|
{ |
||||||
|
REQUEST(xXFixesCreatePointerBarrierReq); |
||||||
|
|
||||||
|
- REQUEST_FIXED_SIZE(xXFixesCreatePointerBarrierReq, pad_to_int32(stuff->num_devices)); |
||||||
|
+ REQUEST_FIXED_SIZE(xXFixesCreatePointerBarrierReq, |
||||||
|
+ pad_to_int32(stuff->num_devices * sizeof(CARD16))); |
||||||
|
LEGAL_NEW_RESOURCE(stuff->barrier, client); |
||||||
|
|
||||||
|
return XICreatePointerBarrier(client, stuff); |
||||||
|
@@ -1027,7 +1028,8 @@ SProcXFixesCreatePointerBarrier(ClientPtr client) |
||||||
|
|
||||||
|
swaps(&stuff->length); |
||||||
|
swaps(&stuff->num_devices); |
||||||
|
- REQUEST_FIXED_SIZE(xXFixesCreatePointerBarrierReq, pad_to_int32(stuff->num_devices)); |
||||||
|
+ REQUEST_FIXED_SIZE(xXFixesCreatePointerBarrierReq, |
||||||
|
+ pad_to_int32(stuff->num_devices * sizeof(CARD16))); |
||||||
|
|
||||||
|
swapl(&stuff->barrier); |
||||||
|
swapl(&stuff->window); |
||||||
|
-- |
||||||
|
2.33.1 |
||||||
|
|
@ -0,0 +1,153 @@ |
|||||||
|
From c2eb1e2eac99ef0b8e6cf47ab0a94371cf47e939 Mon Sep 17 00:00:00 2001 |
||||||
|
From: Adam Jackson <ajax@redhat.com> |
||||||
|
Date: Tue, 23 Jul 2019 11:54:15 -0400 |
||||||
|
Subject: [PATCH xserver 02/11] xfree86: Link fb statically |
||||||
|
|
||||||
|
There's no real benefit to leaving this loadable, virtually every driver |
||||||
|
is going to load it. |
||||||
|
|
||||||
|
Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk> |
||||||
|
(cherry picked from commit c1703cdf3b0d6663fcac68598eefe324ae4e1e71) |
||||||
|
--- |
||||||
|
hw/xfree86/Makefile.am | 1 + |
||||||
|
hw/xfree86/dixmods/Makefile.am | 8 +------- |
||||||
|
hw/xfree86/dixmods/meson.build | 14 -------------- |
||||||
|
hw/xfree86/drivers/modesetting/meson.build | 1 - |
||||||
|
hw/xfree86/loader/loadmod.c | 1 + |
||||||
|
hw/xfree86/meson.build | 1 + |
||||||
|
hw/xfree86/sdksyms.sh | 6 +++--- |
||||||
|
test/Makefile.am | 1 + |
||||||
|
8 files changed, 8 insertions(+), 25 deletions(-) |
||||||
|
|
||||||
|
diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am |
||||||
|
index 9aeaea1a6..1d494cd0f 100644 |
||||||
|
--- a/hw/xfree86/Makefile.am |
||||||
|
+++ b/hw/xfree86/Makefile.am |
||||||
|
@@ -75,6 +75,7 @@ LOCAL_LIBS = \ |
||||||
|
$(DRI2_LIB) \ |
||||||
|
$(DRI3_LIB) \ |
||||||
|
$(GLXVND_LIB) \ |
||||||
|
+ $(top_builddir)/fb/libfb.la \ |
||||||
|
$(top_builddir)/miext/sync/libsync.la \ |
||||||
|
$(top_builddir)/mi/libmi.la \ |
||||||
|
$(top_builddir)/os/libos.la \ |
||||||
|
diff --git a/hw/xfree86/dixmods/Makefile.am b/hw/xfree86/dixmods/Makefile.am |
||||||
|
index 856659f98..a1f97056a 100644 |
||||||
|
--- a/hw/xfree86/dixmods/Makefile.am |
||||||
|
+++ b/hw/xfree86/dixmods/Makefile.am |
||||||
|
@@ -4,8 +4,7 @@ if GLX |
||||||
|
GLXMODS = libglx.la |
||||||
|
endif |
||||||
|
|
||||||
|
-module_LTLIBRARIES = libfb.la \ |
||||||
|
- libwfb.la \ |
||||||
|
+module_LTLIBRARIES = libwfb.la \ |
||||||
|
libshadow.la |
||||||
|
|
||||||
|
extsmoduledir = $(moduledir)/extensions |
||||||
|
@@ -17,11 +16,6 @@ AM_CPPFLAGS = @XORG_INCS@ \ |
||||||
|
-I$(top_srcdir)/miext/shadow \ |
||||||
|
-I$(top_srcdir)/glx |
||||||
|
|
||||||
|
-libfb_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG) |
||||||
|
-libfb_la_LIBADD = $(top_builddir)/fb/libfb.la |
||||||
|
-libfb_la_SOURCES = fbmodule.c |
||||||
|
-libfb_la_CFLAGS = $(AM_CFLAGS) |
||||||
|
- |
||||||
|
libwfb_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG) |
||||||
|
libwfb_la_LIBADD = $(top_builddir)/fb/libwfb.la |
||||||
|
libwfb_la_SOURCES = fbmodule.c |
||||||
|
diff --git a/hw/xfree86/dixmods/meson.build b/hw/xfree86/dixmods/meson.build |
||||||
|
index 0562b630f..e4ac02228 100644 |
||||||
|
--- a/hw/xfree86/dixmods/meson.build |
||||||
|
+++ b/hw/xfree86/dixmods/meson.build |
||||||
|
@@ -1,17 +1,3 @@ |
||||||
|
-fb = shared_module( |
||||||
|
- 'fb', |
||||||
|
- 'fbmodule.c', |
||||||
|
- |
||||||
|
- include_directories: [inc, xorg_inc], |
||||||
|
- c_args: xorg_c_args, |
||||||
|
- dependencies: common_dep, |
||||||
|
- link_whole: libxserver_fb, |
||||||
|
- link_with: e, |
||||||
|
- |
||||||
|
- install: true, |
||||||
|
- install_dir: module_dir, |
||||||
|
-) |
||||||
|
- |
||||||
|
shared_module( |
||||||
|
'wfb', |
||||||
|
'fbmodule.c', |
||||||
|
diff --git a/hw/xfree86/drivers/modesetting/meson.build b/hw/xfree86/drivers/modesetting/meson.build |
||||||
|
index 5e13f1a53..02852a716 100644 |
||||||
|
--- a/hw/xfree86/drivers/modesetting/meson.build |
||||||
|
+++ b/hw/xfree86/drivers/modesetting/meson.build |
||||||
|
@@ -30,7 +30,6 @@ shared_module( |
||||||
|
xorg_build_root = join_paths(meson.build_root(), 'hw', 'xfree86') |
||||||
|
symbol_test_args = [] |
||||||
|
symbol_test_args += join_paths(xorg_build_root, 'libxorgserver.so') |
||||||
|
-symbol_test_args += join_paths(xorg_build_root, 'dixmods', 'libfb.so') |
||||||
|
symbol_test_args += join_paths(xorg_build_root, 'dixmods', 'libshadow.so') |
||||||
|
if gbm_dep.found() |
||||||
|
symbol_test_args += join_paths(xorg_build_root, 'glamor_egl', 'libglamoregl.so') |
||||||
|
diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c |
||||||
|
index a6356bd8f..f0983b2f8 100644 |
||||||
|
--- a/hw/xfree86/loader/loadmod.c |
||||||
|
+++ b/hw/xfree86/loader/loadmod.c |
||||||
|
@@ -621,6 +621,7 @@ DuplicateModule(ModuleDescPtr mod, ModuleDescPtr parent) |
||||||
|
|
||||||
|
static const char *compiled_in_modules[] = { |
||||||
|
"ddc", |
||||||
|
+ "fb", |
||||||
|
"i2c", |
||||||
|
"ramdac", |
||||||
|
"dbe", |
||||||
|
diff --git a/hw/xfree86/meson.build b/hw/xfree86/meson.build |
||||||
|
index cacf56d4c..c80964ea4 100644 |
||||||
|
--- a/hw/xfree86/meson.build |
||||||
|
+++ b/hw/xfree86/meson.build |
||||||
|
@@ -61,6 +61,7 @@ xorg_link = [ |
||||||
|
xorg_os_support, |
||||||
|
xorg_parser, |
||||||
|
xorg_ramdac, |
||||||
|
+ libxserver_fb, |
||||||
|
libxserver_xext_vidmode, |
||||||
|
libxserver_main, |
||||||
|
libxserver_config, |
||||||
|
diff --git a/hw/xfree86/sdksyms.sh b/hw/xfree86/sdksyms.sh |
||||||
|
index 7897aae22..2ebc4c019 100755 |
||||||
|
--- a/hw/xfree86/sdksyms.sh |
||||||
|
+++ b/hw/xfree86/sdksyms.sh |
||||||
|
@@ -21,13 +21,13 @@ cat > sdksyms.c << EOF |
||||||
|
#include "picturestr.h" |
||||||
|
|
||||||
|
|
||||||
|
-/* fb/Makefile.am -- module */ |
||||||
|
-/* |
||||||
|
+/* fb/Makefile.am */ |
||||||
|
#include "fb.h" |
||||||
|
#include "fbrop.h" |
||||||
|
#include "fboverlay.h" |
||||||
|
-#include "wfbrename.h" |
||||||
|
#include "fbpict.h" |
||||||
|
+/* wfb is still a module |
||||||
|
+#include "wfbrename.h" |
||||||
|
*/ |
||||||
|
|
||||||
|
|
||||||
|
diff --git a/test/Makefile.am b/test/Makefile.am |
||||||
|
index 12ac327a3..ce07c3551 100644 |
||||||
|
--- a/test/Makefile.am |
||||||
|
+++ b/test/Makefile.am |
||||||
|
@@ -146,6 +146,7 @@ tests_LDADD += \ |
||||||
|
$(top_builddir)/hw/xfree86/i2c/libi2c.la \ |
||||||
|
$(top_builddir)/hw/xfree86/xkb/libxorgxkb.la \ |
||||||
|
$(top_builddir)/Xext/libXvidmode.la \ |
||||||
|
+ $(top_builddir)/fb/libfb.la \ |
||||||
|
$(XSERVER_LIBS) \ |
||||||
|
$(XORG_LIBS) |
||||||
|
|
||||||
|
-- |
||||||
|
2.33.1 |
||||||
|
|
@ -0,0 +1,34 @@ |
|||||||
|
From 67425fcab50ef24a5617e109897f38876dd81277 Mon Sep 17 00:00:00 2001 |
||||||
|
From: Povilas Kanapickas <povilas@radix.lt> |
||||||
|
Date: Tue, 14 Dec 2021 15:00:02 +0200 |
||||||
|
Subject: [PATCH xserver 3/4] Xext: Fix out of bounds access in |
||||||
|
SProcScreenSaverSuspend() |
||||||
|
|
||||||
|
ZDI-CAN-14951, CVE-2021-4010 |
||||||
|
|
||||||
|
This vulnerability was discovered and the fix was suggested by: |
||||||
|
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative |
||||||
|
|
||||||
|
Signed-off-by: Povilas Kanapickas <povilas@radix.lt> |
||||||
|
(cherry picked from commit 6c4c53010772e3cb4cb8acd54950c8eec9c00d21) |
||||||
|
--- |
||||||
|
Xext/saver.c | 2 +- |
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-) |
||||||
|
|
||||||
|
diff --git a/Xext/saver.c b/Xext/saver.c |
||||||
|
index c27a66c80..c23907dbb 100644 |
||||||
|
--- a/Xext/saver.c |
||||||
|
+++ b/Xext/saver.c |
||||||
|
@@ -1351,8 +1351,8 @@ SProcScreenSaverSuspend(ClientPtr client) |
||||||
|
REQUEST(xScreenSaverSuspendReq); |
||||||
|
|
||||||
|
swaps(&stuff->length); |
||||||
|
- swapl(&stuff->suspend); |
||||||
|
REQUEST_SIZE_MATCH(xScreenSaverSuspendReq); |
||||||
|
+ swapl(&stuff->suspend); |
||||||
|
return ProcScreenSaverSuspend(client); |
||||||
|
} |
||||||
|
|
||||||
|
-- |
||||||
|
2.33.1 |
||||||
|
|
@ -0,0 +1,42 @@ |
|||||||
|
From e763a4fa114ba6c0abddf2b43a7297b8b9054855 Mon Sep 17 00:00:00 2001 |
||||||
|
From: Adam Jackson <ajax@redhat.com> |
||||||
|
Date: Tue, 8 Oct 2019 13:29:22 -0400 |
||||||
|
Subject: [PATCH xserver 04/11] loader: Move LoaderSymbolFromModule() to public |
||||||
|
API |
||||||
|
|
||||||
|
Bare LoaderSymbol() isn't really a great API, this is more of a direct |
||||||
|
map to dlsym like you want. |
||||||
|
|
||||||
|
Gitlab: https://gitlab.freedesktop.org/xorg/xserver/issues/692 |
||||||
|
(cherry picked from commit 8760fab0a15805bdd12bb8f12bb1c665fde86cc2) |
||||||
|
--- |
||||||
|
hw/xfree86/common/xf86Module.h | 1 + |
||||||
|
hw/xfree86/loader/loader.h | 1 - |
||||||
|
2 files changed, 1 insertion(+), 1 deletion(-) |
||||||
|
|
||||||
|
diff --git a/hw/xfree86/common/xf86Module.h b/hw/xfree86/common/xf86Module.h |
||||||
|
index 00aa84ae2..fab8842c4 100644 |
||||||
|
--- a/hw/xfree86/common/xf86Module.h |
||||||
|
+++ b/hw/xfree86/common/xf86Module.h |
||||||
|
@@ -156,6 +156,7 @@ extern _X_EXPORT void *LoadSubModule(void *, const char *, const char **, |
||||||
|
extern _X_EXPORT void UnloadSubModule(void *); |
||||||
|
extern _X_EXPORT void UnloadModule(void *); |
||||||
|
extern _X_EXPORT void *LoaderSymbol(const char *); |
||||||
|
+extern _X_EXPORT void *LoaderSymbolFromModule(void *, const char *); |
||||||
|
extern _X_EXPORT void LoaderErrorMsg(const char *, const char *, int, int); |
||||||
|
extern _X_EXPORT Bool LoaderShouldIgnoreABI(void); |
||||||
|
extern _X_EXPORT int LoaderGetABIVersion(const char *abiclass); |
||||||
|
diff --git a/hw/xfree86/loader/loader.h b/hw/xfree86/loader/loader.h |
||||||
|
index 5a2fe6c60..4e83730a2 100644 |
||||||
|
--- a/hw/xfree86/loader/loader.h |
||||||
|
+++ b/hw/xfree86/loader/loader.h |
||||||
|
@@ -72,6 +72,5 @@ extern unsigned long LoaderOptions; |
||||||
|
|
||||||
|
/* Internal Functions */ |
||||||
|
void *LoaderOpen(const char *, int *); |
||||||
|
-void *LoaderSymbolFromModule(void *, const char *); |
||||||
|
|
||||||
|
#endif /* _LOADER_H */ |
||||||
|
-- |
||||||
|
2.33.1 |
||||||
|
|
@ -0,0 +1,53 @@ |
|||||||
|
From 35b4681c79480d980bd8dcba390146aad7817c47 Mon Sep 17 00:00:00 2001 |
||||||
|
From: Povilas Kanapickas <povilas@radix.lt> |
||||||
|
Date: Tue, 14 Dec 2021 15:00:03 +0200 |
||||||
|
Subject: [PATCH xserver 4/4] render: Fix out of bounds access in |
||||||
|
SProcRenderCompositeGlyphs() |
||||||
|
|
||||||
|
ZDI-CAN-14192, CVE-2021-4008 |
||||||
|
|
||||||
|
This vulnerability was discovered and the fix was suggested by: |
||||||
|
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative |
||||||
|
|
||||||
|
Signed-off-by: Povilas Kanapickas <povilas@radix.lt> |
||||||
|
(cherry picked from commit ebce7e2d80e7c80e1dda60f2f0bc886f1106ba60) |
||||||
|
--- |
||||||
|
render/render.c | 9 +++++++++ |
||||||
|
1 file changed, 9 insertions(+) |
||||||
|
|
||||||
|
diff --git a/render/render.c b/render/render.c |
||||||
|
index c376090ca..456f156d4 100644 |
||||||
|
--- a/render/render.c |
||||||
|
+++ b/render/render.c |
||||||
|
@@ -2309,6 +2309,9 @@ SProcRenderCompositeGlyphs(ClientPtr client) |
||||||
|
|
||||||
|
i = elt->len; |
||||||
|
if (i == 0xff) { |
||||||
|
+ if (buffer + 4 > end) { |
||||||
|
+ return BadLength; |
||||||
|
+ } |
||||||
|
swapl((int *) buffer); |
||||||
|
buffer += 4; |
||||||
|
} |
||||||
|
@@ -2319,12 +2322,18 @@ SProcRenderCompositeGlyphs(ClientPtr client) |
||||||
|
buffer += i; |
||||||
|
break; |
||||||
|
case 2: |
||||||
|
+ if (buffer + i * 2 > end) { |
||||||
|
+ return BadLength; |
||||||
|
+ } |
||||||
|
while (i--) { |
||||||
|
swaps((short *) buffer); |
||||||
|
buffer += 2; |
||||||
|
} |
||||||
|
break; |
||||||
|
case 4: |
||||||
|
+ if (buffer + i * 4 > end) { |
||||||
|
+ return BadLength; |
||||||
|
+ } |
||||||
|
while (i--) { |
||||||
|
swapl((int *) buffer); |
||||||
|
buffer += 4; |
||||||
|
-- |
||||||
|
2.33.1 |
||||||
|
|
@ -0,0 +1,50 @@ |
|||||||
|
From b01ca791b9ba62e25e3533ba35f8e825f02f0f80 Mon Sep 17 00:00:00 2001 |
||||||
|
From: Adam Jackson <ajax@redhat.com> |
||||||
|
Date: Mon, 18 Nov 2019 16:43:50 -0500 |
||||||
|
Subject: [PATCH xserver 05/11] loader: Make LoaderSymbolFromModule take a |
||||||
|
ModuleDescPtr |
||||||
|
MIME-Version: 1.0 |
||||||
|
Content-Type: text/plain; charset=UTF-8 |
||||||
|
Content-Transfer-Encoding: 8bit |
||||||
|
|
||||||
|
The thing you get back from xf86LoadSubModule is a ModuleDescPtr, not a |
||||||
|
dlsym handle. We don't expose ModuleDescPtr to the drivers, so change |
||||||
|
LoaderSymbolFromModule to cast its void * argument to a ModuleDescPtr. |
||||||
|
|
||||||
|
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com> |
||||||
|
(cherry picked from commit ab61c16ef07fde6eb7110c63c344c54eb2a2d117) |
||||||
|
--- |
||||||
|
hw/xfree86/loader/loader.c | 3 ++- |
||||||
|
hw/xfree86/loader/loadmod.c | 2 +- |
||||||
|
2 files changed, 3 insertions(+), 2 deletions(-) |
||||||
|
|
||||||
|
diff --git a/hw/xfree86/loader/loader.c b/hw/xfree86/loader/loader.c |
||||||
|
index 503c47e3a..2580e93d9 100644 |
||||||
|
--- a/hw/xfree86/loader/loader.c |
||||||
|
+++ b/hw/xfree86/loader/loader.c |
||||||
|
@@ -135,7 +135,8 @@ LoaderSymbol(const char *name) |
||||||
|
void * |
||||||
|
LoaderSymbolFromModule(void *handle, const char *name) |
||||||
|
{ |
||||||
|
- return dlsym(handle, name); |
||||||
|
+ ModuleDescPtr mod = handle; |
||||||
|
+ return dlsym(mod->handle, name); |
||||||
|
} |
||||||
|
|
||||||
|
void |
||||||
|
diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c |
||||||
|
index a93a76aa9..81a3a1dd9 100644 |
||||||
|
--- a/hw/xfree86/loader/loadmod.c |
||||||
|
+++ b/hw/xfree86/loader/loadmod.c |
||||||
|
@@ -776,7 +776,7 @@ LoadModule(const char *module, void *options, const XF86ModReqInfo *modreq, |
||||||
|
*errmaj = LDR_NOMEM; |
||||||
|
goto LoadModule_fail; |
||||||
|
} |
||||||
|
- initdata = LoaderSymbolFromModule(ret->handle, p); |
||||||
|
+ initdata = LoaderSymbolFromModule(ret, p); |
||||||
|
if (initdata) { |
||||||
|
ModuleSetupProc setup; |
||||||
|
ModuleTearDownProc teardown; |
||||||
|
-- |
||||||
|
2.33.1 |
||||||
|
|
@ -0,0 +1,144 @@ |
|||||||
|
From 13d3bc7a05eb7500c8987358c68c20a4bfe18079 Mon Sep 17 00:00:00 2001 |
||||||
|
From: Adam Jackson <ajax@redhat.com> |
||||||
|
Date: Tue, 8 Oct 2019 12:52:28 -0400 |
||||||
|
Subject: [PATCH xserver 06/11] modesetting: Indirect the shadow API through |
||||||
|
LoaderSymbol |
||||||
|
|
||||||
|
Prerequisite for building all of xserver with -z now. |
||||||
|
|
||||||
|
Gitlab: https://gitlab.freedesktop.org/xorg/xserver/issues/692 |
||||||
|
(cherry picked from commit 45f35a0c6666c5f35df482948e0c8e91167429ef) |
||||||
|
--- |
||||||
|
hw/xfree86/drivers/modesetting/driver.c | 34 +++++++++++-------------- |
||||||
|
hw/xfree86/drivers/modesetting/driver.h | 12 ++++++++- |
||||||
|
2 files changed, 26 insertions(+), 20 deletions(-) |
||||||
|
|
||||||
|
diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c |
||||||
|
index ec4189a2c..a385e7ee2 100644 |
||||||
|
--- a/hw/xfree86/drivers/modesetting/driver.c |
||||||
|
+++ b/hw/xfree86/drivers/modesetting/driver.c |
||||||
|
@@ -50,7 +50,6 @@ |
||||||
|
#include "xf86Crtc.h" |
||||||
|
#include "miscstruct.h" |
||||||
|
#include "dixstruct.h" |
||||||
|
-#include "shadow.h" |
||||||
|
#include "xf86xv.h" |
||||||
|
#include <X11/extensions/Xv.h> |
||||||
|
#include <xorg-config.h> |
||||||
|
@@ -60,7 +59,6 @@ |
||||||
|
#ifdef XSERVER_LIBPCIACCESS |
||||||
|
#include <pciaccess.h> |
||||||
|
#endif |
||||||
|
- |
||||||
|
#include "driver.h" |
||||||
|
|
||||||
|
static void AdjustFrame(ScrnInfoPtr pScrn, int x, int y); |
||||||
|
@@ -1084,9 +1082,16 @@ PreInit(ScrnInfoPtr pScrn, int flags) |
||||||
|
} |
||||||
|
|
||||||
|
if (ms->drmmode.shadow_enable) { |
||||||
|
- if (!xf86LoadSubModule(pScrn, "shadow")) { |
||||||
|
+ void *mod = xf86LoadSubModule(pScrn, "shadow"); |
||||||
|
+ |
||||||
|
+ if (!mod) |
||||||
|
return FALSE; |
||||||
|
- } |
||||||
|
+ |
||||||
|
+ ms->shadow.Setup = LoaderSymbolFromModule(mod, "shadowSetup"); |
||||||
|
+ ms->shadow.Add = LoaderSymbolFromModule(mod, "shadowAdd"); |
||||||
|
+ ms->shadow.Remove = LoaderSymbolFromModule(mod, "shadowRemove"); |
||||||
|
+ ms->shadow.Update32to24 = LoaderSymbolFromModule(mod, "shadowUpdate32to24"); |
||||||
|
+ ms->shadow.UpdatePacked = LoaderSymbolFromModule(mod, "shadowUpdatePacked"); |
||||||
|
} |
||||||
|
|
||||||
|
return TRUE; |
||||||
|
@@ -1191,9 +1196,9 @@ msUpdatePacked(ScreenPtr pScreen, shadowBufPtr pBuf) |
||||||
|
} while (0); |
||||||
|
|
||||||
|
if (use_3224) |
||||||
|
- shadowUpdate32to24(pScreen, pBuf); |
||||||
|
+ ms->shadow.Update32to24(pScreen, pBuf); |
||||||
|
else |
||||||
|
- shadowUpdatePacked(pScreen, pBuf); |
||||||
|
+ ms->shadow.UpdatePacked(pScreen, pBuf); |
||||||
|
} |
||||||
|
|
||||||
|
static Bool |
||||||
|
@@ -1380,8 +1385,8 @@ CreateScreenResources(ScreenPtr pScreen) |
||||||
|
FatalError("Couldn't adjust screen pixmap\n"); |
||||||
|
|
||||||
|
if (ms->drmmode.shadow_enable) { |
||||||
|
- if (!shadowAdd(pScreen, rootPixmap, msUpdatePacked, msShadowWindow, |
||||||
|
- 0, 0)) |
||||||
|
+ if (!ms->shadow.Add(pScreen, rootPixmap, msUpdatePacked, msShadowWindow, |
||||||
|
+ 0, 0)) |
||||||
|
return FALSE; |
||||||
|
} |
||||||
|
|
||||||
|
@@ -1415,15 +1420,6 @@ CreateScreenResources(ScreenPtr pScreen) |
||||||
|
return ret; |
||||||
|
} |
||||||
|
|
||||||
|
-static Bool |
||||||
|
-msShadowInit(ScreenPtr pScreen) |
||||||
|
-{ |
||||||
|
- if (!shadowSetup(pScreen)) { |
||||||
|
- return FALSE; |
||||||
|
- } |
||||||
|
- return TRUE; |
||||||
|
-} |
||||||
|
- |
||||||
|
static Bool |
||||||
|
msSharePixmapBacking(PixmapPtr ppix, ScreenPtr screen, void **handle) |
||||||
|
{ |
||||||
|
@@ -1643,7 +1639,7 @@ ScreenInit(ScreenPtr pScreen, int argc, char **argv) |
||||||
|
return FALSE; |
||||||
|
} |
||||||
|
|
||||||
|
- if (ms->drmmode.shadow_enable && !msShadowInit(pScreen)) { |
||||||
|
+ if (ms->drmmode.shadow_enable && !ms->shadow.Setup(pScreen)) { |
||||||
|
xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "shadow fb init failed\n"); |
||||||
|
return FALSE; |
||||||
|
} |
||||||
|
@@ -1887,7 +1883,7 @@ CloseScreen(ScreenPtr pScreen) |
||||||
|
} |
||||||
|
|
||||||
|
if (ms->drmmode.shadow_enable) { |
||||||
|
- shadowRemove(pScreen, pScreen->GetScreenPixmap(pScreen)); |
||||||
|
+ ms->shadow.Remove(pScreen, pScreen->GetScreenPixmap(pScreen)); |
||||||
|
free(ms->drmmode.shadow_fb); |
||||||
|
ms->drmmode.shadow_fb = NULL; |
||||||
|
free(ms->drmmode.shadow_fb2); |
||||||
|
diff --git a/hw/xfree86/drivers/modesetting/driver.h b/hw/xfree86/drivers/modesetting/driver.h |
||||||
|
index a99f37871..394a20fc1 100644 |
||||||
|
--- a/hw/xfree86/drivers/modesetting/driver.h |
||||||
|
+++ b/hw/xfree86/drivers/modesetting/driver.h |
||||||
|
@@ -33,7 +33,7 @@ |
||||||
|
#include <xf86Crtc.h> |
||||||
|
#include <damage.h> |
||||||
|
#include <X11/extensions/dpmsconst.h> |
||||||
|
- |
||||||
|
+#include <shadow.h> |
||||||
|
#ifdef GLAMOR_HAS_GBM |
||||||
|
#define GLAMOR_FOR_XORG 1 |
||||||
|
#include "glamor.h" |
||||||
|
@@ -122,6 +122,16 @@ typedef struct _modesettingRec { |
||||||
|
|
||||||
|
Bool kms_has_modifiers; |
||||||
|
|
||||||
|
+ /* shadow API */ |
||||||
|
+ struct { |
||||||
|
+ Bool (*Setup)(ScreenPtr); |
||||||
|
+ Bool (*Add)(ScreenPtr, PixmapPtr, ShadowUpdateProc, ShadowWindowProc, |
||||||
|
+ int, void *); |
||||||
|
+ void (*Remove)(ScreenPtr, PixmapPtr); |
||||||
|
+ void (*Update32to24)(ScreenPtr, shadowBufPtr); |
||||||
|
+ void (*UpdatePacked)(ScreenPtr, shadowBufPtr); |
||||||
|
+ } shadow; |
||||||
|
+ |
||||||
|
} modesettingRec, *modesettingPtr; |
||||||
|
|
||||||
|
#define modesettingPTR(p) ((modesettingPtr)((p)->driverPrivate)) |
||||||
|
-- |
||||||
|
2.33.1 |
||||||
|
|
@ -0,0 +1,332 @@ |
|||||||
|
From 94612044171975466f605d5f01769d1c2b9acc5d Mon Sep 17 00:00:00 2001 |
||||||
|
From: Adam Jackson <ajax@redhat.com> |
||||||
|
Date: Tue, 8 Oct 2019 13:11:09 -0400 |
||||||
|
Subject: [PATCH xserver 07/11] modesetting: Indirect the glamor API through |
||||||
|
LoaderSymbol |
||||||
|
|
||||||
|
Prerequisite for building all of xserver with -z now. |
||||||
|
|
||||||
|
Gitlab: https://gitlab.freedesktop.org/xorg/xserver/issues/692 |
||||||
|
(cherry picked from commit dd63f717fe8636315343f421f4f2ee299258f079) |
||||||
|
--- |
||||||
|
hw/xfree86/drivers/modesetting/dri2.c | 10 ++-- |
||||||
|
hw/xfree86/drivers/modesetting/driver.c | 49 ++++++++++++++----- |
||||||
|
hw/xfree86/drivers/modesetting/driver.h | 24 +++++++++ |
||||||
|
.../drivers/modesetting/drmmode_display.c | 17 ++++--- |
||||||
|
hw/xfree86/drivers/modesetting/pageflip.c | 4 +- |
||||||
|
hw/xfree86/drivers/modesetting/present.c | 4 +- |
||||||
|
6 files changed, 82 insertions(+), 26 deletions(-) |
||||||
|
|
||||||
|
diff --git a/hw/xfree86/drivers/modesetting/dri2.c b/hw/xfree86/drivers/modesetting/dri2.c |
||||||
|
index d89904b53..724d9d34c 100644 |
||||||
|
--- a/hw/xfree86/drivers/modesetting/dri2.c |
||||||
|
+++ b/hw/xfree86/drivers/modesetting/dri2.c |
||||||
|
@@ -123,6 +123,7 @@ ms_dri2_create_buffer2(ScreenPtr screen, DrawablePtr drawable, |
||||||
|
unsigned int attachment, unsigned int format) |
||||||
|
{ |
||||||
|
ScrnInfoPtr scrn = xf86ScreenToScrn(screen); |
||||||
|
+ modesettingPtr ms = modesettingPTR(scrn); |
||||||
|
DRI2Buffer2Ptr buffer; |
||||||
|
PixmapPtr pixmap; |
||||||
|
CARD32 size; |
||||||
|
@@ -200,7 +201,7 @@ ms_dri2_create_buffer2(ScreenPtr screen, DrawablePtr drawable, |
||||||
|
*/ |
||||||
|
buffer->flags = 0; |
||||||
|
|
||||||
|
- buffer->name = glamor_name_from_pixmap(pixmap, &pitch, &size); |
||||||
|
+ buffer->name = ms->glamor.name_from_pixmap(pixmap, &pitch, &size); |
||||||
|
buffer->pitch = pitch; |
||||||
|
if (buffer->name == -1) { |
||||||
|
xf86DrvMsg(scrn->scrnIndex, X_ERROR, |
||||||
|
@@ -509,11 +510,12 @@ update_front(DrawablePtr draw, DRI2BufferPtr front) |
||||||
|
ScreenPtr screen = draw->pScreen; |
||||||
|
PixmapPtr pixmap = get_drawable_pixmap(draw); |
||||||
|
ms_dri2_buffer_private_ptr priv = front->driverPrivate; |
||||||
|
+ modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(screen)); |
||||||
|
CARD32 size; |
||||||
|
CARD16 pitch; |
||||||
|
int name; |
||||||
|
|
||||||
|
- name = glamor_name_from_pixmap(pixmap, &pitch, &size); |
||||||
|
+ name = ms->glamor.name_from_pixmap(pixmap, &pitch, &size); |
||||||
|
if (name < 0) |
||||||
|
return FALSE; |
||||||
|
|
||||||
|
@@ -617,7 +619,7 @@ ms_dri2_exchange_buffers(DrawablePtr draw, DRI2BufferPtr front, |
||||||
|
*front_pix = *back_pix; |
||||||
|
*back_pix = tmp_pix; |
||||||
|
|
||||||
|
- glamor_egl_exchange_buffers(front_priv->pixmap, back_priv->pixmap); |
||||||
|
+ ms->glamor.egl_exchange_buffers(front_priv->pixmap, back_priv->pixmap); |
||||||
|
|
||||||
|
/* Post damage on the front buffer so that listeners, such |
||||||
|
* as DisplayLink know take a copy and shove it over the USB. |
||||||
|
@@ -1036,7 +1038,7 @@ ms_dri2_screen_init(ScreenPtr screen) |
||||||
|
DRI2InfoRec info; |
||||||
|
const char *driver_names[2] = { NULL, NULL }; |
||||||
|
|
||||||
|
- if (!glamor_supports_pixmap_import_export(screen)) { |
||||||
|
+ if (!ms->glamor.supports_pixmap_import_export(screen)) { |
||||||
|
xf86DrvMsg(scrn->scrnIndex, X_WARNING, |
||||||
|
"DRI2: glamor lacks support for pixmap import/export\n"); |
||||||
|
} |
||||||
|
diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c |
||||||
|
index a385e7ee2..4f4db67b7 100644 |
||||||
|
--- a/hw/xfree86/drivers/modesetting/driver.c |
||||||
|
+++ b/hw/xfree86/drivers/modesetting/driver.c |
||||||
|
@@ -615,7 +615,7 @@ redisplay_dirty(ScreenPtr screen, PixmapDirtyUpdatePtr dirty, int *timeout) |
||||||
|
* the shared pixmap, but not all). |
||||||
|
*/ |
||||||
|
if (ms->drmmode.glamor) |
||||||
|
- glamor_finish(screen); |
||||||
|
+ ms->glamor.finish(screen); |
||||||
|
#endif |
||||||
|
/* Ensure the slave processes the damage immediately */ |
||||||
|
if (timeout) |
||||||
|
@@ -743,6 +743,26 @@ FreeRec(ScrnInfoPtr pScrn) |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
+static void |
||||||
|
+bind_glamor_api(void *mod, modesettingPtr ms) |
||||||
|
+{ |
||||||
|
+ ms->glamor.back_pixmap_from_fd = LoaderSymbolFromModule(mod, "glamor_back_pixmap_from_fd"); |
||||||
|
+ ms->glamor.block_handler = LoaderSymbolFromModule(mod, "glamor_block_handler"); |
||||||
|
+ ms->glamor.egl_create_textured_pixmap = LoaderSymbolFromModule(mod, "glamor_egl_create_textured_pixmap"); |
||||||
|
+ ms->glamor.egl_create_textured_pixmap_from_gbm_bo = LoaderSymbolFromModule(mod, "glamor_egl_create_textured_pixmap_from_gbm_bo"); |
||||||
|
+ ms->glamor.egl_exchange_buffers = LoaderSymbolFromModule(mod, "glamor_egl_exchange_buffers"); |
||||||
|
+ ms->glamor.egl_get_gbm_device = LoaderSymbolFromModule(mod, "glamor_egl_get_gbm_device"); |
||||||
|
+ ms->glamor.egl_init = LoaderSymbolFromModule(mod, "glamor_egl_init"); |
||||||
|
+ ms->glamor.finish = LoaderSymbolFromModule(mod, "glamor_finish"); |
||||||
|
+ ms->glamor.gbm_bo_from_pixmap = LoaderSymbolFromModule(mod, "glamor_gbm_bo_from_pixmap"); |
||||||
|
+ ms->glamor.init = LoaderSymbolFromModule(mod, "glamor_init"); |
||||||
|
+ ms->glamor.name_from_pixmap = LoaderSymbolFromModule(mod, "glamor_name_from_pixmap"); |
||||||
|
+ ms->glamor.set_drawable_modifiers_func = LoaderSymbolFromModule(mod, "glamor_set_drawable_modifiers_func"); |
||||||
|
+ ms->glamor.shareable_fd_from_pixmap = LoaderSymbolFromModule(mod, "glamor_shareable_fd_from_pixmap"); |
||||||
|
+ ms->glamor.supports_pixmap_import_export = LoaderSymbolFromModule(mod, "glamor_supports_pixmap_import_export"); |
||||||
|
+ ms->glamor.xv_init = LoaderSymbolFromModule(mod, "glamor_xv_init"); |
||||||
|
+} |
||||||
|
+ |
||||||
|
static void |
||||||
|
try_enable_glamor(ScrnInfoPtr pScrn) |
||||||
|
{ |
||||||
|
@@ -751,6 +771,7 @@ try_enable_glamor(ScrnInfoPtr pScrn) |
||||||
|
OPTION_ACCEL_METHOD); |
||||||
|
Bool do_glamor = (!accel_method_str || |
||||||
|
strcmp(accel_method_str, "glamor") == 0); |
||||||
|
+ void *mod; |
||||||
|
|
||||||
|
ms->drmmode.glamor = FALSE; |
||||||
|
|
||||||
|
@@ -765,8 +786,10 @@ try_enable_glamor(ScrnInfoPtr pScrn) |
||||||
|
return; |
||||||
|
} |
||||||
|
|
||||||
|
- if (xf86LoadSubModule(pScrn, GLAMOR_EGL_MODULE_NAME)) { |
||||||
|
- if (glamor_egl_init(pScrn, ms->fd)) { |
||||||
|
+ mod = xf86LoadSubModule(pScrn, GLAMOR_EGL_MODULE_NAME); |
||||||
|
+ if (mod) { |
||||||
|
+ bind_glamor_api(mod, ms); |
||||||
|
+ if (ms->glamor.egl_init(pScrn, ms->fd)) { |
||||||
|
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "glamor initialized\n"); |
||||||
|
ms->drmmode.glamor = TRUE; |
||||||
|
} else { |
||||||
|
@@ -1424,11 +1447,12 @@ static Bool |
||||||
|
msSharePixmapBacking(PixmapPtr ppix, ScreenPtr screen, void **handle) |
||||||
|
{ |
||||||
|
#ifdef GLAMOR_HAS_GBM |
||||||
|
+ modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(screen)); |
||||||
|
int ret; |
||||||
|
CARD16 stride; |
||||||
|
CARD32 size; |
||||||
|
- ret = glamor_shareable_fd_from_pixmap(ppix->drawable.pScreen, ppix, |
||||||
|
- &stride, &size); |
||||||
|
+ ret = ms->glamor.shareable_fd_from_pixmap(ppix->drawable.pScreen, ppix, |
||||||
|
+ &stride, &size); |
||||||
|
if (ret == -1) |
||||||
|
return FALSE; |
||||||
|
|
||||||
|
@@ -1453,11 +1477,12 @@ msSetSharedPixmapBacking(PixmapPtr ppix, void *fd_handle) |
||||||
|
return drmmode_SetSlaveBO(ppix, &ms->drmmode, ihandle, 0, 0); |
||||||
|
|
||||||
|
if (ms->drmmode.reverse_prime_offload_mode) { |
||||||
|
- ret = glamor_back_pixmap_from_fd(ppix, ihandle, |
||||||
|
- ppix->drawable.width, |
||||||
|
- ppix->drawable.height, |
||||||
|
- ppix->devKind, ppix->drawable.depth, |
||||||
|
- ppix->drawable.bitsPerPixel); |
||||||
|
+ ret = ms->glamor.back_pixmap_from_fd(ppix, ihandle, |
||||||
|
+ ppix->drawable.width, |
||||||
|
+ ppix->drawable.height, |
||||||
|
+ ppix->devKind, |
||||||
|
+ ppix->drawable.depth, |
||||||
|
+ ppix->drawable.bitsPerPixel); |
||||||
|
} else { |
||||||
|
int size = ppix->devKind * ppix->drawable.height; |
||||||
|
ret = drmmode_SetSlaveBO(ppix, &ms->drmmode, ihandle, ppix->devKind, size); |
||||||
|
@@ -1574,7 +1599,7 @@ ScreenInit(ScreenPtr pScreen, int argc, char **argv) |
||||||
|
|
||||||
|
#ifdef GLAMOR_HAS_GBM |
||||||
|
if (ms->drmmode.glamor) |
||||||
|
- ms->drmmode.gbm = glamor_egl_get_gbm_device(pScreen); |
||||||
|
+ ms->drmmode.gbm = ms->glamor.egl_get_gbm_device(pScreen); |
||||||
|
#endif |
||||||
|
|
||||||
|
/* HW dependent - FIXME */ |
||||||
|
@@ -1718,7 +1743,7 @@ ScreenInit(ScreenPtr pScreen, int argc, char **argv) |
||||||
|
if (ms->drmmode.glamor) { |
||||||
|
XF86VideoAdaptorPtr glamor_adaptor; |
||||||
|
|
||||||
|
- glamor_adaptor = glamor_xv_init(pScreen, 16); |
||||||
|
+ glamor_adaptor = ms->glamor.xv_init(pScreen, 16); |
||||||
|
if (glamor_adaptor != NULL) |
||||||
|
xf86XVScreenInit(pScreen, &glamor_adaptor, 1); |
||||||
|
else |
||||||
|
diff --git a/hw/xfree86/drivers/modesetting/driver.h b/hw/xfree86/drivers/modesetting/driver.h |
||||||
|
index 394a20fc1..5e4d2509a 100644 |
||||||
|
--- a/hw/xfree86/drivers/modesetting/driver.h |
||||||
|
+++ b/hw/xfree86/drivers/modesetting/driver.h |
||||||
|
@@ -132,6 +132,30 @@ typedef struct _modesettingRec { |
||||||
|
void (*UpdatePacked)(ScreenPtr, shadowBufPtr); |
||||||
|
} shadow; |
||||||
|
|
||||||
|
+ /* glamor API */ |
||||||
|
+ struct { |
||||||
|
+ Bool (*back_pixmap_from_fd)(PixmapPtr, int, CARD16, CARD16, CARD16, |
||||||
|
+ CARD8, CARD8); |
||||||
|
+ void (*block_handler)(ScreenPtr); |
||||||
|
+ Bool (*egl_create_textured_pixmap)(PixmapPtr, int, int); |
||||||
|
+ Bool (*egl_create_textured_pixmap_from_gbm_bo)(PixmapPtr, |
||||||
|
+ struct gbm_bo *, |
||||||
|
+ Bool); |
||||||
|
+ void (*egl_exchange_buffers)(PixmapPtr, PixmapPtr); |
||||||
|
+ struct gbm_device *(*egl_get_gbm_device)(ScreenPtr); |
||||||
|
+ Bool (*egl_init)(ScrnInfoPtr, int); |
||||||
|
+ void (*finish)(ScreenPtr); |
||||||
|
+ struct gbm_bo *(*gbm_bo_from_pixmap)(ScreenPtr, PixmapPtr); |
||||||
|
+ Bool (*init)(ScreenPtr, unsigned int); |
||||||
|
+ int (*name_from_pixmap)(PixmapPtr, CARD16 *, CARD32 *); |
||||||
|
+ void (*set_drawable_modifiers_func)(ScreenPtr, |
||||||
|
+ GetDrawableModifiersFuncPtr); |
||||||
|
+ int (*shareable_fd_from_pixmap)(ScreenPtr, PixmapPtr, CARD16 *, |
||||||
|
+ CARD32 *); |
||||||
|
+ Bool (*supports_pixmap_import_export)(ScreenPtr); |
||||||
|
+ XF86VideoAdaptorPtr (*xv_init)(ScreenPtr, int); |
||||||
|
+ } glamor; |
||||||
|
+ |
||||||
|
} modesettingRec, *modesettingPtr; |
||||||
|
|
||||||
|
#define modesettingPTR(p) ((modesettingPtr)((p)->driverPrivate)) |
||||||
|
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c |
||||||
|
index 6f5f8caf6..28609db7c 100644 |
||||||
|
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c |
||||||
|
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c |
||||||
|
@@ -770,7 +770,7 @@ drmmode_crtc_set_mode(xf86CrtcPtr crtc, Bool test_only) |
||||||
|
#ifdef GLAMOR_HAS_GBM |
||||||
|
/* Make sure any pending drawing will be visible in a new scanout buffer */ |
||||||
|
if (drmmode->glamor) |
||||||
|
- glamor_finish(screen); |
||||||
|
+ ms->glamor.finish(screen); |
||||||
|
#endif |
||||||
|
|
||||||
|
if (ms->atomic_modeset) { |
||||||
|
@@ -1385,6 +1385,7 @@ create_pixmap_for_fbcon(drmmode_ptr drmmode, ScrnInfoPtr pScrn, int fbcon_id) |
||||||
|
PixmapPtr pixmap = drmmode->fbcon_pixmap; |
||||||
|
drmModeFBPtr fbcon; |
||||||
|
ScreenPtr pScreen = xf86ScrnToScreen(pScrn); |
||||||
|
+ modesettingPtr ms = modesettingPTR(pScrn); |
||||||
|
Bool ret; |
||||||
|
|
||||||
|
if (pixmap) |
||||||
|
@@ -1405,7 +1406,8 @@ create_pixmap_for_fbcon(drmmode_ptr drmmode, ScrnInfoPtr pScrn, int fbcon_id) |
||||||
|
if (!pixmap) |
||||||
|
goto out_free_fb; |
||||||
|
|
||||||
|
- ret = glamor_egl_create_textured_pixmap(pixmap, fbcon->handle, fbcon->pitch); |
||||||
|
+ ret = ms->glamor.egl_create_textured_pixmap(pixmap, fbcon->handle, |
||||||
|
+ fbcon->pitch); |
||||||
|
if (!ret) { |
||||||
|
FreePixmap(pixmap); |
||||||
|
pixmap = NULL; |
||||||
|
@@ -1424,6 +1426,7 @@ drmmode_copy_fb(ScrnInfoPtr pScrn, drmmode_ptr drmmode) |
||||||
|
#ifdef GLAMOR_HAS_GBM |
||||||
|
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); |
||||||
|
ScreenPtr pScreen = xf86ScrnToScreen(pScrn); |
||||||
|
+ modesettingPtr ms = modesettingPTR(pScrn); |
||||||
|
PixmapPtr src, dst; |
||||||
|
int fbcon_id = 0; |
||||||
|
GCPtr gc; |
||||||
|
@@ -3108,12 +3111,13 @@ drmmode_set_pixmap_bo(drmmode_ptr drmmode, PixmapPtr pixmap, drmmode_bo *bo) |
||||||
|
{ |
||||||
|
#ifdef GLAMOR_HAS_GBM |
||||||
|
ScrnInfoPtr scrn = drmmode->scrn; |
||||||
|
+ modesettingPtr ms = modesettingPTR(scrn); |
||||||
|
|
||||||
|
if (!drmmode->glamor) |
||||||
|
return TRUE; |
||||||
|
|
||||||
|
- if (!glamor_egl_create_textured_pixmap_from_gbm_bo(pixmap, bo->gbm, |
||||||
|
- bo->used_modifiers)) { |
||||||
|
+ if (!ms->glamor.egl_create_textured_pixmap_from_gbm_bo(pixmap, bo->gbm, |
||||||
|
+ bo->used_modifiers)) { |
||||||
|
xf86DrvMsg(scrn->scrnIndex, X_ERROR, "Failed to create pixmap\n"); |
||||||
|
return FALSE; |
||||||
|
} |
||||||
|
@@ -3436,13 +3440,14 @@ drmmode_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode) |
||||||
|
{ |
||||||
|
#ifdef GLAMOR_HAS_GBM |
||||||
|
ScreenPtr pScreen = xf86ScrnToScreen(pScrn); |
||||||
|
+ modesettingPtr ms = modesettingPTR(pScrn); |
||||||
|
|
||||||
|
if (drmmode->glamor) { |
||||||
|
- if (!glamor_init(pScreen, GLAMOR_USE_EGL_SCREEN)) { |
||||||
|
+ if (!ms->glamor.init(pScreen, GLAMOR_USE_EGL_SCREEN)) { |
||||||
|
return FALSE; |
||||||
|
} |
||||||
|
#ifdef GBM_BO_WITH_MODIFIERS |
||||||
|
- glamor_set_drawable_modifiers_func(pScreen, get_drawable_modifiers); |
||||||
|
+ ms->glamor.set_drawable_modifiers_func(pScreen, get_drawable_modifiers); |
||||||
|
#endif |
||||||
|
} |
||||||
|
#endif |
||||||
|
diff --git a/hw/xfree86/drivers/modesetting/pageflip.c b/hw/xfree86/drivers/modesetting/pageflip.c |
||||||
|
index 1d54816e2..841fa917c 100644 |
||||||
|
--- a/hw/xfree86/drivers/modesetting/pageflip.c |
||||||
|
+++ b/hw/xfree86/drivers/modesetting/pageflip.c |
||||||
|
@@ -243,9 +243,9 @@ ms_do_pageflip(ScreenPtr screen, |
||||||
|
uint32_t flags; |
||||||
|
int i; |
||||||
|
struct ms_flipdata *flipdata; |
||||||
|
- glamor_block_handler(screen); |
||||||
|
+ ms->glamor.block_handler(screen); |
||||||
|
|
||||||
|
- new_front_bo.gbm = glamor_gbm_bo_from_pixmap(screen, new_front); |
||||||
|
+ new_front_bo.gbm = ms->glamor.gbm_bo_from_pixmap(screen, new_front); |
||||||
|
new_front_bo.dumb = NULL; |
||||||
|
|
||||||
|
if (!new_front_bo.gbm) { |
||||||
|
diff --git a/hw/xfree86/drivers/modesetting/present.c b/hw/xfree86/drivers/modesetting/present.c |
||||||
|
index 186309a29..c700cf116 100644 |
||||||
|
--- a/hw/xfree86/drivers/modesetting/present.c |
||||||
|
+++ b/hw/xfree86/drivers/modesetting/present.c |
||||||
|
@@ -166,7 +166,7 @@ ms_present_flush(WindowPtr window) |
||||||
|
modesettingPtr ms = modesettingPTR(scrn); |
||||||
|
|
||||||
|
if (ms->drmmode.glamor) |
||||||
|
- glamor_block_handler(screen); |
||||||
|
+ ms->glamor.block_handler(screen); |
||||||
|
#endif |
||||||
|
} |
||||||
|
|
||||||
|
@@ -262,7 +262,7 @@ ms_present_check_unflip(RRCrtcPtr crtc, |
||||||
|
|
||||||
|
#ifdef GBM_BO_WITH_MODIFIERS |
||||||
|
/* Check if buffer format/modifier is supported by all active CRTCs */ |
||||||
|
- gbm = glamor_gbm_bo_from_pixmap(screen, pixmap); |
||||||
|
+ gbm = ms->glamor.gbm_bo_from_pixmap(screen, pixmap); |
||||||
|
if (gbm) { |
||||||
|
uint32_t format; |
||||||
|
uint64_t modifier; |
||||||
|
-- |
||||||
|
2.33.1 |
||||||
|
|
@ -0,0 +1,58 @@ |
|||||||
|
From 7f1bedcf27cfd09162544ff1b18c21c8e5695a9d Mon Sep 17 00:00:00 2001 |
||||||
|
From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <mdaenzer@redhat.com> |
||||||
|
Date: Fri, 22 Nov 2019 18:05:04 +0100 |
||||||
|
Subject: [PATCH xserver 08/11] modesetting: Add glamor_finish() convenience |
||||||
|
macro |
||||||
|
|
||||||
|
This will simplify backporting the following fix to the 1.20 branch. |
||||||
|
|
||||||
|
Reviewed-by: Adam Jackson <ajax@redhat.com> |
||||||
|
(cherry picked from commit 06ef320e9bc1f1098df9cd5581f072528f28128e) |
||||||
|
--- |
||||||
|
hw/xfree86/drivers/modesetting/driver.c | 2 +- |
||||||
|
hw/xfree86/drivers/modesetting/driver.h | 2 ++ |
||||||
|
hw/xfree86/drivers/modesetting/drmmode_display.c | 2 +- |
||||||
|
3 files changed, 4 insertions(+), 2 deletions(-) |
||||||
|
|
||||||
|
diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c |
||||||
|
index 4f4db67b7..afba8538a 100644 |
||||||
|
--- a/hw/xfree86/drivers/modesetting/driver.c |
||||||
|
+++ b/hw/xfree86/drivers/modesetting/driver.c |
||||||
|
@@ -615,7 +615,7 @@ redisplay_dirty(ScreenPtr screen, PixmapDirtyUpdatePtr dirty, int *timeout) |
||||||
|
* the shared pixmap, but not all). |
||||||
|
*/ |
||||||
|
if (ms->drmmode.glamor) |
||||||
|
- ms->glamor.finish(screen); |
||||||
|
+ glamor_finish(screen); |
||||||
|
#endif |
||||||
|
/* Ensure the slave processes the damage immediately */ |
||||||
|
if (timeout) |
||||||
|
diff --git a/hw/xfree86/drivers/modesetting/driver.h b/hw/xfree86/drivers/modesetting/driver.h |
||||||
|
index 5e4d2509a..c6e7cd0c8 100644 |
||||||
|
--- a/hw/xfree86/drivers/modesetting/driver.h |
||||||
|
+++ b/hw/xfree86/drivers/modesetting/driver.h |
||||||
|
@@ -158,6 +158,8 @@ typedef struct _modesettingRec { |
||||||
|
|
||||||
|
} modesettingRec, *modesettingPtr; |
||||||
|
|
||||||
|
+#define glamor_finish(screen) ms->glamor.finish(screen) |
||||||
|
+ |
||||||
|
#define modesettingPTR(p) ((modesettingPtr)((p)->driverPrivate)) |
||||||
|
modesettingEntPtr ms_ent_priv(ScrnInfoPtr scrn); |
||||||
|
|
||||||
|
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c |
||||||
|
index 28609db7c..6516fac5f 100644 |
||||||
|
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c |
||||||
|
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c |
||||||
|
@@ -770,7 +770,7 @@ drmmode_crtc_set_mode(xf86CrtcPtr crtc, Bool test_only) |
||||||
|
#ifdef GLAMOR_HAS_GBM |
||||||
|
/* Make sure any pending drawing will be visible in a new scanout buffer */ |
||||||
|
if (drmmode->glamor) |
||||||
|
- ms->glamor.finish(screen); |
||||||
|
+ glamor_finish(screen); |
||||||
|
#endif |
||||||
|
|
||||||
|
if (ms->atomic_modeset) { |
||||||
|
-- |
||||||
|
2.33.1 |
||||||
|
|
@ -0,0 +1,63 @@ |
|||||||
|
From ae40c508fbd88869157412a1b159c0d71eb1e708 Mon Sep 17 00:00:00 2001 |
||||||
|
From: Kenneth Graunke <kenneth@whitecape.org> |
||||||
|
Date: Thu, 21 Nov 2019 23:03:50 -0800 |
||||||
|
Subject: [PATCH xserver 09/11] modesetting: Use EGL_MESA_query_driver to |
||||||
|
select DRI driver if possible |
||||||
|
|
||||||
|
New now ask Glamor to use EGL_MESA_query_driver to obtain the DRI driver |
||||||
|
name; if successful, we use that as the DRI driver name. Following the |
||||||
|
existing dri2.c logic, we also use the same name for the VDPAU driver, |
||||||
|
except for i965 (and now iris), where we switch to the "va_gl" fallback. |
||||||
|
|
||||||
|
This allows us to bypass the PCI ID lists in xserver and centralize the |
||||||
|
driver selection mechanism inside Mesa. The hope is that we no longer |
||||||
|
have to update these lists for any future hardware. |
||||||
|
|
||||||
|
(cherry picked from commit 8d4be7f6c4f7c673d7ec1a6bfdef944907a3916e) |
||||||
|
--- |
||||||
|
hw/xfree86/drivers/modesetting/dri2.c | 3 ++- |
||||||
|
hw/xfree86/drivers/modesetting/driver.c | 1 + |
||||||
|
hw/xfree86/drivers/modesetting/driver.h | 1 + |
||||||
|
3 files changed, 4 insertions(+), 1 deletion(-) |
||||||
|
|
||||||
|
diff --git a/hw/xfree86/drivers/modesetting/dri2.c b/hw/xfree86/drivers/modesetting/dri2.c |
||||||
|
index 724d9d34c..255c72cac 100644 |
||||||
|
--- a/hw/xfree86/drivers/modesetting/dri2.c |
||||||
|
+++ b/hw/xfree86/drivers/modesetting/dri2.c |
||||||
|
@@ -1076,7 +1076,8 @@ ms_dri2_screen_init(ScreenPtr screen) |
||||||
|
info.CopyRegion2 = ms_dri2_copy_region2; |
||||||
|
|
||||||
|
/* Ask Glamor to obtain the DRI driver name via EGL_MESA_query_driver. */ |
||||||
|
- driver_names[0] = glamor_egl_get_driver_name(screen); |
||||||
|
+ if (ms->glamor.egl_get_driver_name) |
||||||
|
+ driver_names[0] = ms->glamor.egl_get_driver_name(screen); |
||||||
|
|
||||||
|
if (driver_names[0]) { |
||||||
|
/* There is no VDPAU driver for Intel, fallback to the generic |
||||||
|
diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c |
||||||
|
index afba8538a..08cf6a1b4 100644 |
||||||
|
--- a/hw/xfree86/drivers/modesetting/driver.c |
||||||
|
+++ b/hw/xfree86/drivers/modesetting/driver.c |
||||||
|
@@ -761,6 +761,7 @@ bind_glamor_api(void *mod, modesettingPtr ms) |
||||||
|
ms->glamor.shareable_fd_from_pixmap = LoaderSymbolFromModule(mod, "glamor_shareable_fd_from_pixmap"); |
||||||
|
ms->glamor.supports_pixmap_import_export = LoaderSymbolFromModule(mod, "glamor_supports_pixmap_import_export"); |
||||||
|
ms->glamor.xv_init = LoaderSymbolFromModule(mod, "glamor_xv_init"); |
||||||
|
+ ms->glamor.egl_get_driver_name = LoaderSymbolFromModule(mod, "glamor_egl_get_driver_name"); |
||||||
|
} |
||||||
|
|
||||||
|
static void |
||||||
|
diff --git a/hw/xfree86/drivers/modesetting/driver.h b/hw/xfree86/drivers/modesetting/driver.h |
||||||
|
index c6e7cd0c8..328a97de1 100644 |
||||||
|
--- a/hw/xfree86/drivers/modesetting/driver.h |
||||||
|
+++ b/hw/xfree86/drivers/modesetting/driver.h |
||||||
|
@@ -154,6 +154,7 @@ typedef struct _modesettingRec { |
||||||
|
CARD32 *); |
||||||
|
Bool (*supports_pixmap_import_export)(ScreenPtr); |
||||||
|
XF86VideoAdaptorPtr (*xv_init)(ScreenPtr, int); |
||||||
|
+ const char *(*egl_get_driver_name)(ScreenPtr); |
||||||
|
} glamor; |
||||||
|
|
||||||
|
} modesettingRec, *modesettingPtr; |
||||||
|
-- |
||||||
|
2.33.1 |
||||||
|
|
@ -0,0 +1,94 @@ |
|||||||
|
From d8271417a5986240f1f81cbe269e0cd07a9104d1 Mon Sep 17 00:00:00 2001 |
||||||
|
From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <mdaenzer@redhat.com> |
||||||
|
Date: Mon, 10 Feb 2020 18:41:44 +0100 |
||||||
|
Subject: [PATCH xserver 10/11] modesetting: Fix build with glamor disabled |
||||||
|
|
||||||
|
Fixes: cb1b1e184723 "modesetting: Indirect the glamor API through |
||||||
|
LoaderSymbol" |
||||||
|
Reviewed-by: Adam Jackson <ajax@redhat.com> |
||||||
|
(cherry picked from commit 0cb9fa7949d6c5398de220fbdbe1e262e943fcbb) |
||||||
|
--- |
||||||
|
hw/xfree86/drivers/modesetting/driver.c | 21 +++++++++++++++------ |
||||||
|
hw/xfree86/drivers/modesetting/driver.h | 3 ++- |
||||||
|
2 files changed, 17 insertions(+), 7 deletions(-) |
||||||
|
|
||||||
|
diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c |
||||||
|
index 08cf6a1b4..ce8bac9f5 100644 |
||||||
|
--- a/hw/xfree86/drivers/modesetting/driver.c |
||||||
|
+++ b/hw/xfree86/drivers/modesetting/driver.c |
||||||
|
@@ -743,9 +743,17 @@ FreeRec(ScrnInfoPtr pScrn) |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
-static void |
||||||
|
-bind_glamor_api(void *mod, modesettingPtr ms) |
||||||
|
+#ifdef GLAMOR_HAS_GBM |
||||||
|
+ |
||||||
|
+static Bool |
||||||
|
+load_glamor(ScrnInfoPtr pScrn) |
||||||
|
{ |
||||||
|
+ void *mod = xf86LoadSubModule(pScrn, GLAMOR_EGL_MODULE_NAME); |
||||||
|
+ modesettingPtr ms = modesettingPTR(pScrn); |
||||||
|
+ |
||||||
|
+ if (!mod) |
||||||
|
+ return FALSE; |
||||||
|
+ |
||||||
|
ms->glamor.back_pixmap_from_fd = LoaderSymbolFromModule(mod, "glamor_back_pixmap_from_fd"); |
||||||
|
ms->glamor.block_handler = LoaderSymbolFromModule(mod, "glamor_block_handler"); |
||||||
|
ms->glamor.egl_create_textured_pixmap = LoaderSymbolFromModule(mod, "glamor_egl_create_textured_pixmap"); |
||||||
|
@@ -762,8 +770,12 @@ bind_glamor_api(void *mod, modesettingPtr ms) |
||||||
|
ms->glamor.supports_pixmap_import_export = LoaderSymbolFromModule(mod, "glamor_supports_pixmap_import_export"); |
||||||
|
ms->glamor.xv_init = LoaderSymbolFromModule(mod, "glamor_xv_init"); |
||||||
|
ms->glamor.egl_get_driver_name = LoaderSymbolFromModule(mod, "glamor_egl_get_driver_name"); |
||||||
|
+ |
||||||
|
+ return TRUE; |
||||||
|
} |
||||||
|
|
||||||
|
+#endif |
||||||
|
+ |
||||||
|
static void |
||||||
|
try_enable_glamor(ScrnInfoPtr pScrn) |
||||||
|
{ |
||||||
|
@@ -772,7 +784,6 @@ try_enable_glamor(ScrnInfoPtr pScrn) |
||||||
|
OPTION_ACCEL_METHOD); |
||||||
|
Bool do_glamor = (!accel_method_str || |
||||||
|
strcmp(accel_method_str, "glamor") == 0); |
||||||
|
- void *mod; |
||||||
|
|
||||||
|
ms->drmmode.glamor = FALSE; |
||||||
|
|
||||||
|
@@ -787,9 +798,7 @@ try_enable_glamor(ScrnInfoPtr pScrn) |
||||||
|
return; |
||||||
|
} |
||||||
|
|
||||||
|
- mod = xf86LoadSubModule(pScrn, GLAMOR_EGL_MODULE_NAME); |
||||||
|
- if (mod) { |
||||||
|
- bind_glamor_api(mod, ms); |
||||||
|
+ if (load_glamor(pScrn)) { |
||||||
|
if (ms->glamor.egl_init(pScrn, ms->fd)) { |
||||||
|
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "glamor initialized\n"); |
||||||
|
ms->drmmode.glamor = TRUE; |
||||||
|
diff --git a/hw/xfree86/drivers/modesetting/driver.h b/hw/xfree86/drivers/modesetting/driver.h |
||||||
|
index 328a97de1..261f1aac4 100644 |
||||||
|
--- a/hw/xfree86/drivers/modesetting/driver.h |
||||||
|
+++ b/hw/xfree86/drivers/modesetting/driver.h |
||||||
|
@@ -132,6 +132,7 @@ typedef struct _modesettingRec { |
||||||
|
void (*UpdatePacked)(ScreenPtr, shadowBufPtr); |
||||||
|
} shadow; |
||||||
|
|
||||||
|
+#ifdef GLAMOR_HAS_GBM |
||||||
|
/* glamor API */ |
||||||
|
struct { |
||||||
|
Bool (*back_pixmap_from_fd)(PixmapPtr, int, CARD16, CARD16, CARD16, |
||||||
|
@@ -156,7 +157,7 @@ typedef struct _modesettingRec { |
||||||
|
XF86VideoAdaptorPtr (*xv_init)(ScreenPtr, int); |
||||||
|
const char *(*egl_get_driver_name)(ScreenPtr); |
||||||
|
} glamor; |
||||||
|
- |
||||||
|
+#endif |
||||||
|
} modesettingRec, *modesettingPtr; |
||||||
|
|
||||||
|
#define glamor_finish(screen) ms->glamor.finish(screen) |
||||||
|
-- |
||||||
|
2.33.1 |
||||||
|
|
@ -0,0 +1,33 @@ |
|||||||
|
From 55fb707d037004e001623a0d066f748d8ba48d48 Mon Sep 17 00:00:00 2001 |
||||||
|
From: Olivier Fourdan <ofourdan@redhat.com> |
||||||
|
Date: Tue, 23 Nov 2021 12:19:48 +0100 |
||||||
|
Subject: [PATCH xserver 11/11] modesetting: set gbm as dependency for |
||||||
|
autotools |
||||||
|
|
||||||
|
Same as commit 9d628ee5f for automake. |
||||||
|
|
||||||
|
Modifiers support needs gbm as a dependency. Without setting the dependency |
||||||
|
included headers are not found reliably and the build might fail if the |
||||||
|
headers are not placed in the default system include paths. |
||||||
|
|
||||||
|
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> |
||||||
|
--- |
||||||
|
hw/xfree86/drivers/modesetting/Makefile.am | 2 +- |
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-) |
||||||
|
|
||||||
|
diff --git a/hw/xfree86/drivers/modesetting/Makefile.am b/hw/xfree86/drivers/modesetting/Makefile.am |
||||||
|
index 961c57408..ac5091be3 100644 |
||||||
|
--- a/hw/xfree86/drivers/modesetting/Makefile.am |
||||||
|
+++ b/hw/xfree86/drivers/modesetting/Makefile.am |
||||||
|
@@ -41,7 +41,7 @@ AM_CPPFLAGS = \ |
||||||
|
|
||||||
|
modesetting_drv_la_LTLIBRARIES = modesetting_drv.la |
||||||
|
modesetting_drv_la_LDFLAGS = -module -avoid-version |
||||||
|
-modesetting_drv_la_LIBADD = $(UDEV_LIBS) $(DRM_LIBS) |
||||||
|
+modesetting_drv_la_LIBADD = $(UDEV_LIBS) $(DRM_LIBS) $(GBM_LIBS) |
||||||
|
modesetting_drv_ladir = @moduledir@/drivers |
||||||
|
|
||||||
|
modesetting_drv_la_SOURCES = \ |
||||||
|
-- |
||||||
|
2.33.1 |
||||||
|
|
@ -0,0 +1,30 @@ |
|||||||
|
Description: Use intel ddx only on pre-gen4 hw, newer ones will fall back to modesetting |
||||||
|
Author: Timo Aaltonen <tjaalton@debian.org> |
||||||
|
|
||||||
|
--- a/hw/xfree86/common/xf86pciBus.c |
||||||
|
+++ b/hw/xfree86/common/xf86pciBus.c |
||||||
|
@@ -1173,7 +1173,23 @@ xf86VideoPtrToDriverList(struct pci_devi |
||||||
|
case 0x0bef: |
||||||
|
/* Use fbdev/vesa driver on Oaktrail, Medfield, CDV */ |
||||||
|
break; |
||||||
|
- default: |
||||||
|
+ /* Default to intel only on pre-gen4 chips */ |
||||||
|
+ case 0x3577: |
||||||
|
+ case 0x2562: |
||||||
|
+ case 0x3582: |
||||||
|
+ case 0x358e: |
||||||
|
+ case 0x2572: |
||||||
|
+ case 0x2582: |
||||||
|
+ case 0x258a: |
||||||
|
+ case 0x2592: |
||||||
|
+ case 0x2772: |
||||||
|
+ case 0x27a2: |
||||||
|
+ case 0x27ae: |
||||||
|
+ case 0x29b2: |
||||||
|
+ case 0x29c2: |
||||||
|
+ case 0x29d2: |
||||||
|
+ case 0xa001: |
||||||
|
+ case 0xa011: |
||||||
|
driverList[0] = "intel"; |
||||||
|
break; |
||||||
|
} |
@ -0,0 +1,38 @@ |
|||||||
|
# Collection of quirks and blacklist/whitelists for specific devices. |
||||||
|
|
||||||
|
|
||||||
|
# Accelerometer device, posts data through ABS_X/ABS_Y, making X unusable |
||||||
|
# http://bugs.freedesktop.org/show_bug.cgi?id=22442 |
||||||
|
Section "InputClass" |
||||||
|
Identifier "ThinkPad HDAPS accelerometer blacklist" |
||||||
|
MatchProduct "ThinkPad HDAPS accelerometer data" |
||||||
|
Option "Ignore" "on" |
||||||
|
EndSection |
||||||
|
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=523914 |
||||||
|
# Mouse does not move in PV Xen guest |
||||||
|
# Explicitly tell evdev to not ignore the absolute axes. |
||||||
|
Section "InputClass" |
||||||
|
Identifier "Xen Virtual Pointer axis blacklist" |
||||||
|
MatchProduct "Xen Virtual Pointer" |
||||||
|
Option "IgnoreAbsoluteAxes" "off" |
||||||
|
Option "IgnoreRelativeAxes" "off" |
||||||
|
EndSection |
||||||
|
|
||||||
|
# https://bugs.freedesktop.org/show_bug.cgi?id=55867 |
||||||
|
# Bug 55867 - Doesn't know how to tag XI_TRACKBALL |
||||||
|
Section "InputClass" |
||||||
|
Identifier "Tag trackballs as XI_TRACKBALL" |
||||||
|
MatchProduct "trackball" |
||||||
|
MatchDriver "evdev" |
||||||
|
Option "TypeName" "TRACKBALL" |
||||||
|
EndSection |
||||||
|
|
||||||
|
# https://bugs.freedesktop.org/show_bug.cgi?id=62831 |
||||||
|
# Bug 62831 - Mionix Naos 5000 mouse detected incorrectly |
||||||
|
Section "InputClass" |
||||||
|
Identifier "Tag Mionix Naos 5000 mouse XI_MOUSE" |
||||||
|
MatchProduct "La-VIEW Technology Naos 5000 Mouse" |
||||||
|
MatchDriver "evdev" |
||||||
|
Option "TypeName" "MOUSE" |
||||||
|
EndSection |
@ -0,0 +1,54 @@ |
|||||||
|
#!/bin/sh |
||||||
|
# |
||||||
|
# Trivial script to rebuild drivers for ABI changes in the server |
||||||
|
# Run me after a new xserver has hit the buildroot |
||||||
|
|
||||||
|
builddir="abi-rebuild" |
||||||
|
|
||||||
|
if [ -e "$builddir" ]; then |
||||||
|
echo "Path '$builddir' exists. Move out of the way first" |
||||||
|
exit 1 |
||||||
|
fi |
||||||
|
|
||||||
|
mkdir -p $builddir |
||||||
|
pushd $builddir |
||||||
|
|
||||||
|
if git config --get remote.origin.url | grep -q redhat.com ; then |
||||||
|
pkg=rhpkg |
||||||
|
else |
||||||
|
pkg=fedpkg |
||||||
|
fi |
||||||
|
|
||||||
|
# figure out the branch we're on |
||||||
|
branch=$(git branch | awk '/^\*/ { print $2 }' | grep -v '^master$') |
||||||
|
if [ $branch ]; then |
||||||
|
branch="-b $branch" |
||||||
|
fi |
||||||
|
|
||||||
|
$pkg co $branch xorg-x11-drivers |
||||||
|
pushd xorg-x11-drivers |
||||||
|
driverlist=$(grep ^Requires *.spec | awk '{ print $2 }') |
||||||
|
popd |
||||||
|
|
||||||
|
# Things not in -drivers for whatever reason... |
||||||
|
extradrivers="xorg-x11-drv-ivtv" |
||||||
|
|
||||||
|
rm -rf xorg-x11-drivers |
||||||
|
echo $driverlist $extradrivers | xargs -n1 $pkg co $branch |
||||||
|
|
||||||
|
for i in xorg-x11-drv-*/ ; do |
||||||
|
[ -e $i/dead.package ] && continue |
||||||
|
pushd $i |
||||||
|
rpmdev-bumpspec -c "- 1.15 ABI rebuild" *.spec |
||||||
|
$pkg commit -c -p && $pkg build --nowait |
||||||
|
#$pkg mockbuild |
||||||
|
#$pkg srpm |
||||||
|
#mockchain -r fedora-20-x86_64 -l $OLDPWD |
||||||
|
#mockchain -r rhel-7.0-candidate-x86_64 -l $OLDPWD |
||||||
|
|
||||||
|
popd |
||||||
|
done |
||||||
|
|
||||||
|
popd |
||||||
|
|
||||||
|
|
@ -0,0 +1,306 @@ |
|||||||
|
Makefile |
||||||
|
Makefile.in |
||||||
|
.deps |
||||||
|
.libs |
||||||
|
.msg |
||||||
|
*.lo |
||||||
|
*.la |
||||||
|
*.a |
||||||
|
*.o |
||||||
|
*~ |
||||||
|
.*sw? |
||||||
|
*.pbxuser |
||||||
|
*.mode1v3 |
||||||
|
obj* |
||||||
|
build* |
||||||
|
local |
||||||
|
aclocal.m4 |
||||||
|
autom4te.cache |
||||||
|
compile |
||||||
|
config.guess |
||||||
|
config.log |
||||||
|
config.status |
||||||
|
config.sub |
||||||
|
configure |
||||||
|
configure.lineno |
||||||
|
depcomp |
||||||
|
install-sh |
||||||
|
libtool |
||||||
|
ltmain.sh |
||||||
|
missing |
||||||
|
TAGS |
||||||
|
tags |
||||||
|
ylwrap |
||||||
|
xorg-server.pc |
||||||
|
stamp-h? |
||||||
|
do-not-use-config.h |
||||||
|
do-not-use-config.h.in |
||||||
|
afb/afbbltC.c |
||||||
|
afb/afbbltCI.c |
||||||
|
afb/afbbltG.c |
||||||
|
afb/afbbltO.c |
||||||
|
afb/afbbltX.c |
||||||
|
afb/afbseg.c |
||||||
|
afb/afbtileC.c |
||||||
|
afb/afbtileG.c |
||||||
|
cfb/cfb8lineCO.c |
||||||
|
cfb/cfb8lineCP.c |
||||||
|
cfb/cfb8lineG.c |
||||||
|
cfb/cfb8lineX.c |
||||||
|
cfb/cfb8segC.c |
||||||
|
cfb/cfb8segCS.c |
||||||
|
cfb/cfb8segX.c |
||||||
|
cfb/cfb8setG.c |
||||||
|
cfb/cfbbltC.c |
||||||
|
cfb/cfbbltG.c |
||||||
|
cfb/cfbbltO.c |
||||||
|
cfb/cfbbltX.c |
||||||
|
cfb/cfbfillarcC.c |
||||||
|
cfb/cfbfillarcG.c |
||||||
|
cfb/cfbglrop8.c |
||||||
|
cfb/cfbply1rctC.c |
||||||
|
cfb/cfbply1rctG.c |
||||||
|
cfb/cfbseg.c |
||||||
|
cfb/cfbsolidC.c |
||||||
|
cfb/cfbsolidG.c |
||||||
|
cfb/cfbsolidX.c |
||||||
|
cfb/cfbtile32C.c |
||||||
|
cfb/cfbtile32G.c |
||||||
|
cfb/cfbtileoddC.c |
||||||
|
cfb/cfbtileoddG.c |
||||||
|
cfb/cfbzerarcC.c |
||||||
|
cfb/cfbzerarcG.c |
||||||
|
cfb/cfbzerarcX.c |
||||||
|
cfb32/cfb8lineCO.c |
||||||
|
cfb32/cfb8lineCP.c |
||||||
|
cfb32/cfb8lineG.c |
||||||
|
cfb32/cfb8lineX.c |
||||||
|
cfb32/cfb8segC.c |
||||||
|
cfb32/cfb8segCS.c |
||||||
|
cfb32/cfb8segX.c |
||||||
|
cfb32/cfb8setG.c |
||||||
|
cfb32/cfbbltC.c |
||||||
|
cfb32/cfbbltG.c |
||||||
|
cfb32/cfbbltO.c |
||||||
|
cfb32/cfbbltX.c |
||||||
|
cfb32/cfbfillarcC.c |
||||||
|
cfb32/cfbfillarcG.c |
||||||
|
cfb32/cfbply1rctC.c |
||||||
|
cfb32/cfbply1rctG.c |
||||||
|
cfb32/cfbseg.c |
||||||
|
cfb32/cfbsolidC.c |
||||||
|
cfb32/cfbsolidG.c |
||||||
|
cfb32/cfbsolidX.c |
||||||
|
cfb32/cfbtile32C.c |
||||||
|
cfb32/cfbtile32G.c |
||||||
|
cfb32/cfbtileoddC.c |
||||||
|
cfb32/cfbtileoddG.c |
||||||
|
cfb32/cfbzerarcC.c |
||||||
|
cfb32/cfbzerarcG.c |
||||||
|
cfb32/cfbzerarcX.c |
||||||
|
doc/Xserver.1x |
||||||
|
doc/Xserver.man |
||||||
|
hw/dmx/Xdmx |
||||||
|
hw/dmx/Xdmx.1x |
||||||
|
hw/dmx/config/dmxtodmx |
||||||
|
hw/dmx/config/dmxtodmx.1x |
||||||
|
hw/dmx/config/parser.c |
||||||
|
hw/dmx/config/parser.h |
||||||
|
hw/dmx/config/scanner.c |
||||||
|
hw/dmx/config/vdltodmx |
||||||
|
hw/dmx/config/vdltodmx.1x |
||||||
|
hw/dmx/config/xdmxconfig |
||||||
|
hw/dmx/config/xdmxconfig.1x |
||||||
|
hw/dmx/examples/dmxaddinput |
||||||
|
hw/dmx/examples/dmxaddscreen |
||||||
|
hw/dmx/examples/dmxreconfig |
||||||
|
hw/dmx/examples/dmxresize |
||||||
|
hw/dmx/examples/dmxrminput |
||||||
|
hw/dmx/examples/dmxrmscreen |
||||||
|
hw/dmx/examples/dmxwininfo |
||||||
|
hw/dmx/examples/ev |
||||||
|
hw/dmx/examples/evi |
||||||
|
hw/dmx/examples/res |
||||||
|
hw/dmx/examples/xbell |
||||||
|
hw/dmx/examples/xdmx |
||||||
|
hw/dmx/examples/xinput |
||||||
|
hw/dmx/examples/xled |
||||||
|
hw/dmx/examples/xtest |
||||||
|
hw/kdrive/ati/Xati |
||||||
|
hw/kdrive/chips/Xchips |
||||||
|
hw/kdrive/ephyr/Xephyr |
||||||
|
hw/kdrive/epson/Xepson |
||||||
|
hw/kdrive/fake/Xfake |
||||||
|
hw/kdrive/fbdev/Xfbdev |
||||||
|
hw/kdrive/i810/Xi810 |
||||||
|
hw/kdrive/mach64/Xmach64 |
||||||
|
hw/kdrive/mga/Xmga |
||||||
|
hw/kdrive/neomagic/Xneomagic |
||||||
|
hw/kdrive/nvidia/Xnvidia |
||||||
|
hw/kdrive/pm2/Xpm2 |
||||||
|
hw/kdrive/r128/Xr128 |
||||||
|
hw/kdrive/sdl/Xsdl |
||||||
|
hw/kdrive/sis300/Xsis |
||||||
|
hw/kdrive/smi/Xsmi |
||||||
|
hw/kdrive/vesa/Xvesa |
||||||
|
hw/kdrive/via/Xvia |
||||||
|
hw/vfb/Xvfb |
||||||
|
hw/vfb/Xvfb.1x |
||||||
|
hw/vfb/Xvfb.man |
||||||
|
hw/xfree86/Xorg |
||||||
|
hw/xfree86/common/xf86Build.h |
||||||
|
hw/xfree86/common/xf86DefModeSet.c |
||||||
|
hw/xfree86/doc/man/Xorg.1x |
||||||
|
hw/xfree86/doc/man/Xorg.man |
||||||
|
hw/xfree86/doc/man/xorg.conf.5x |
||||||
|
hw/xfree86/doc/man/xorg.conf.man |
||||||
|
hw/xfree86/exa/exa.4 |
||||||
|
hw/xfree86/exa/exa.4x |
||||||
|
hw/xfree86/exa/exa.man |
||||||
|
hw/xfree86/fbdevhw/fbdevhw.4x |
||||||
|
hw/xfree86/fbdevhw/fbdevhw.man |
||||||
|
hw/xfree86/getconfig/cfg.man |
||||||
|
hw/xfree86/getconfig/getconfig.1x |
||||||
|
hw/xfree86/getconfig/getconfig.5x |
||||||
|
hw/xfree86/getconfig/getconfig.man |
||||||
|
hw/xfree86/os-support/xorgos.c |
||||||
|
hw/xfree86/osandcommon.c |
||||||
|
hw/xfree86/ramdac/xf86BitOrder.c |
||||||
|
hw/xfree86/scanpci/xf86PciData.c |
||||||
|
hw/xfree86/scanpci/xf86PciIds.h |
||||||
|
hw/xfree86/utils/cvt/cvt |
||||||
|
hw/xfree86/utils/cvt/cvt.man |
||||||
|
hw/xfree86/utils/gtf/gtf |
||||||
|
hw/xfree86/utils/gtf/gtf.1x |
||||||
|
hw/xfree86/utils/gtf/gtf.man |
||||||
|
hw/xfree86/utils/ioport/inb |
||||||
|
hw/xfree86/utils/ioport/inl |
||||||
|
hw/xfree86/utils/ioport/inw |
||||||
|
hw/xfree86/utils/ioport/ioport |
||||||
|
hw/xfree86/utils/ioport/outb |
||||||
|
hw/xfree86/utils/ioport/outl |
||||||
|
hw/xfree86/utils/ioport/outw |
||||||
|
hw/xfree86/utils/pcitweak/pcitweak |
||||||
|
hw/xfree86/utils/pcitweak/pcitweak.1x |
||||||
|
hw/xfree86/utils/pcitweak/pcitweak.man |
||||||
|
hw/xfree86/utils/scanpci/scanpci |
||||||
|
hw/xfree86/utils/scanpci/scanpci.1x |
||||||
|
hw/xfree86/utils/scanpci/scanpci.man |
||||||
|
hw/xfree86/utils/xorgcfg/XOrgCfg |
||||||
|
hw/xfree86/utils/xorgcfg/xorgcfg |
||||||
|
hw/xfree86/utils/xorgcfg/xorgcfg.1x |
||||||
|
hw/xfree86/utils/xorgcfg/xorgcfg.man |
||||||
|
hw/xfree86/utils/xorgconfig/xorgconfig |
||||||
|
hw/xfree86/utils/xorgconfig/xorgconfig.1x |
||||||
|
hw/xfree86/utils/xorgconfig/xorgconfig.man |
||||||
|
hw/xfree86/xaa/l-xaaBitmap.c |
||||||
|
hw/xfree86/xaa/l-xaaStipple.c |
||||||
|
hw/xfree86/xaa/l-xaaTEGlyph.c |
||||||
|
hw/xfree86/xaa/l3-xaaBitmap.c |
||||||
|
hw/xfree86/xaa/l3-xaaStipple.c |
||||||
|
hw/xfree86/xaa/lf-xaaBitmap.c |
||||||
|
hw/xfree86/xaa/lf-xaaStipple.c |
||||||
|
hw/xfree86/xaa/lf-xaaTEGlyph.c |
||||||
|
hw/xfree86/xaa/lf3-xaaBitmap.c |
||||||
|
hw/xfree86/xaa/lf3-xaaStipple.c |
||||||
|
hw/xfree86/xaa/m-xaaBitmap.c |
||||||
|
hw/xfree86/xaa/m-xaaStipple.c |
||||||
|
hw/xfree86/xaa/m-xaaTEGlyph.c |
||||||
|
hw/xfree86/xaa/m3-xaaBitmap.c |
||||||
|
hw/xfree86/xaa/m3-xaaStipple.c |
||||||
|
hw/xfree86/xaa/mf-xaaBitmap.c |
||||||
|
hw/xfree86/xaa/mf-xaaStipple.c |
||||||
|
hw/xfree86/xaa/mf-xaaTEGlyph.c |
||||||
|
hw/xfree86/xaa/mf3-xaaBitmap.c |
||||||
|
hw/xfree86/xaa/mf3-xaaStipple.c |
||||||
|
hw/xfree86/xaa/s-xaaDashLine.c |
||||||
|
hw/xfree86/xaa/s-xaaLine.c |
||||||
|
hw/xfree86/xf1bpp/maskbits.c |
||||||
|
hw/xfree86/xf1bpp/mfbbitblt.c |
||||||
|
hw/xfree86/xf1bpp/mfbbltC.c |
||||||
|
hw/xfree86/xf1bpp/mfbbltCI.c |
||||||
|
hw/xfree86/xf1bpp/mfbbltG.c |
||||||
|
hw/xfree86/xf1bpp/mfbbltO.c |
||||||
|
hw/xfree86/xf1bpp/mfbbltX.c |
||||||
|
hw/xfree86/xf1bpp/mfbbres.c |
||||||
|
hw/xfree86/xf1bpp/mfbbresd.c |
||||||
|
hw/xfree86/xf1bpp/mfbclip.c |
||||||
|
hw/xfree86/xf1bpp/mfbcmap.c |
||||||
|
hw/xfree86/xf1bpp/mfbfillarc.c |
||||||
|
hw/xfree86/xf1bpp/mfbfillrct.c |
||||||
|
hw/xfree86/xf1bpp/mfbfillsp.c |
||||||
|
hw/xfree86/xf1bpp/mfbfont.c |
||||||
|
hw/xfree86/xf1bpp/mfbgc.c |
||||||
|
hw/xfree86/xf1bpp/mfbgetsp.c |
||||||
|
hw/xfree86/xf1bpp/mfbigbblak.c |
||||||
|
hw/xfree86/xf1bpp/mfbigbwht.c |
||||||
|
hw/xfree86/xf1bpp/mfbhrzvert.c |
||||||
|
hw/xfree86/xf1bpp/mfbimage.c |
||||||
|
hw/xfree86/xf1bpp/mfbline.c |
||||||
|
hw/xfree86/xf1bpp/mfbmisc.c |
||||||
|
hw/xfree86/xf1bpp/mfbpablack.c |
||||||
|
hw/xfree86/xf1bpp/mfbpainv.c |
||||||
|
hw/xfree86/xf1bpp/mfbpawhite.c |
||||||
|
hw/xfree86/xf1bpp/mfbpgbblak.c |
||||||
|
hw/xfree86/xf1bpp/mfbpgbinv.c |
||||||
|
hw/xfree86/xf1bpp/mfbpgbwht.c |
||||||
|
hw/xfree86/xf1bpp/mfbpixmap.c |
||||||
|
hw/xfree86/xf1bpp/mfbplyblack.c |
||||||
|
hw/xfree86/xf1bpp/mfbplyinv.c |
||||||
|
hw/xfree86/xf1bpp/mfbplywhite.c |
||||||
|
hw/xfree86/xf1bpp/mfbpntwin.c |
||||||
|
hw/xfree86/xf1bpp/mfbpolypnt.c |
||||||
|
hw/xfree86/xf1bpp/mfbpushpxl.c |
||||||
|
hw/xfree86/xf1bpp/mfbscrclse.c |
||||||
|
hw/xfree86/xf1bpp/mfbscrinit.c |
||||||
|
hw/xfree86/xf1bpp/mfbseg.c |
||||||
|
hw/xfree86/xf1bpp/mfbsetsp.c |
||||||
|
hw/xfree86/xf1bpp/mfbteblack.c |
||||||
|
hw/xfree86/xf1bpp/mfbtewhite.c |
||||||
|
hw/xfree86/xf1bpp/mfbtileC.c |
||||||
|
hw/xfree86/xf1bpp/mfbtileG.c |
||||||
|
hw/xfree86/xf1bpp/mfbwindow.c |
||||||
|
hw/xfree86/xf1bpp/mfbzerarc.c |
||||||
|
hw/xfree86/xf4bpp/mfbseg.c |
||||||
|
hw/xfree86/xf8_32bpp/cfbgc32.c |
||||||
|
hw/xfree86/xf8_32bpp/cfbgc8.c |
||||||
|
hw/xfree86/xorg.c |
||||||
|
hw/xfree86/xorg.conf.example |
||||||
|
hw/xfree86/xorg.conf.example.pre |
||||||
|
hw/xnest/Xnest |
||||||
|
hw/xnest/Xnest.1x |
||||||
|
hw/xnest/Xnest.man |
||||||
|
hw/xprint/Xprt |
||||||
|
hw/xprint/config/C/print/Xprinters.ghostscript |
||||||
|
hw/xprint/doc/Xprt.1x |
||||||
|
hw/xprint/doc/Xprt.man |
||||||
|
hw/xprint/dpmsstubs-wrapper.c |
||||||
|
hw/xprint/miinitext-wrapper.c |
||||||
|
include/dix-config.h |
||||||
|
include/kdrive-config.h |
||||||
|
include/xgl-config.h |
||||||
|
include/xkb-config.h |
||||||
|
include/xorg-config.h |
||||||
|
include/xorg-server.h |
||||||
|
include/xwin-config.h |
||||||
|
mfb/mfbbltC.c |
||||||
|
mfb/mfbbltCI.c |
||||||
|
mfb/mfbbltG.c |
||||||
|
mfb/mfbbltO.c |
||||||
|
mfb/mfbbltX.c |
||||||
|
mfb/mfbigbblak.c |
||||||
|
mfb/mfbigbwht.c |
||||||
|
mfb/mfbpablack.c |
||||||
|
mfb/mfbpainv.c |
||||||
|
mfb/mfbpawhite.c |
||||||
|
mfb/mfbpgbblak.c |
||||||
|
mfb/mfbpgbinv.c |
||||||
|
mfb/mfbpgbwht.c |
||||||
|
mfb/mfbplyblack.c |
||||||
|
mfb/mfbplyinv.c |
||||||
|
mfb/mfbplywhite.c |
||||||
|
mfb/mfbseg.c |
||||||
|
mfb/mfbteblack.c |
||||||
|
mfb/mfbtewhite.c |
||||||
|
mfb/mfbtileC.c |
||||||
|
mfb/mfbtileG.c |
@ -0,0 +1,14 @@ |
|||||||
|
#!/bin/sh |
||||||
|
# |
||||||
|
# The X server provides capabilities of the form: |
||||||
|
# |
||||||
|
# Provides: xserver-abi(ansic-0) = 4 |
||||||
|
# |
||||||
|
# for an ABI version of 0.4. The major number is encoded into the name so |
||||||
|
# that major number changes force upgrades. If we didn't, then |
||||||
|
# |
||||||
|
# Requires: xserver-abi(ansic) >= 0.4 |
||||||
|
# |
||||||
|
# would also match 1.0, which is wrong since major numbers mean an ABI break. |
||||||
|
|
||||||
|
echo "xserver-abi($1-@MAJOR@) >= @MINOR@" |
@ -0,0 +1,19 @@ |
|||||||
|
#!/bin/sh |
||||||
|
# |
||||||
|
# The X server provides capabilities of the form: |
||||||
|
# |
||||||
|
# Provides: xserver-abi(ansic-0) = 4 |
||||||
|
# |
||||||
|
# for an ABI version of 0.4. The major number is encoded into the name so |
||||||
|
# that major number changes force upgrades. If we didn't, then |
||||||
|
# |
||||||
|
# Requires: xserver-abi(ansic) >= 0.4 |
||||||
|
# |
||||||
|
# would also match 1.0, which is wrong since major numbers mean an ABI break. |
||||||
|
|
||||||
|
ver=$(pkg-config --variable abi_$1 xorg-server) |
||||||
|
|
||||||
|
major=$(echo $ver | cut -f 1 -d .) |
||||||
|
minor=$(echo $ver | cut -f 2 -d .) |
||||||
|
|
||||||
|
echo "xserver-abi($1-$major) >= $minor" |
@ -0,0 +1,5 @@ |
|||||||
|
#%PAM-1.0 |
||||||
|
auth sufficient pam_rootok.so |
||||||
|
auth required pam_console.so |
||||||
|
account required pam_permit.so |
||||||
|
session optional pam_keyinit.so force revoke |
@ -0,0 +1,200 @@ |
|||||||
|
#!/bin/sh |
||||||
|
# --- T2-COPYRIGHT-NOTE-BEGIN --- |
||||||
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
||||||
|
# |
||||||
|
# T2 SDE: package/.../xorg-server/xvfb-run.sh |
||||||
|
# Copyright (C) 2005 The T2 SDE Project |
||||||
|
# Copyright (C) XXXX - 2005 Debian |
||||||
|
# |
||||||
|
# More information can be found in the files COPYING and README. |
||||||
|
# |
||||||
|
# This program is free software; you can redistribute it and/or modify |
||||||
|
# it under the terms of the GNU General Public License as published by |
||||||
|
# the Free Software Foundation; version 2 of the License. A copy of the |
||||||
|
# GNU General Public License can be found in the file COPYING. |
||||||
|
# --- T2-COPYRIGHT-NOTE-END --- |
||||||
|
|
||||||
|
# $Id$ |
||||||
|
# from: http://necrotic.deadbeast.net/xsf/XFree86/trunk/debian/local/xvfb-run |
||||||
|
|
||||||
|
# This script starts an instance of Xvfb, the "fake" X server, runs a command |
||||||
|
# with that server available, and kills the X server when done. The return |
||||||
|
# value of the command becomes the return value of this script. |
||||||
|
# |
||||||
|
# If anyone is using this to build a Debian package, make sure the package |
||||||
|
# Build-Depends on xvfb, xbase-clients, and xfonts-base. |
||||||
|
|
||||||
|
set -e |
||||||
|
|
||||||
|
PROGNAME=xvfb-run |
||||||
|
SERVERNUM=99 |
||||||
|
AUTHFILE= |
||||||
|
ERRORFILE=/dev/null |
||||||
|
STARTWAIT=3 |
||||||
|
XVFBARGS="-screen 0 640x480x24" |
||||||
|
LISTENTCP="-nolisten tcp" |
||||||
|
XAUTHPROTO=. |
||||||
|
|
||||||
|
# Query the terminal to establish a default number of columns to use for |
||||||
|
# displaying messages to the user. This is used only as a fallback in the event |
||||||
|
# the COLUMNS variable is not set. ($COLUMNS can react to SIGWINCH while the |
||||||
|
# script is running, and this cannot, only being calculated once.) |
||||||
|
DEFCOLUMNS=$(stty size 2>/dev/null | awk '{print $2}') || true |
||||||
|
if ! expr "$DEFCOLUMNS" : "[[:digit:]]\+$" >/dev/null 2>&1; then |
||||||
|
DEFCOLUMNS=80 |
||||||
|
fi |
||||||
|
|
||||||
|
# Display a message, wrapping lines at the terminal width. |
||||||
|
message () { |
||||||
|
echo "$PROGNAME: $*" | fmt -t -w ${COLUMNS:-$DEFCOLUMNS} |
||||||
|
} |
||||||
|
|
||||||
|
# Display an error message. |
||||||
|
error () { |
||||||
|
message "error: $*" >&2 |
||||||
|
} |
||||||
|
|
||||||
|
# Display a usage message. |
||||||
|
usage () { |
||||||
|
if [ -n "$*" ]; then |
||||||
|
message "usage error: $*" |
||||||
|
fi |
||||||
|
cat <<EOF |
||||||
|
Usage: $PROGNAME [OPTION ...] COMMAND |
||||||
|
Run COMMAND (usually an X client) in a virtual X server environment. |
||||||
|
Options: |
||||||
|
-a --auto-servernum try to get a free server number, starting at |
||||||
|
--server-num (deprecated, use --auto-display |
||||||
|
instead) |
||||||
|
-d --auto-display use the X server to find a display number |
||||||
|
automatically |
||||||
|
-e FILE --error-file=FILE file used to store xauth errors and Xvfb |
||||||
|
output (default: $ERRORFILE) |
||||||
|
-f FILE --auth-file=FILE file used to store auth cookie |
||||||
|
(default: ./.Xauthority) |
||||||
|
-h --help display this usage message and exit |
||||||
|
-n NUM --server-num=NUM server number to use (default: $SERVERNUM) |
||||||
|
-l --listen-tcp enable TCP port listening in the X server |
||||||
|
-p PROTO --xauth-protocol=PROTO X authority protocol name to use |
||||||
|
(default: xauth command's default) |
||||||
|
-s ARGS --server-args=ARGS arguments (other than server number and |
||||||
|
"-nolisten tcp") to pass to the Xvfb server |
||||||
|
(default: "$XVFBARGS") |
||||||
|
-w DELAY --wait=DELAY delay in seconds to wait for Xvfb to start |
||||||
|
before running COMMAND (default: $STARTWAIT) |
||||||
|
EOF |
||||||
|
} |
||||||
|
|
||||||
|
# Find a free server number by looking at .X*-lock files in /tmp. |
||||||
|
find_free_servernum() { |
||||||
|
# Sadly, the "local" keyword is not POSIX. Leave the next line commented in |
||||||
|
# the hope Debian Policy eventually changes to allow it in /bin/sh scripts |
||||||
|
# anyway. |
||||||
|
#local i |
||||||
|
|
||||||
|
i=$SERVERNUM |
||||||
|
while [ -f /tmp/.X$i-lock ]; do |
||||||
|
i=$(($i + 1)) |
||||||
|
done |
||||||
|
echo $i |
||||||
|
} |
||||||
|
|
||||||
|
# Parse the command line. |
||||||
|
ARGS=$(getopt --options +ade:f:hn:lp:s:w: \ |
||||||
|
--long auto-servernum,error-file:auth-file:,help,server-num:,listen-tcp,xauth-protocol:,server-args:,wait: \ |
||||||
|
--name "$PROGNAME" -- "$@") |
||||||
|
GETOPT_STATUS=$? |
||||||
|
|
||||||
|
if [ $GETOPT_STATUS -ne 0 ]; then |
||||||
|
error "internal error; getopt exited with status $GETOPT_STATUS" |
||||||
|
exit 6 |
||||||
|
fi |
||||||
|
|
||||||
|
eval set -- "$ARGS" |
||||||
|
|
||||||
|
while :; do |
||||||
|
case "$1" in |
||||||
|
-a|--auto-servernum) SERVERNUM=$(find_free_servernum) ;; |
||||||
|
-d|--auto-display) AUTO_DISPLAY=1 ;; |
||||||
|
-e|--error-file) ERRORFILE="$2"; shift ;; |
||||||
|
-f|--auth-file) AUTHFILE="$2"; shift ;; |
||||||
|
-h|--help) SHOWHELP="yes" ;; |
||||||
|
-n|--server-num) SERVERNUM="$2"; shift ;; |
||||||
|
-l|--listen-tcp) LISTENTCP="" ;; |
||||||
|
-p|--xauth-protocol) XAUTHPROTO="$2"; shift ;; |
||||||
|
-s|--server-args) XVFBARGS="$2"; shift ;; |
||||||
|
-w|--wait) STARTWAIT="$2"; shift ;; |
||||||
|
--) shift; break ;; |
||||||
|
*) error "internal error; getopt permitted \"$1\" unexpectedly" |
||||||
|
exit 6 |
||||||
|
;; |
||||||
|
esac |
||||||
|
shift |
||||||
|
done |
||||||
|
|
||||||
|
if [ "$SHOWHELP" ]; then |
||||||
|
usage |
||||||
|
exit 0 |
||||||
|
fi |
||||||
|
|
||||||
|
if [ -z "$*" ]; then |
||||||
|
usage "need a command to run" >&2 |
||||||
|
exit 2 |
||||||
|
fi |
||||||
|
|
||||||
|
if ! type xauth >/dev/null; then |
||||||
|
error "xauth command not found" |
||||||
|
exit 3 |
||||||
|
fi |
||||||
|
|
||||||
|
# Set up the temp dir for the pid and X authorization file |
||||||
|
XVFB_RUN_TMPDIR="$(mktemp --directory --tmpdir $PROGNAME.XXXXXX)" |
||||||
|
# If the user did not specify an X authorization file to use, set up a temporary |
||||||
|
# directory to house one. |
||||||
|
if [ -z "$AUTHFILE" ]; then |
||||||
|
AUTHFILE=$(mktemp -p "$XVFB_RUN_TMPDIR" Xauthority.XXXXXX) |
||||||
|
fi |
||||||
|
|
||||||
|
# Start Xvfb. |
||||||
|
MCOOKIE=$(mcookie) |
||||||
|
|
||||||
|
if [ -z "$AUTO_DISPLAY" ]; then |
||||||
|
# Old style using a pre-computed SERVERNUM |
||||||
|
XAUTHORITY=$AUTHFILE Xvfb ":$SERVERNUM" $XVFBARGS $LISTENTCP >>"$ERRORFILE" \ |
||||||
|
2>&1 & |
||||||
|
XVFBPID=$! |
||||||
|
else |
||||||
|
# New style using Xvfb to provide a free display |
||||||
|
PIDFILE=$(mktemp -p "$XVFB_RUN_TMPDIR" pid.XXXXXX) |
||||||
|
SERVERNUM=$(XAUTHORITY=$AUTHFILE Xvfb -displayfd 1 $XVFBARGS $LISTENTCP \ |
||||||
|
2>"$ERRORFILE" & echo $! > $PIDFILE) |
||||||
|
XVFBPID=$(cat $PIDFILE) |
||||||
|
fi |
||||||
|
sleep "$STARTWAIT" |
||||||
|
|
||||||
|
XAUTHORITY=$AUTHFILE xauth source - << EOF >>"$ERRORFILE" 2>&1 |
||||||
|
add :$SERVERNUM $XAUTHPROTO $MCOOKIE |
||||||
|
EOF |
||||||
|
|
||||||
|
# Start the command and save its exit status. |
||||||
|
set +e |
||||||
|
DISPLAY=:$SERVERNUM XAUTHORITY=$AUTHFILE "$@" 2>&1 |
||||||
|
RETVAL=$? |
||||||
|
set -e |
||||||
|
|
||||||
|
# Kill Xvfb now that the command has exited. |
||||||
|
kill $XVFBPID |
||||||
|
|
||||||
|
# Clean up. |
||||||
|
XAUTHORITY=$AUTHFILE xauth remove ":$SERVERNUM" >"$ERRORFILE" 2>&1 |
||||||
|
if [ -n "$XVFB_RUN_TMPDIR" ]; then |
||||||
|
if ! rm -r "$XVFB_RUN_TMPDIR"; then |
||||||
|
error "problem while cleaning up temporary directory" |
||||||
|
exit 5 |
||||||
|
fi |
||||||
|
fi |
||||||
|
|
||||||
|
# Return the executed command's exit status. |
||||||
|
exit $RETVAL |
||||||
|
|
||||||
|
# vim:set ai et sts=4 sw=4 tw=80: |
@ -0,0 +1,845 @@ |
|||||||
|
# This package is an experiment in active integration of upstream SCM with |
||||||
|
# Fedora packaging. It works something like this: |
||||||
|
# |
||||||
|
# The "pristine" source is actually a git repo (with no working checkout). |
||||||
|
# The first step of %%prep is to check it out and switch to a "fedora" branch. |
||||||
|
# If you need to add a patch to the server, just do it like a normal git |
||||||
|
# operation, dump it with git-format-patch to a file in the standard naming |
||||||
|
# format, and add a PatchN: line. If you want to push something upstream, |
||||||
|
# check out the master branch, pull, cherry-pick, and push. |
||||||
|
|
||||||
|
#global gitdate 20161026 |
||||||
|
%global stable_abi 1 |
||||||
|
|
||||||
|
%if !0%{?gitdate} || %{stable_abi} |
||||||
|
# Released ABI versions. Have to keep these manually in sync with the |
||||||
|
# source because rpm is a terrible language. |
||||||
|
%global ansic_major 0 |
||||||
|
%global ansic_minor 4 |
||||||
|
%global videodrv_major 24 |
||||||
|
%global videodrv_minor 1 |
||||||
|
%global xinput_major 24 |
||||||
|
%global xinput_minor 1 |
||||||
|
%global extension_major 10 |
||||||
|
%global extension_minor 0 |
||||||
|
%endif |
||||||
|
|
||||||
|
%if 0%{?gitdate} |
||||||
|
# For git snapshots, use date for major and a serial number for minor |
||||||
|
%global minor_serial 0 |
||||||
|
%global git_ansic_major %{gitdate} |
||||||
|
%global git_ansic_minor %{minor_serial} |
||||||
|
%global git_videodrv_major %{gitdate} |
||||||
|
%global git_videodrv_minor %{minor_serial} |
||||||
|
%global git_xinput_major %{gitdate} |
||||||
|
%global git_xinput_minor %{minor_serial} |
||||||
|
%global git_extension_major %{gitdate} |
||||||
|
%global git_extension_minor %{minor_serial} |
||||||
|
%endif |
||||||
|
|
||||||
|
%global pkgname xorg-server |
||||||
|
|
||||||
|
Summary: X.Org X11 X server |
||||||
|
Name: xorg-x11-server |
||||||
|
Version: 1.20.11 |
||||||
|
Release: 10%{?gitdate:.%{gitdate}}%{?dist} |
||||||
|
URL: http://www.x.org |
||||||
|
License: MIT |
||||||
|
|
||||||
|
#VCS: git:git://git.freedesktop.org/git/xorg/xserver |
||||||
|
%if 0%{?gitdate} |
||||||
|
# git snapshot. to recreate, run: |
||||||
|
# ./make-git-snapshot.sh `cat commitid` |
||||||
|
Source0: xorg-server-%{gitdate}.tar.xz |
||||||
|
#Source0: http://www.x.org/pub/individual/xserver/%{pkgname}-%{version}.tar.bz2 |
||||||
|
Source1: make-git-snapshot.sh |
||||||
|
Source2: commitid |
||||||
|
%else |
||||||
|
Source0: https://www.x.org/pub/individual/xserver/%{pkgname}-%{version}.tar.bz2 |
||||||
|
Source1: gitignore |
||||||
|
%endif |
||||||
|
|
||||||
|
Source4: 10-quirks.conf |
||||||
|
|
||||||
|
Source10: xserver.pamd |
||||||
|
|
||||||
|
# "useful" xvfb-run script |
||||||
|
Source20: http://svn.exactcode.de/t2/trunk/package/xorg/xorg-server/xvfb-run.sh |
||||||
|
|
||||||
|
# for requires generation in drivers |
||||||
|
Source30: xserver-sdk-abi-requires.release |
||||||
|
Source31: xserver-sdk-abi-requires.git |
||||||
|
|
||||||
|
# maintainer convenience script |
||||||
|
Source40: driver-abi-rebuild.sh |
||||||
|
|
||||||
|
# From Debian use intel ddx driver only for gen4 and older chipsets |
||||||
|
Patch1: 06_use-intel-only-on-pre-gen4.diff |
||||||
|
# Default to xf86-video-modesetting on GeForce 8 and newer |
||||||
|
Patch2: 0001-xfree86-use-modesetting-driver-by-default-on-GeForce.patch |
||||||
|
|
||||||
|
# Default to va_gl on intel i965 as we use the modesetting drv there |
||||||
|
# va_gl should probably just be the default everywhere ? |
||||||
|
Patch3: 0001-xf86-dri2-Use-va_gl-as-vdpau_driver-for-Intel-i965-G.patch |
||||||
|
|
||||||
|
# Submitted upstream, but not going anywhere |
||||||
|
Patch5: 0001-autobind-GPUs-to-the-screen.patch |
||||||
|
|
||||||
|
# because the display-managers are not ready yet, do not upstream |
||||||
|
Patch6: 0001-Fedora-hack-Make-the-suid-root-wrapper-always-start-.patch |
||||||
|
|
||||||
|
# https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/761 |
||||||
|
Patch7: 0001-xkb-Drop-check-for-XkbSetMapResizeTypes.patch |
||||||
|
|
||||||
|
# 1988922 - [Hyper-V]Installation failed with: 'x or window manager startup failed' when the VM was created with GEN1 |
||||||
|
# 2029769 - fbdev Xorg driver no longer works as a fallback with unsupported hardware |
||||||
|
Patch8: 0001-mustard-xfree86-Disable-the-PCI-probe-path.patch |
||||||
|
|
||||||
|
# Backports from current stable "server-1.20-branch": |
||||||
|
# <empty> |
||||||
|
|
||||||
|
# Backports from "master" upstream: |
||||||
|
Patch102: 0002-xfree86-Link-fb-statically.patch |
||||||
|
Patch104: 0004-loader-Move-LoaderSymbolFromModule-to-public-API.patch |
||||||
|
Patch105: 0005-loader-Make-LoaderSymbolFromModule-take-a-ModuleDesc.patch |
||||||
|
Patch106: 0006-modesetting-Indirect-the-shadow-API-through-LoaderSy.patch |
||||||
|
Patch107: 0007-modesetting-Indirect-the-glamor-API-through-LoaderSy.patch |
||||||
|
Patch108: 0008-modesetting-Add-glamor_finish-convenience-macro.patch |
||||||
|
Patch109: 0009-modesetting-Use-EGL_MESA_query_driver-to-select-DRI-.patch |
||||||
|
Patch110: 0010-modesetting-Fix-build-with-glamor-disabled.patch |
||||||
|
# Because we still use automake |
||||||
|
Patch111: 0011-modesetting-set-gbm-as-dependency-for-autotools.patch |
||||||
|
# Xorg crashes with NVIDIA proprietary driver when uisng Present |
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=2046330 |
||||||
|
Patch112: 0001-present-Check-for-NULL-to-prevent-crash.patch |
||||||
|
# Fix a regression with hybrid gfx and NVIDIA proprietary driver |
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=2052605 |
||||||
|
Patch113: 0001-modesetting-Fix-msSharePixmapBacking-Segfault-Regres.patch |
||||||
|
|
||||||
|
# CVE-2021-4011 |
||||||
|
Patch10009: 0001-record-Fix-out-of-bounds-access-in-SwapCreateRegiste.patch |
||||||
|
# CVE-2021-4009 |
||||||
|
Patch10010: 0002-xfixes-Fix-out-of-bounds-access-in-ProcXFixesCreateP.patch |
||||||
|
# CVE-2021-4010 |
||||||
|
Patch10011: 0003-Xext-Fix-out-of-bounds-access-in-SProcScreenSaverSus.patch |
||||||
|
# CVE-2021-4008 |
||||||
|
Patch10012: 0004-render-Fix-out-of-bounds-access-in-SProcRenderCompos.patch |
||||||
|
|
||||||
|
|
||||||
|
BuildRequires: make |
||||||
|
BuildRequires: systemtap-sdt-devel |
||||||
|
BuildRequires: git-core |
||||||
|
BuildRequires: automake autoconf libtool pkgconfig |
||||||
|
BuildRequires: xorg-x11-util-macros >= 1.17 |
||||||
|
|
||||||
|
BuildRequires: xorg-x11-proto-devel >= 7.7-10 |
||||||
|
BuildRequires: xorg-x11-font-utils >= 7.2-11 |
||||||
|
|
||||||
|
BuildRequires: dbus-devel libepoxy-devel systemd-devel |
||||||
|
BuildRequires: xorg-x11-xtrans-devel >= 1.3.2 |
||||||
|
BuildRequires: libXfont2-devel libXau-devel libxkbfile-devel libXres-devel |
||||||
|
BuildRequires: libfontenc-devel libXtst-devel libXdmcp-devel |
||||||
|
BuildRequires: libX11-devel libXext-devel |
||||||
|
BuildRequires: libXinerama-devel libXi-devel |
||||||
|
|
||||||
|
# DMX config utils buildreqs. |
||||||
|
BuildRequires: libXt-devel libdmx-devel libXmu-devel libXrender-devel |
||||||
|
BuildRequires: libXi-devel libXpm-devel libXaw-devel libXfixes-devel |
||||||
|
|
||||||
|
BuildRequires: pkgconfig(epoxy) |
||||||
|
BuildRequires: pkgconfig(xshmfence) >= 1.1 |
||||||
|
BuildRequires: libXv-devel |
||||||
|
BuildRequires: pixman-devel >= 0.30.0 |
||||||
|
BuildRequires: libpciaccess-devel >= 0.13.1 openssl-devel bison flex |
||||||
|
BuildRequires: mesa-libGL-devel >= 9.2 |
||||||
|
BuildRequires: mesa-libEGL-devel |
||||||
|
BuildRequires: mesa-libgbm-devel |
||||||
|
# XXX silly... |
||||||
|
BuildRequires: libdrm-devel >= 2.4.0 kernel-headers |
||||||
|
|
||||||
|
BuildRequires: audit-libs-devel libselinux-devel >= 2.0.86-1 |
||||||
|
BuildRequires: libudev-devel |
||||||
|
# libunwind is Exclusive for the following arches |
||||||
|
%ifarch aarch64 %{arm} hppa ia64 mips ppc ppc64 %{ix86} x86_64 |
||||||
|
%if !0%{?rhel} |
||||||
|
BuildRequires: libunwind-devel |
||||||
|
%endif |
||||||
|
%endif |
||||||
|
|
||||||
|
BuildRequires: pkgconfig(xcb-aux) pkgconfig(xcb-image) pkgconfig(xcb-icccm) |
||||||
|
BuildRequires: pkgconfig(xcb-keysyms) pkgconfig(xcb-renderutil) |
||||||
|
|
||||||
|
%description |
||||||
|
X.Org X11 X server |
||||||
|
|
||||||
|
|
||||||
|
%package common |
||||||
|
Summary: Xorg server common files |
||||||
|
Requires: pixman >= 0.30.0 |
||||||
|
Requires: xkeyboard-config xkbcomp |
||||||
|
|
||||||
|
%description common |
||||||
|
Common files shared among all X servers. |
||||||
|
|
||||||
|
|
||||||
|
%package Xorg |
||||||
|
Summary: Xorg X server |
||||||
|
Provides: Xorg = %{version}-%{release} |
||||||
|
Provides: Xserver |
||||||
|
# HdG: This should be moved to the wrapper package once the wrapper gets |
||||||
|
# its own sub-package: |
||||||
|
Provides: xorg-x11-server-wrapper = %{version}-%{release} |
||||||
|
%if !0%{?gitdate} || %{stable_abi} |
||||||
|
Provides: xserver-abi(ansic-%{ansic_major}) = %{ansic_minor} |
||||||
|
Provides: xserver-abi(videodrv-%{videodrv_major}) = %{videodrv_minor} |
||||||
|
Provides: xserver-abi(xinput-%{xinput_major}) = %{xinput_minor} |
||||||
|
Provides: xserver-abi(extension-%{extension_major}) = %{extension_minor} |
||||||
|
%endif |
||||||
|
%if 0%{?gitdate} |
||||||
|
Provides: xserver-abi(ansic-%{git_ansic_major}) = %{git_ansic_minor} |
||||||
|
Provides: xserver-abi(videodrv-%{git_videodrv_major}) = %{git_videodrv_minor} |
||||||
|
Provides: xserver-abi(xinput-%{git_xinput_major}) = %{git_xinput_minor} |
||||||
|
Provides: xserver-abi(extension-%{git_extension_major}) = %{git_extension_minor} |
||||||
|
%endif |
||||||
|
Obsoletes: xorg-x11-glamor < %{version}-%{release} |
||||||
|
Provides: xorg-x11-glamor = %{version}-%{release} |
||||||
|
Obsoletes: xorg-x11-drv-modesetting < %{version}-%{release} |
||||||
|
Provides: xorg-x11-drv-modesetting = %{version}-%{release} |
||||||
|
# Dropped from F25 |
||||||
|
Obsoletes: xorg-x11-drv-vmmouse < 13.1.0-4 |
||||||
|
|
||||||
|
Requires: xorg-x11-server-common >= %{version}-%{release} |
||||||
|
Requires: system-setup-keyboard |
||||||
|
Requires: xorg-x11-drv-libinput |
||||||
|
Requires: libEGL |
||||||
|
|
||||||
|
%description Xorg |
||||||
|
X.org X11 is an open source implementation of the X Window System. It |
||||||
|
provides the basic low level functionality which full fledged |
||||||
|
graphical user interfaces (GUIs) such as GNOME and KDE are designed |
||||||
|
upon. |
||||||
|
|
||||||
|
|
||||||
|
%package Xnest |
||||||
|
Summary: A nested server |
||||||
|
Requires: xorg-x11-server-common >= %{version}-%{release} |
||||||
|
Provides: Xnest |
||||||
|
|
||||||
|
%description Xnest |
||||||
|
Xnest is an X server which has been implemented as an ordinary |
||||||
|
X application. It runs in a window just like other X applications, |
||||||
|
but it is an X server itself in which you can run other software. It |
||||||
|
is a very useful tool for developers who wish to test their |
||||||
|
applications without running them on their real X server. |
||||||
|
|
||||||
|
|
||||||
|
%package Xdmx |
||||||
|
Summary: Distributed Multihead X Server and utilities |
||||||
|
Requires: xorg-x11-server-common >= %{version}-%{release} |
||||||
|
Provides: Xdmx |
||||||
|
|
||||||
|
%description Xdmx |
||||||
|
Xdmx is proxy X server that provides multi-head support for multiple displays |
||||||
|
attached to different machines (each of which is running a typical X server). |
||||||
|
When Xinerama is used with Xdmx, the multiple displays on multiple machines |
||||||
|
are presented to the user as a single unified screen. A simple application |
||||||
|
for Xdmx would be to provide multi-head support using two desktop machines, |
||||||
|
each of which has a single display device attached to it. A complex |
||||||
|
application for Xdmx would be to unify a 4 by 4 grid of 1280x1024 displays |
||||||
|
(each attached to one of 16 computers) into a unified 5120x4096 display. |
||||||
|
|
||||||
|
|
||||||
|
%package Xvfb |
||||||
|
Summary: A X Windows System virtual framebuffer X server |
||||||
|
# xvfb-run is GPLv2, rest is MIT |
||||||
|
License: MIT and GPLv2 |
||||||
|
Requires: xorg-x11-server-common >= %{version}-%{release} |
||||||
|
# required for xvfb-run |
||||||
|
Requires: xorg-x11-xauth |
||||||
|
Provides: Xvfb |
||||||
|
|
||||||
|
%description Xvfb |
||||||
|
Xvfb (X Virtual Frame Buffer) is an X server that is able to run on |
||||||
|
machines with no display hardware and no physical input devices. |
||||||
|
Xvfb simulates a dumb framebuffer using virtual memory. Xvfb does |
||||||
|
not open any devices, but behaves otherwise as an X display. Xvfb |
||||||
|
is normally used for testing servers. |
||||||
|
|
||||||
|
|
||||||
|
%package Xephyr |
||||||
|
Summary: A nested server |
||||||
|
Requires: xorg-x11-server-common >= %{version}-%{release} |
||||||
|
Provides: Xephyr |
||||||
|
|
||||||
|
%description Xephyr |
||||||
|
Xephyr is an X server which has been implemented as an ordinary |
||||||
|
X application. It runs in a window just like other X applications, |
||||||
|
but it is an X server itself in which you can run other software. It |
||||||
|
is a very useful tool for developers who wish to test their |
||||||
|
applications without running them on their real X server. Unlike |
||||||
|
Xnest, Xephyr renders to an X image rather than relaying the |
||||||
|
X protocol, and therefore supports the newer X extensions like |
||||||
|
Render and Composite. |
||||||
|
|
||||||
|
|
||||||
|
%package devel |
||||||
|
Summary: SDK for X server driver module development |
||||||
|
Requires: xorg-x11-util-macros |
||||||
|
Requires: xorg-x11-proto-devel |
||||||
|
Requires: libXfont2-devel |
||||||
|
Requires: pkgconfig pixman-devel libpciaccess-devel |
||||||
|
Provides: xorg-x11-server-static |
||||||
|
Obsoletes: xorg-x11-glamor-devel < %{version}-%{release} |
||||||
|
Provides: xorg-x11-glamor-devel = %{version}-%{release} |
||||||
|
|
||||||
|
%description devel |
||||||
|
The SDK package provides the developmental files which are necessary for |
||||||
|
developing X server driver modules, and for compiling driver modules |
||||||
|
outside of the standard X11 source code tree. Developers writing video |
||||||
|
drivers, input drivers, or other X modules should install this package. |
||||||
|
|
||||||
|
|
||||||
|
%package source |
||||||
|
Summary: Xserver source code required to build VNC server (Xvnc) |
||||||
|
BuildArch: noarch |
||||||
|
|
||||||
|
%description source |
||||||
|
Xserver source code needed to build VNC server (Xvnc) |
||||||
|
|
||||||
|
|
||||||
|
%prep |
||||||
|
%autosetup -N -n %{pkgname}-%{?gitdate:%{gitdate}}%{!?gitdate:%{version}} |
||||||
|
rm -rf .git |
||||||
|
cp %{SOURCE1} .gitignore |
||||||
|
# ick |
||||||
|
%global __scm git |
||||||
|
%{expand:%__scm_setup_git -q} |
||||||
|
%autopatch |
||||||
|
|
||||||
|
%if 0%{?stable_abi} |
||||||
|
# check the ABI in the source against what we expect. |
||||||
|
getmajor() { |
||||||
|
grep -i ^#define.ABI.$1_VERSION hw/xfree86/common/xf86Module.h | |
||||||
|
tr '(),' ' ' | awk '{ print $4 }' |
||||||
|
} |
||||||
|
|
||||||
|
getminor() { |
||||||
|
grep -i ^#define.ABI.$1_VERSION hw/xfree86/common/xf86Module.h | |
||||||
|
tr '(),' ' ' | awk '{ print $5 }' |
||||||
|
} |
||||||
|
|
||||||
|
test `getmajor ansic` == %{ansic_major} |
||||||
|
test `getminor ansic` == %{ansic_minor} |
||||||
|
test `getmajor videodrv` == %{videodrv_major} |
||||||
|
test `getminor videodrv` == %{videodrv_minor} |
||||||
|
test `getmajor xinput` == %{xinput_major} |
||||||
|
test `getminor xinput` == %{xinput_minor} |
||||||
|
test `getmajor extension` == %{extension_major} |
||||||
|
test `getminor extension` == %{extension_minor} |
||||||
|
|
||||||
|
%endif |
||||||
|
|
||||||
|
%build |
||||||
|
|
||||||
|
%if !0%{?rhel} |
||||||
|
%ifarch %{ix86} x86_64 |
||||||
|
%global int10_arch 1 |
||||||
|
%endif |
||||||
|
%endif |
||||||
|
|
||||||
|
%if %{undefined int10_arch} |
||||||
|
%global no_int10 --disable-vbe --disable-int10-module |
||||||
|
%endif |
||||||
|
|
||||||
|
%global kdrive --enable-kdrive --enable-xephyr --disable-xfake --disable-xfbdev |
||||||
|
%global xservers --enable-xvfb --enable-xnest %{kdrive} --enable-xorg |
||||||
|
%global default_font_path "catalogue:/etc/X11/fontpath.d,built-ins" |
||||||
|
%global dri_flags --disable-dri --enable-dri2 %{?!rhel:--enable-dri3} --enable-suid-wrapper --enable-glamor |
||||||
|
|
||||||
|
autoreconf -f -v --install || exit 1 |
||||||
|
|
||||||
|
%configure %{xservers} \ |
||||||
|
--enable-dependency-tracking \ |
||||||
|
--disable-static \ |
||||||
|
--with-pic \ |
||||||
|
%{?no_int10} \ |
||||||
|
--with-default-font-path=%{default_font_path} \ |
||||||
|
--with-module-dir=%{_libdir}/xorg/modules \ |
||||||
|
--with-builderstring="Build ID: %{name} %{version}-%{release}" \ |
||||||
|
--with-os-name="$(hostname -s) $(uname -r)" \ |
||||||
|
--with-xkb-output=%{_localstatedir}/lib/xkb \ |
||||||
|
--without-dtrace \ |
||||||
|
--disable-linux-acpi --disable-linux-apm \ |
||||||
|
--enable-xselinux --enable-record --enable-present \ |
||||||
|
--enable-xcsecurity \ |
||||||
|
--enable-config-udev \ |
||||||
|
--disable-unit-tests \ |
||||||
|
--enable-dmx \ |
||||||
|
--disable-xwayland \ |
||||||
|
%{dri_flags} \ |
||||||
|
${CONFIGURE} |
||||||
|
|
||||||
|
make V=1 %{?_smp_mflags} |
||||||
|
|
||||||
|
|
||||||
|
%install |
||||||
|
%make_install |
||||||
|
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_libdir}/xorg/modules/{drivers,input} |
||||||
|
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pam.d |
||||||
|
install -m 644 %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/xserver |
||||||
|
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_datadir}/X11/xorg.conf.d |
||||||
|
install -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/X11/xorg.conf.d |
||||||
|
|
||||||
|
# make sure the (empty) /etc/X11/xorg.conf.d is there, system-setup-keyboard |
||||||
|
# relies on it more or less. |
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/X11/xorg.conf.d |
||||||
|
|
||||||
|
%if %{stable_abi} |
||||||
|
install -m 755 %{SOURCE30} $RPM_BUILD_ROOT%{_bindir}/xserver-sdk-abi-requires |
||||||
|
%else |
||||||
|
sed -e s/@MAJOR@/%{gitdate}/g -e s/@MINOR@/%{minor_serial}/g %{SOURCE31} > \ |
||||||
|
$RPM_BUILD_ROOT%{_bindir}/xserver-sdk-abi-requires |
||||||
|
chmod 755 $RPM_BUILD_ROOT%{_bindir}/xserver-sdk-abi-requires |
||||||
|
%endif |
||||||
|
|
||||||
|
install -m 0755 %{SOURCE20} $RPM_BUILD_ROOT%{_bindir}/xvfb-run |
||||||
|
|
||||||
|
# Make the source package |
||||||
|
%global xserver_source_dir %{_datadir}/xorg-x11-server-source |
||||||
|
%global inst_srcdir %{buildroot}/%{xserver_source_dir} |
||||||
|
|
||||||
|
mkdir -p %{inst_srcdir}/{Xext,xkb,GL,hw/{xquartz/bundle,xfree86/common}} |
||||||
|
mkdir -p %{inst_srcdir}/{hw/dmx/doc,man,doc,hw/dmx/doxygen} |
||||||
|
cp {,%{inst_srcdir}/}hw/xquartz/bundle/cpprules.in |
||||||
|
cp {,%{inst_srcdir}/}man/Xserver.man |
||||||
|
cp {,%{inst_srcdir}/}doc/smartsched |
||||||
|
cp {,%{inst_srcdir}/}hw/dmx/doxygen/doxygen.conf.in |
||||||
|
cp {,%{inst_srcdir}/}xserver.ent.in |
||||||
|
cp {,%{inst_srcdir}/}hw/xfree86/Xorg.sh.in |
||||||
|
cp xkb/README.compiled %{inst_srcdir}/xkb |
||||||
|
cp hw/xfree86/xorgconf.cpp %{inst_srcdir}/hw/xfree86 |
||||||
|
|
||||||
|
find . -type f | egrep '.*\.(c|h|am|ac|inc|m4|h.in|pc.in|man.pre|pl|txt)$' | |
||||||
|
xargs tar cf - | (cd %{inst_srcdir} && tar xf -) |
||||||
|
find %{inst_srcdir}/hw/xfree86 -name \*.c -delete |
||||||
|
|
||||||
|
# Remove unwanted files/dirs |
||||||
|
{ |
||||||
|
find $RPM_BUILD_ROOT -type f -name '*.la' | xargs rm -f -- || : |
||||||
|
# wtf |
||||||
|
%ifnarch %{ix86} x86_64 |
||||||
|
rm -f $RPM_BUILD_ROOT%{_libdir}/xorg/modules/lib{int10,vbe}.so |
||||||
|
%endif |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
%files common |
||||||
|
%doc COPYING |
||||||
|
%{_mandir}/man1/Xserver.1* |
||||||
|
%{_libdir}/xorg/protocol.txt |
||||||
|
%dir %{_localstatedir}/lib/xkb |
||||||
|
%{_localstatedir}/lib/xkb/README.compiled |
||||||
|
|
||||||
|
%if 1 |
||||||
|
%global Xorgperms %attr(4755, root, root) |
||||||
|
%else |
||||||
|
# disable until module loading is audited |
||||||
|
%global Xorgperms %attr(0711,root,root) %caps(cap_sys_admin,cap_sys_rawio,cap_dac_override=pe) |
||||||
|
%endif |
||||||
|
|
||||||
|
%files Xorg |
||||||
|
%config %attr(0644,root,root) %{_sysconfdir}/pam.d/xserver |
||||||
|
%{_bindir}/X |
||||||
|
%{_bindir}/Xorg |
||||||
|
%{_libexecdir}/Xorg |
||||||
|
%{Xorgperms} %{_libexecdir}/Xorg.wrap |
||||||
|
%{_bindir}/cvt |
||||||
|
%{_bindir}/gtf |
||||||
|
%dir %{_libdir}/xorg |
||||||
|
%dir %{_libdir}/xorg/modules |
||||||
|
%dir %{_libdir}/xorg/modules/drivers |
||||||
|
%{_libdir}/xorg/modules/drivers/modesetting_drv.so |
||||||
|
%dir %{_libdir}/xorg/modules/extensions |
||||||
|
%{_libdir}/xorg/modules/extensions/libglx.so |
||||||
|
%dir %{_libdir}/xorg/modules/input |
||||||
|
%{_libdir}/xorg/modules/libfbdevhw.so |
||||||
|
%{_libdir}/xorg/modules/libexa.so |
||||||
|
%{_libdir}/xorg/modules/libglamoregl.so |
||||||
|
%{_libdir}/xorg/modules/libshadow.so |
||||||
|
%{_libdir}/xorg/modules/libshadowfb.so |
||||||
|
%{_libdir}/xorg/modules/libvgahw.so |
||||||
|
%{_libdir}/xorg/modules/libwfb.so |
||||||
|
%if %{defined int10_arch} |
||||||
|
%{_libdir}/xorg/modules/libint10.so |
||||||
|
%{_libdir}/xorg/modules/libvbe.so |
||||||
|
%endif |
||||||
|
%{_mandir}/man1/gtf.1* |
||||||
|
%{_mandir}/man1/Xorg.1* |
||||||
|
%{_mandir}/man1/Xorg.wrap.1* |
||||||
|
%{_mandir}/man1/cvt.1* |
||||||
|
%{_mandir}/man4/fbdevhw.4* |
||||||
|
%{_mandir}/man4/exa.4* |
||||||
|
%{_mandir}/man4/modesetting.4* |
||||||
|
%{_mandir}/man5/Xwrapper.config.5* |
||||||
|
%{_mandir}/man5/xorg.conf.5* |
||||||
|
%{_mandir}/man5/xorg.conf.d.5* |
||||||
|
%dir %{_sysconfdir}/X11/xorg.conf.d |
||||||
|
%dir %{_datadir}/X11/xorg.conf.d |
||||||
|
%{_datadir}/X11/xorg.conf.d/10-quirks.conf |
||||||
|
|
||||||
|
%files Xnest |
||||||
|
%{_bindir}/Xnest |
||||||
|
%{_mandir}/man1/Xnest.1* |
||||||
|
|
||||||
|
%files Xdmx |
||||||
|
%{_bindir}/Xdmx |
||||||
|
%{_bindir}/dmxaddinput |
||||||
|
%{_bindir}/dmxaddscreen |
||||||
|
%{_bindir}/dmxreconfig |
||||||
|
%{_bindir}/dmxresize |
||||||
|
%{_bindir}/dmxrminput |
||||||
|
%{_bindir}/dmxrmscreen |
||||||
|
%{_bindir}/dmxtodmx |
||||||
|
%{_bindir}/dmxwininfo |
||||||
|
%{_bindir}/vdltodmx |
||||||
|
%{_bindir}/dmxinfo |
||||||
|
%{_bindir}/xdmxconfig |
||||||
|
%{_mandir}/man1/Xdmx.1* |
||||||
|
%{_mandir}/man1/dmxtodmx.1* |
||||||
|
%{_mandir}/man1/vdltodmx.1* |
||||||
|
%{_mandir}/man1/xdmxconfig.1* |
||||||
|
|
||||||
|
%files Xvfb |
||||||
|
%{_bindir}/Xvfb |
||||||
|
%{_bindir}/xvfb-run |
||||||
|
%{_mandir}/man1/Xvfb.1* |
||||||
|
|
||||||
|
%files Xephyr |
||||||
|
%{_bindir}/Xephyr |
||||||
|
%{_mandir}/man1/Xephyr.1* |
||||||
|
|
||||||
|
%files devel |
||||||
|
%doc COPYING |
||||||
|
#{_docdir}/xorg-server |
||||||
|
%{_bindir}/xserver-sdk-abi-requires |
||||||
|
%{_libdir}/pkgconfig/xorg-server.pc |
||||||
|
%dir %{_includedir}/xorg |
||||||
|
%{_includedir}/xorg/*.h |
||||||
|
%{_datadir}/aclocal/xorg-server.m4 |
||||||
|
|
||||||
|
%files source |
||||||
|
%{xserver_source_dir} |
||||||
|
|
||||||
|
|
||||||
|
%changelog |
||||||
|
* Thu Feb 10 2022 Olivier Fourdan <ofourdan@redhat.com> - 1.20.11-10 |
||||||
|
- Fix a regression with hybrid gfx and NVIDIA proprietary driver (#2052605) |
||||||
|
|
||||||
|
* Fri Jan 28 2022 Olivier Fourdan <ofourdan@redhat.com> - 1.20.11-9 |
||||||
|
- Fix crash with NVIDIA proprietary driver with Present (#2046330) |
||||||
|
|
||||||
|
* Wed Jan 26 2022 Adam Jackson <ajax@redhat.com> - 1.20.11-8 |
||||||
|
- Only disable the PCI-specific driver probe, since we do still want fallback |
||||||
|
to fbdev to work. |
||||||
|
Resolves: #2029769 |
||||||
|
|
||||||
|
* Thu Jan 6 2022 Olivier Fourdan <ofourdan@redhat.com> - 1.20.11-7 |
||||||
|
- CVE fix for: CVE-2021-4008 (#2030160), CVE-2021-4009 (#2030170), |
||||||
|
CVE-2021-4010 (#2030174), CVE-2021-4011 (#2030179) |
||||||
|
|
||||||
|
* Tue Nov 23 2021 Olivier Fourdan <ofourdan@redhat.com> - 1.20.11-6 |
||||||
|
- Restore hardened builds |
||||||
|
Resolves: #2024556 |
||||||
|
|
||||||
|
* Tue Nov 9 2021 Adam Jackson <ajax@redhat.com> - 1.20.11-5 |
||||||
|
- Disable non-platform video driver probe, it should never be needed and the |
||||||
|
PCI probe code interferes with the (default) platform path. |
||||||
|
Resolves: #2000921 |
||||||
|
|
||||||
|
* Tue Oct 26 2021 Ray Strode <rstrode@redhat.com> - 1.20.11-4 |
||||||
|
- Fix XkbChangeMap |
||||||
|
Resolves: #2009928 |
||||||
|
|
||||||
|
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 1.20.11-3 |
||||||
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags |
||||||
|
Related: rhbz#1991688 |
||||||
|
|
||||||
|
* Tue Jun 22 2021 Mohan Boddu <mboddu@redhat.com> - 1.20.11-2 |
||||||
|
- Rebuilt for RHEL 9 BETA for openssl 3.0 |
||||||
|
Related: rhbz#1971065 |
||||||
|
|
||||||
|
* Thu Jun 17 2021 Olivier Fourdan <ofourdan@redhat.com> - 1.20.11-1 |
||||||
|
- xserver 1.20.11 (#1952895) |
||||||
|
|
||||||
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.20.10-6 |
||||||
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 |
||||||
|
|
||||||
|
* Wed Feb 03 2021 Peter Hutterer <peter.hutterer@redhat.com> 1.20.10-5 |
||||||
|
- Drop BuildRequires for flex-devel (#1871101) |
||||||
|
|
||||||
|
* Mon Feb 1 2021 Olivier Fourdan <ofourdan@redhat.com> - 1.20.10-4 |
||||||
|
- Remove Xwayland from the xserver builds |
||||||
|
|
||||||
|
* Thu Jan 28 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.20.10-3 |
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild |
||||||
|
|
||||||
|
* Tue Jan 19 2021 Adam Jackson <ajax@redhat.com> - 1.20.10-2 |
||||||
|
- Disable int10 and vbe on RHEL |
||||||
|
- Disable DRI1 |
||||||
|
- Stop overriding the vendor name |
||||||
|
|
||||||
|
* Wed Dec 2 2020 Olivier Fourdan <ofourdan@redhat.com> - 1.20.10-1 |
||||||
|
- xserver 1.20.10 (CVE-2020-14360, CVE-2020-25712) |
||||||
|
|
||||||
|
* Thu Nov 5 10:35:09 AEST 2020 Peter Hutterer <peter.hutterer@redhat.com> - 1.20.9-3 |
||||||
|
- Add BuildRequires for make |
||||||
|
|
||||||
|
* Wed Nov 04 2020 Peter Hutterer <peter.hutterer@redhat.com> 1.20.9-2 |
||||||
|
- Drop BuildRequires to git-core only |
||||||
|
|
||||||
|
* Thu Oct 8 2020 Olivier Fourdan <ofourdan@redhat.com> - 1.20.9-1 |
||||||
|
- xserver 1.20.9 + all current fixes from upstream |
||||||
|
|
||||||
|
* Wed Aug 12 2020 Adam Jackson <ajax@redhat.com> - 1.20.8-4 |
||||||
|
- Enable XC-SECURITY |
||||||
|
|
||||||
|
* Fri Jul 31 2020 Adam Jackson <ajax@redhat.com> - 1.20.8-3 |
||||||
|
- Fix information disclosure bug in pixmap allocation (CVE-2020-14347) |
||||||
|
|
||||||
|
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.20.8-2 |
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild |
||||||
|
|
||||||
|
* Mon Mar 30 2020 Olivier Fourdan <ofourdan@redhat.com> - 1.20.8-1 |
||||||
|
- xserver 1.20.8 |
||||||
|
- Backport latest Xwayland randr resolution change emulation support |
||||||
|
patches. |
||||||
|
|
||||||
|
* Wed Mar 18 2020 Olivier Fourdan <ofourdan@redhat.com> - 1.20.7-2 |
||||||
|
- Fix a crash on closing a window using Present found upstream: |
||||||
|
https://gitlab.freedesktop.org/xorg/xserver/issues/1000 |
||||||
|
|
||||||
|
* Fri Mar 13 2020 Olivier Fourdan <ofourdan@redhat.com> - 1.20.7-1 |
||||||
|
- xserver 1.20.7 |
||||||
|
- backport from stable "xserver-1.20-branch" up to commit ad7364d8d |
||||||
|
(for mutter fullscreen unredirect on Wayland) |
||||||
|
- Update videodrv minor ABI as 1.20.7 changed the minor ABI version |
||||||
|
(backward compatible, API addition in glamor) |
||||||
|
- Rebase Xwayland randr resolution change emulation support patches |
||||||
|
|
||||||
|
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.20.6-2 |
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild |
||||||
|
|
||||||
|
* Mon Nov 25 2019 Olivier Fourdan <ofourdan@redhat.com> - 1.20.6-1 |
||||||
|
- xserver 1.20.6 |
||||||
|
|
||||||
|
* Mon Nov 4 2019 Hans de Goede <hdegoede@redhat.com> - 1.20.5-9 |
||||||
|
- Fix building with new libglvnd-1.2.0 (E)GL headers and pkgconfig files |
||||||
|
|
||||||
|
* Mon Nov 4 2019 Hans de Goede <hdegoede@redhat.com> - 1.20.5-8 |
||||||
|
- Backport Xwayland randr resolution change emulation support |
||||||
|
|
||||||
|
* Thu Aug 29 2019 Olivier Fourdan <ofourdan@redhat.com> 1.20.5-7 |
||||||
|
- Pick latest fixes from xserver stable branch upstream (rhbz#1729925) |
||||||
|
|
||||||
|
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.20.5-6 |
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild |
||||||
|
|
||||||
|
* Mon Jul 8 2019 Olivier Fourdan <ofourdan@redhat.com> 1.20.5-5 |
||||||
|
- Do not include <sys/io.h> on ARM with glibc to avoid compilation failure. |
||||||
|
- Do not force vbe and int10 sdk headers as this enables int10 which does |
||||||
|
not build on ARM without <sys/io.h> |
||||||
|
|
||||||
|
* Mon Jul 8 2019 Olivier Fourdan <ofourdan@redhat.com> 1.20.5-4 |
||||||
|
- Fix regression causing screen tearing with upstream xserver 1.20.5 |
||||||
|
(rhbz#1726419) |
||||||
|
|
||||||
|
* Fri Jun 28 2019 Olivier Fourdan <ofourdan@redhat.com> 1.20.5-3 |
||||||
|
- Remove atomic downstream patches causing regressions (#1714981, #1723715) |
||||||
|
- Xwayland crashes (#1708119, #1691745) |
||||||
|
- Cursor issue with tablet on Xwayland |
||||||
|
- Xorg/modesetting issue with flipping pixmaps with Present (#1645553) |
||||||
|
|
||||||
|
* Thu Jun 06 2019 Peter Hutterer <peter.hutterer@redhat.com> 1.20.5-2 |
||||||
|
- Return AlreadyGrabbed for keycodes > 255 (#1697804) |
||||||
|
|
||||||
|
* Thu May 30 2019 Adam Jackson <ajax@redhat.com> - 1.20.5-1 |
||||||
|
- xserver 1.20.5 |
||||||
|
|
||||||
|
* Tue Apr 23 2019 Adam Jackson <ajax@redhat.com> - 1.20.4-4 |
||||||
|
- Fix some non-atomic modesetting calls to be atomic |
||||||
|
|
||||||
|
* Wed Mar 27 2019 Peter Hutterer <peter.hutterer@redhat.com> 1.20.4-3 |
||||||
|
- Fix a Qt scrolling bug, don't reset the valuator on slave switch |
||||||
|
|
||||||
|
* Thu Mar 21 2019 Adam Jackson <ajax@redhat.com> - 1.20.4-2 |
||||||
|
- Backport an Xwayland crash fix in the Present code |
||||||
|
|
||||||
|
* Tue Feb 26 2019 Adam Jackson <ajax@redhat.com> - 1.20.4-1 |
||||||
|
- xserver 1.20.4 |
||||||
|
|
||||||
|
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.20.3-4 |
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild |
||||||
|
|
||||||
|
* Fri Jan 11 2019 Olivier Fourdan <ofourdan@redhat.com> - 1.20.3-3 |
||||||
|
- More Xwayland/Present fixes from upstream (rhbz#1609181, rhbz#1661748) |
||||||
|
|
||||||
|
* Thu Dec 06 2018 Olivier Fourdan <ofourdan@redhat.com> - 1.20.3-2 |
||||||
|
- Xwayland/Present fixes from master upstream |
||||||
|
|
||||||
|
* Thu Nov 01 2018 Adam Jackson <ajax@redhat.com> - 1.20.3-1 |
||||||
|
- xserver 1.20.3 |
||||||
|
|
||||||
|
* Mon Oct 15 2018 Adam Jackson <ajax@redhat.com> - 1.20.2-1 |
||||||
|
- xserver 1.20.2 |
||||||
|
|
||||||
|
* Thu Oct 4 2018 Hans de Goede <hdegoede@redhat.com> - 1.20.1-4 |
||||||
|
- Rebase patch to use va_gl as vdpau driver on i965 GPUs, re-fix rhbz#1413733 |
||||||
|
|
||||||
|
* Thu Sep 13 2018 Dave Airlie <airlied@redhat.com> - 1.20.1-3 |
||||||
|
- Build with PIE enabled (this doesn't enable bind now) |
||||||
|
|
||||||
|
* Mon Sep 10 2018 Olivier Fourdan <ofourdan@redhat.com> - 1.20.1-2 |
||||||
|
- Include patches from upstream to fix Xwayland crashes |
||||||
|
|
||||||
|
* Thu Aug 09 2018 Adam Jackson <ajax@redhat.com> - 1.20.1-1 |
||||||
|
- xserver 1.20.1 |
||||||
|
|
||||||
|
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.20.0-5 |
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild |
||||||
|
|
||||||
|
* Tue Jun 12 2018 Adam Jackson <ajax@redhat.com> - 1.20.0-4 |
||||||
|
- Xorg and Xwayland Requires: libEGL |
||||||
|
|
||||||
|
* Fri Jun 01 2018 Adam Williamson <awilliam@redhat.com> - 1.20.0-3 |
||||||
|
- Backport fixes for RHBZ#1579067 |
||||||
|
|
||||||
|
* Wed May 16 2018 Adam Jackson <ajax@redhat.com> - 1.20.0-2 |
||||||
|
- Xorg Requires: xorg-x11-drv-libinput |
||||||
|
|
||||||
|
* Thu May 10 2018 Adam Jackson <ajax@redhat.com> - 1.20.0-1 |
||||||
|
- xserver 1.20 |
||||||
|
|
||||||
|
* Wed Apr 25 2018 Adam Jackson <ajax@redhat.com> - 1.19.99.905-2 |
||||||
|
- Fix xvfb-run's default depth to be 24 |
||||||
|
|
||||||
|
* Tue Apr 24 2018 Adam Jackson <ajax@redhat.com> - 1.19.99.905-1 |
||||||
|
- xserver 1.20 RC5 |
||||||
|
|
||||||
|
* Thu Apr 12 2018 Olivier Fourdan <ofourdan@redhat.com> - 1.19.99.904-2 |
||||||
|
- Re-fix "use type instead of which in xvfb-run (rhbz#1443357)" which |
||||||
|
was overridden inadvertently |
||||||
|
|
||||||
|
* Tue Apr 10 2018 Adam Jackson <ajax@redhat.com> - 1.19.99.904-1 |
||||||
|
- xserver 1.20 RC4 |
||||||
|
|
||||||
|
* Mon Apr 02 2018 Adam Jackson <ajax@redhat.com> - 1.19.99.903-1 |
||||||
|
- xserver 1.20 RC3 |
||||||
|
|
||||||
|
* Tue Feb 13 2018 Olivier Fourdan <ofourdan@redhat.com> 1.19.6-5 |
||||||
|
- xwayland: avoid race condition on new keymap |
||||||
|
- xwayland: Keep separate variables for pointer and tablet foci (rhbz#1519961) |
||||||
|
- xvfb-run now support command line option “--auto-display” |
||||||
|
|
||||||
|
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.19.6-4 |
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild |
||||||
|
|
||||||
|
* Tue Jan 30 2018 Olivier Fourdan <ofourdan@redhat.com> 1.19.6-3 |
||||||
|
- Avoid generating a core file when the Wayland compositor is gone. |
||||||
|
|
||||||
|
* Thu Jan 11 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.19.6-2 |
||||||
|
- Fix handling of devices with ID_INPUT=null |
||||||
|
|
||||||
|
* Wed Dec 20 2017 Adam Jackson <ajax@redhat.com> - 1.19.6-1 |
||||||
|
- xserver 1.19.6 |
||||||
|
|
||||||
|
* Thu Oct 12 2017 Adam Jackson <ajax@redhat.com> - 1.19.5-1 |
||||||
|
- xserver 1.19.5 |
||||||
|
|
||||||
|
* Thu Oct 05 2017 Olivier Fourdan <ofourdan@redhat.com> - 1.19.4-1 |
||||||
|
- xserver-1.19.4 |
||||||
|
- Backport tablet support for Xwayland |
||||||
|
|
||||||
|
* Fri Sep 08 2017 Troy Dawson <tdawson@redhat.com> - 1.19.3-9 |
||||||
|
- Cleanup spec file conditionals |
||||||
|
|
||||||
|
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.19.3-8 |
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild |
||||||
|
|
||||||
|
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.19.3-7 |
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild |
||||||
|
|
||||||
|
* Sun Jul 2 2017 Ville Skyttä <ville.skytta@iki.fi> - 1.19.3-6 |
||||||
|
- Use type instead of which in xvfb-run (rhbz#1443357) |
||||||
|
|
||||||
|
* Thu May 04 2017 Orion Poplawski <orion@cora.nwra.com> - 1.19.3-5 |
||||||
|
- Enable full build for s390/x |
||||||
|
|
||||||
|
* Mon Apr 24 2017 Ben Skeggs <bskeggs@redhat.com> - 1.19.3-4 |
||||||
|
- Default to xf86-video-modesetting on GeForce 8 and newer |
||||||
|
|
||||||
|
* Fri Apr 07 2017 Adam Jackson <ajax@redhat.com> - 1.19.3-3 |
||||||
|
- Inoculate against a versioning bug with libdrm 2.4.78 |
||||||
|
|
||||||
|
* Thu Mar 23 2017 Hans de Goede <hdegoede@redhat.com> - 1.19.3-2 |
||||||
|
- Use va_gl as vdpau driver on i965 GPUs (rhbz#1413733) |
||||||
|
|
||||||
|
* Wed Mar 15 2017 Adam Jackson <ajax@redhat.com> - 1.19.3-1 |
||||||
|
- xserver 1.19.3 |
||||||
|
|
||||||
|
* Thu Mar 02 2017 Adam Jackson <ajax@redhat.com> - 1.19.2-1 |
||||||
|
- xserver 1.19.2 |
||||||
|
|
||||||
|
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.19.1-4 |
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild |
||||||
|
|
||||||
|
* Wed Feb 01 2017 Peter Hutterer <peter.hutterer@redhat.com> 1.19.1-3 |
||||||
|
- Fix a few input thread lock issues causing intel crashes (#1384486) |
||||||
|
|
||||||
|
* Mon Jan 16 2017 Adam Jackson <ajax@redhat.com> - 1.19.1-2 |
||||||
|
- Limit the intel driver only on F26 and up |
||||||
|
|
||||||
|
* Wed Jan 11 2017 Adam Jackson <ajax@redhat.com> - 1.19.1-1 |
||||||
|
- xserver 1.19.1 |
||||||
|
|
||||||
|
* Tue Jan 10 2017 Hans de Goede <hdegoede@redhat.com> - 1.19.0-4 |
||||||
|
- Follow Debian and only default to the intel ddx on gen4 or older intel GPUs |
||||||
|
|
||||||
|
* Tue Dec 20 2016 Hans de Goede <hdegoede@redhat.com> - 1.19.0-3 |
||||||
|
- Add one more patch for better integration with the nvidia binary driver |
||||||
|
|
||||||
|
* Thu Dec 15 2016 Hans de Goede <hdegoede@redhat.com> - 1.19.0-2 |
||||||
|
- Add some patches for better integration with the nvidia binary driver |
||||||
|
- Add a patch from upstream fixing a crash (rhbz#1389886) |
||||||
|
|
||||||
|
* Wed Nov 23 2016 Olivier Fourdan <ofourdan@redhat.com> 1.19.0-1 |
||||||
|
- xserver 1.19.0 |
||||||
|
- Fix use after free of cursors in Xwayland (rhbz#1385258) |
||||||
|
- Fix an issue where some monitors would show only black, or |
||||||
|
partially black when secondary GPU outputs are used |
||||||
|
|
||||||
|
* Tue Nov 15 2016 Peter Hutterer <peter.hutterer@redhat.com> 1.19.0-0.8.rc2 |
||||||
|
- Update device barriers for new master devices (#1384432) |
||||||
|
|
||||||
|
* Thu Nov 3 2016 Hans de Goede <hdegoede@redhat.com> - 1.19.0-0.7.rc2 |
||||||
|
- Update to 1.19.0-rc2 |
||||||
|
- Fix (hopefully) various crashes in FlushAllOutput() (rhbz#1382444) |
||||||
|
- Fix Xwayland crashing in glamor on non glamor capable hw (rhbz#1390018) |
||||||
|
|
||||||
|
* Tue Nov 1 2016 Ben Crocker <bcrocker@redhat.com> - 1.19.0-0.6.20161028 |
||||||
|
- Fix Config record allocation during startup: if xorg.conf.d directory |
||||||
|
- was absent, a segfault resulted. |
||||||
|
|
||||||
|
* Mon Oct 31 2016 Adam Jackson <ajax@redhat.com> - 1.19.0-0.5.20161026 |
||||||
|
- Use %%autopatch instead of doing our own custom git-am trick |
||||||
|
|
||||||
|
* Fri Oct 28 2016 Hans de Goede <hdegoede@redhat.com> - 1.19.0-0.4.20161026 |
||||||
|
- Add missing Requires: libXfont2-devel to -devel sub-package (rhbz#1389711) |
||||||
|
|
||||||
|
* Wed Oct 26 2016 Hans de Goede <hdegoede@redhat.com> - 1.19.0-0.3.20161026 |
||||||
|
- Sync with upstream git, bringing in a bunch if bug-fixes |
||||||
|
- Add some extra fixes which are pending upstream |
||||||
|
- This also adds PointerWarping emulation to Xwayland, which should improve |
||||||
|
compatiblity with many games |
Loading…
Reference in new issue