xorg-server: sync relevant patches with Fedora.
Also enable by default --enable-glx-tls, it's currently ignored and has been removed completely for 1.18.
This commit is contained in:
parent
70f85f05cc
commit
5fce98bde0
8 changed files with 196 additions and 145 deletions
|
@ -0,0 +1,39 @@
|
|||
From 1f679da30a33f3ddad14bc6b2be0795160ae12b8 Mon Sep 17 00:00:00 2001
|
||||
From: Adam Jackson <ajax@redhat.com>
|
||||
Date: Thu, 9 Apr 2015 10:19:13 -0400
|
||||
Subject: [PATCH] include: Fix endianness setup
|
||||
|
||||
Need to make sure X_{BIG,LITTLE}_ENDIAN actually get defined
|
||||
|
||||
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
||||
---
|
||||
include/dix-config.h.in | 1 +
|
||||
include/xorg-server.h.in | 1 +
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
|
||||
index 1aa77a5..5e53c00 100644
|
||||
--- include/dix-config.h.in
|
||||
+++ include/dix-config.h.in
|
||||
@@ -499,6 +499,7 @@
|
||||
|
||||
/* byte order */
|
||||
#undef X_BYTE_ORDER
|
||||
+#include <X11/Xarch.h>
|
||||
|
||||
/* Listen on TCP socket */
|
||||
#undef LISTEN_TCP
|
||||
diff --git a/include/xorg-server.h.in b/include/xorg-server.h.in
|
||||
index 4cb9487..de6462a 100644
|
||||
--- include/xorg-server.h.in
|
||||
+++ include/xorg-server.h.in
|
||||
@@ -233,5 +233,6 @@
|
||||
|
||||
/* byte order */
|
||||
#undef X_BYTE_ORDER
|
||||
+#include <X11/Xarch.h>
|
||||
|
||||
#endif /* _XORG_SERVER_H_ */
|
||||
--
|
||||
2.1.0
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
From 2f3267bc017a420854dc98aac1526fb8f11b1874 Mon Sep 17 00:00:00 2001
|
||||
From: Adam Jackson <ajax@redhat.com>
|
||||
Date: Wed, 4 Mar 2015 12:44:39 -0500
|
||||
Subject: [PATCH] int10: Fix mapping the interrupt vector
|
||||
|
||||
pci_device_map_legacy returns 0 on success, and an errno value on
|
||||
failure. It works a lot better if we don't treat 0 as failure.
|
||||
|
||||
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
||||
---
|
||||
hw/xfree86/int10/generic.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hw/xfree86/int10/generic.c b/hw/xfree86/int10/generic.c
|
||||
index 012d194..8d5c4da 100644
|
||||
--- w/xfree86/int10/generic.c
|
||||
+++ hw/xfree86/int10/generic.c
|
||||
@@ -104,7 +104,7 @@ readIntVec(struct pci_device *dev, unsigned char *buf, int len)
|
||||
{
|
||||
void *map;
|
||||
|
||||
- if (!pci_device_map_legacy(dev, 0, len, 0, &map))
|
||||
+ if (pci_device_map_legacy(dev, 0, len, 0, &map))
|
||||
return FALSE;
|
||||
|
||||
memcpy(buf, map, len);
|
||||
--
|
||||
1.9.3
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
From 63e4f22d5fe3d4247cb48c969b5f7f2690665d78 Mon Sep 17 00:00:00 2001
|
||||
From: Adel Gadllah <adel.gadllah@gmail.com>
|
||||
Date: Fri, 1 May 2015 17:21:12 +0200
|
||||
Subject: [PATCH] modesetting: Fix software cursor fallback
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The code in drmmode_set_cursor does not properly handle the case where
|
||||
drmModeSetCursor2 returns any other error than EINVAL and silently fails to set
|
||||
a cursor.
|
||||
|
||||
So only return when the drmModeSetCursor2 succeeds (i.e returns 0) and disable
|
||||
the cursor2 usage on EINVAL.
|
||||
|
||||
References: https://bugzilla.redhat.com/show_bug.cgi?id=1205725
|
||||
Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com>
|
||||
Reviewed-by: Michel Dänzer <michel@daenzer.net>
|
||||
---
|
||||
hw/xfree86/drivers/modesetting/drmmode_display.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
|
||||
index 824500b..912abda 100644
|
||||
--- hw/xfree86/drivers/modesetting/drmmode_display.c
|
||||
+++ hw/xfree86/drivers/modesetting/drmmode_display.c
|
||||
@@ -396,10 +396,10 @@ drmmode_set_cursor(xf86CrtcPtr crtc)
|
||||
drmModeSetCursor2(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id,
|
||||
handle, ms->cursor_width, ms->cursor_height,
|
||||
cursor->bits->xhot, cursor->bits->yhot);
|
||||
+ if (!ret)
|
||||
+ return;
|
||||
if (ret == -EINVAL)
|
||||
use_set_cursor2 = FALSE;
|
||||
- else
|
||||
- return;
|
||||
}
|
||||
|
||||
ret = drmModeSetCursor(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, handle,
|
||||
--
|
||||
2.1.0
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
From 6b617438442aee010ae69e1134b5a6f34cbdc9fd Mon Sep 17 00:00:00 2001
|
||||
From: Dave Airlie <airlied@redhat.com>
|
||||
Date: Tue, 17 Feb 2015 14:38:21 +1000
|
||||
Subject: [PATCH] os/access: fix regression in server interpreted auth
|
||||
|
||||
This was reported on irc on Fedora when rawhide went to 1.17.1.
|
||||
|
||||
regression occured in: 2566835b4374edb3e5a8353d4f7c9e7ec4851c57
|
||||
os: Eliminate uninitialized value warnings from access.c
|
||||
|
||||
siAddrMatch doesn't need addr to be a useful value, it checks
|
||||
some things like localuser without having an address at all.
|
||||
|
||||
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
||||
---
|
||||
os/access.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/os/access.c b/os/access.c
|
||||
index 28f2d32..8fa028e 100644
|
||||
--- os/access.c
|
||||
+++ os/access.c
|
||||
@@ -1392,7 +1392,7 @@ InvalidHost(register struct sockaddr *saddr, int len, ClientPtr client)
|
||||
}
|
||||
for (host = validhosts; host; host = host->next) {
|
||||
if (host->family == FamilyServerInterpreted) {
|
||||
- if (addr && siAddrMatch(family, addr, len, host, client)) {
|
||||
+ if (siAddrMatch(family, addr, len, host, client)) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
--
|
||||
1.9.3
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
From df3b03e05b5c826584fc75466f404b53844edcf4 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Wilson <chris@chris-wilson.co.uk>
|
||||
Date: Thu, 5 Feb 2015 14:11:40 -0500
|
||||
Subject: [PATCH] present: Copy unflip contents back to the Screen Pixmap
|
||||
|
||||
As we unflip after the flip Window no longer passes the pixel ownership
|
||||
test for the full Screen Pixmap, we can no longer utilize that Window to
|
||||
copy the contents back to the backing pixmap. To first flip means that
|
||||
the Window was originally backed by the Screen Pixmap and wholly covered
|
||||
the Pixmap, thus we need to copy the last frame contents to the Screen
|
||||
Pixmap when the flip chain is complete.
|
||||
|
||||
---
|
||||
present/present.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/present/present.c b/present/present.c
|
||||
index 8e4829e..a516575 100644
|
||||
--- present/present.c
|
||||
+++ present/present.c
|
||||
@@ -377,20 +377,20 @@ present_set_tree_pixmap(WindowPtr window, PixmapPtr pixmap)
|
||||
present_unflip(ScreenPtr screen)
|
||||
{
|
||||
present_screen_priv_ptr screen_priv = present_screen_priv(screen);
|
||||
+ PixmapPtr pixmap = (*screen->GetScreenPixmap)(screen);
|
||||
|
||||
assert (!screen_priv->unflip_event_id);
|
||||
assert (!screen_priv->flip_pending);
|
||||
|
||||
if (screen_priv->flip_window)
|
||||
- present_set_tree_pixmap(screen_priv->flip_window,
|
||||
- (*screen->GetScreenPixmap)(screen));
|
||||
+ present_set_tree_pixmap(screen_priv->flip_window, pixmap);
|
||||
|
||||
- present_set_tree_pixmap(screen->root, (*screen->GetScreenPixmap)(screen));
|
||||
+ present_set_tree_pixmap(screen->root, pixmap);
|
||||
|
||||
/* Update the screen pixmap with the current flip pixmap contents
|
||||
*/
|
||||
if (screen_priv->flip_pixmap && screen_priv->flip_window) {
|
||||
- present_copy_region(&screen_priv->flip_window->drawable,
|
||||
+ present_copy_region(&pixmap->drawable,
|
||||
screen_priv->flip_pixmap,
|
||||
NULL, 0, 0);
|
||||
}
|
||||
--
|
||||
2.1.0
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
From 0a78b599b34cc8b5fe6fe82f90e90234e8ab7a56 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?J=C3=BCrg=20Billeter?= <j@bitron.ch>
|
||||
Date: Sat, 7 Feb 2015 18:13:21 +0100
|
||||
Subject: int10: Fix error check for pci_device_map_legacy
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
pci_device_map_legacy returns 0 on success.
|
||||
|
||||
Signed-off-by: Jürg Billeter <j@bitron.ch>
|
||||
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
|
||||
diff --git a/hw/xfree86/int10/generic.c b/hw/xfree86/int10/generic.c
|
||||
index 012d194..8d5c4da 100644
|
||||
--- hw/xfree86/int10/generic.c
|
||||
+++ hw/xfree86/int10/generic.c
|
||||
@@ -104,7 +104,7 @@ readIntVec(struct pci_device *dev, unsigned char *buf, int len)
|
||||
{
|
||||
void *map;
|
||||
|
||||
- if (!pci_device_map_legacy(dev, 0, len, 0, &map))
|
||||
+ if (pci_device_map_legacy(dev, 0, len, 0, &map))
|
||||
return FALSE;
|
||||
|
||||
memcpy(buf, map, len);
|
||||
diff --git a/hw/xfree86/os-support/linux/int10/linux.c b/hw/xfree86/os-support/linux/int10/linux.c
|
||||
index 79b9a88..6ca118f 100644
|
||||
--- hw/xfree86/os-support/linux/int10/linux.c
|
||||
+++ hw/xfree86/os-support/linux/int10/linux.c
|
||||
@@ -75,7 +75,7 @@ readLegacy(struct pci_device *dev, unsigned char *buf, int base, int len)
|
||||
{
|
||||
void *map;
|
||||
|
||||
- if (!pci_device_map_legacy(dev, base, len, 0, &map))
|
||||
+ if (pci_device_map_legacy(dev, base, len, 0, &map))
|
||||
return FALSE;
|
||||
|
||||
memcpy(buf, map, len);
|
||||
--
|
||||
cgit v0.10.2
|
||||
|
|
@ -1,92 +0,0 @@
|
|||
Submitted By: Pierre Labastie <pierre at linuxfromscratch dot org>
|
||||
Date: 2015-02-28
|
||||
Initial Package Version: 1.17.1
|
||||
Upstream Status: submitted and partly reviewed
|
||||
Origin: Takashi Iwai <tiwai at suse.de>
|
||||
Description: Fix 32 bit breakage and mouse pointer disappearing.
|
||||
|
||||
--- hw/xfree86/drivers/modesetting/drmmode_display.c 2015-01-30 14:09:13.000000000 +0100
|
||||
+++ hw/xfree86/drivers/modesetting/drmmode_display.c 2015-02-28 17:57:23.932964255 +0100
|
||||
@@ -409,7 +409,7 @@
|
||||
drmModeMoveCursor(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, x, y);
|
||||
}
|
||||
|
||||
-static void
|
||||
+static Bool
|
||||
drmmode_set_cursor(xf86CrtcPtr crtc)
|
||||
{
|
||||
drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
|
||||
@@ -427,10 +427,10 @@
|
||||
drmModeSetCursor2(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id,
|
||||
handle, ms->cursor_width, ms->cursor_height,
|
||||
cursor->bits->xhot, cursor->bits->yhot);
|
||||
- if (ret == -EINVAL)
|
||||
+ if (ret)
|
||||
use_set_cursor2 = FALSE;
|
||||
else
|
||||
- return;
|
||||
+ return TRUE;
|
||||
}
|
||||
|
||||
ret = drmModeSetCursor(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, handle,
|
||||
@@ -443,16 +443,21 @@
|
||||
cursor_info->MaxWidth = cursor_info->MaxHeight = 0;
|
||||
drmmode_crtc->drmmode->sw_cursor = TRUE;
|
||||
/* fallback to swcursor */
|
||||
+ return FALSE;
|
||||
}
|
||||
+ return TRUE;
|
||||
}
|
||||
|
||||
-static void
|
||||
-drmmode_load_cursor_argb(xf86CrtcPtr crtc, CARD32 *image)
|
||||
+static void drmmode_hide_cursor(xf86CrtcPtr crtc);
|
||||
+
|
||||
+static Bool
|
||||
+drmmode_load_cursor_argb_check(xf86CrtcPtr crtc, CARD32 *image)
|
||||
{
|
||||
modesettingPtr ms = modesettingPTR(crtc->scrn);
|
||||
drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
|
||||
int i;
|
||||
uint32_t *ptr;
|
||||
+ static Bool first_time = TRUE;
|
||||
|
||||
/* cursor should be mapped already */
|
||||
ptr = (uint32_t *) (drmmode_crtc->cursor_bo->ptr);
|
||||
@@ -460,8 +465,14 @@
|
||||
for (i = 0; i < ms->cursor_width * ms->cursor_height; i++)
|
||||
ptr[i] = image[i]; // cpu_to_le32(image[i]);
|
||||
|
||||
- if (drmmode_crtc->cursor_up)
|
||||
- drmmode_set_cursor(crtc);
|
||||
+ if (drmmode_crtc->cursor_up || first_time) {
|
||||
+ Bool ret = drmmode_set_cursor(crtc);
|
||||
+ if (!drmmode_crtc->cursor_up)
|
||||
+ drmmode_hide_cursor(crtc);
|
||||
+ first_time = FALSE;
|
||||
+ return ret;
|
||||
+ }
|
||||
+ return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -665,7 +676,7 @@
|
||||
.set_cursor_position = drmmode_set_cursor_position,
|
||||
.show_cursor = drmmode_show_cursor,
|
||||
.hide_cursor = drmmode_hide_cursor,
|
||||
- .load_cursor_argb = drmmode_load_cursor_argb,
|
||||
+ .load_cursor_argb_check = drmmode_load_cursor_argb_check,
|
||||
|
||||
.gamma_set = drmmode_crtc_gamma_set,
|
||||
.destroy = NULL, /* XXX */
|
||||
--- hw/xfree86/drivers/modesetting/dumb_bo.c 2015-01-18 00:42:52.000000000 +0100
|
||||
+++ hw/xfree86/drivers/modesetting/dumb_bo.c 2015-02-28 17:53:22.028967314 +0100
|
||||
@@ -25,6 +25,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
+#define _FILE_OFFSET_BITS 64
|
||||
+
|
||||
#include "dumb_bo.h"
|
||||
|
||||
#include <errno.h>
|
|
@ -1,7 +1,7 @@
|
|||
# Template build file for 'xorg-server'.
|
||||
pkgname=xorg-server
|
||||
version=1.17.1
|
||||
revision=13
|
||||
revision=14
|
||||
build_pie=yes
|
||||
build_style=gnu-configure
|
||||
configure_args="--enable-ipv6 --enable-record --enable-xorg
|
||||
|
@ -44,18 +44,12 @@ replaces="xf86-video-modesetting>=0"
|
|||
build_options="systemd"
|
||||
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
i686|x86_64)
|
||||
# Enable glx-tls/glamor/dri/opengl by default on x86/glibc.
|
||||
i686*|x86_64*)
|
||||
# Enable glamor/dri/opengl by default on x86.
|
||||
configure_args+=" --enable-glamor --enable-dri2 --enable-dri3 --enable-glx-tls --enable-glx"
|
||||
makedepends+=" MesaLib-devel"
|
||||
replaces+=" glamor-egl>=0"
|
||||
;;
|
||||
i686-musl|x86_64-musl)
|
||||
# Enable glx/glamor/dri/opengl by default on x86/musl.
|
||||
configure_args+=" --enable-glamor --enable-dri2 --enable-dri3 --disable-glx-tls --enable-glx"
|
||||
makedepends+=" MesaLib-devel"
|
||||
replaces+=" glamor-egl>=0"
|
||||
;;
|
||||
*)
|
||||
# Enable dri2 on !x86 via libdri.
|
||||
configure_args+=" --disable-glx --disable-dri --enable-dri2 --enable-dri3"
|
||||
|
@ -68,7 +62,7 @@ conf_files="/etc/X11/Xwrapper.config"
|
|||
pre_configure() {
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
*-musl)
|
||||
export CFLAGS+=" -D__uid_t=uid_t -D__gid_t=gid_t -D_GNU_SOURCE"
|
||||
export CFLAGS+=" -D__uid_t=uid_t -D__gid_t=gid_t"
|
||||
sed -i -e 's/termio.h/termios.h/' hw/xfree86/os-support/xf86_OSlib.h
|
||||
;;
|
||||
esac
|
||||
|
|
Loading…
Reference in a new issue