Backport fixes for RHBZ#1579067
This commit is contained in:
parent
00b4ee574b
commit
a24c5faafd
@ -46,7 +46,7 @@
|
||||
Summary: X.Org X11 X server
|
||||
Name: xorg-x11-server
|
||||
Version: 1.20.0
|
||||
Release: 2%{?gitdate:.%{gitdate}}%{dist}
|
||||
Release: 3%{?gitdate:.%{gitdate}}%{dist}
|
||||
URL: http://www.x.org
|
||||
License: MIT
|
||||
Group: User Interface/X
|
||||
@ -94,6 +94,10 @@ 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
|
||||
|
||||
# new test fixes for RHBZ#1579067
|
||||
Patch7: xserver-1-2-glamor-Always-return-0-from-glamor_fds_from_pixmap-on-error.patch
|
||||
Patch8: xserver-2-2-glamor-Propagate-glamor_fds_from_pixmap-error-in-glamor_fd_from_pixmap.patch
|
||||
|
||||
BuildRequires: systemtap-sdt-devel
|
||||
BuildRequires: git
|
||||
BuildRequires: automake autoconf libtool pkgconfig
|
||||
@ -519,6 +523,9 @@ find %{inst_srcdir}/hw/xfree86 -name \*.c -delete
|
||||
|
||||
|
||||
%changelog
|
||||
* 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
|
||||
|
||||
|
@ -0,0 +1,54 @@
|
||||
From patchwork Wed May 23 09:43:32 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 8bit
|
||||
Subject: [xserver,
|
||||
1/2] glamor: Always return 0 from glamor_fds_from_pixmap on error
|
||||
From: =?utf-8?q?Michel_D=C3=A4nzer?= <michel@daenzer.net>
|
||||
X-Patchwork-Id: 224909
|
||||
Message-Id: <20180523094333.11076-1-michel@daenzer.net>
|
||||
To: =?UTF-8?q?Louis-Francis=20Ratt=C3=A9-Boulianne?= <lfrb@collabora.com>,
|
||||
Daniel Stone <daniels@collabora.com>
|
||||
Cc: xorg-devel@lists.x.org
|
||||
Date: Wed, 23 May 2018 11:43:32 +0200
|
||||
|
||||
From: Michel Dänzer <michel.daenzer@amd.com>
|
||||
|
||||
This matches what glamor_egl_fds_from_pixmap and dri3_fds_from_pixmap do
|
||||
and what proc_dri3_buffers_from_pixmap expects.
|
||||
|
||||
Fixes: c8c276c9569b "glamor: Implement PixmapFromBuffers and
|
||||
BuffersFromPixmap"
|
||||
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
|
||||
---
|
||||
glamor/glamor.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/glamor/glamor.c b/glamor/glamor.c
|
||||
index d984d20f3..e2c74d17a 100644
|
||||
--- a/glamor/glamor.c
|
||||
+++ b/glamor/glamor.c
|
||||
@@ -836,20 +836,20 @@ glamor_fds_from_pixmap(ScreenPtr screen, PixmapPtr pixmap, int *fds,
|
||||
glamor_get_screen_private(pixmap->drawable.pScreen);
|
||||
|
||||
if (!glamor_priv->dri3_enabled)
|
||||
- return -1;
|
||||
+ return 0;
|
||||
switch (pixmap_priv->type) {
|
||||
case GLAMOR_TEXTURE_DRM:
|
||||
case GLAMOR_TEXTURE_ONLY:
|
||||
if (!glamor_pixmap_ensure_fbo(pixmap, pixmap->drawable.depth == 30 ?
|
||||
GL_RGB10_A2 : GL_RGBA, 0))
|
||||
- return -1;
|
||||
+ return 0;
|
||||
return glamor_egl_fds_from_pixmap(screen, pixmap, fds,
|
||||
strides, offsets,
|
||||
modifier);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
- return -1;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
_X_EXPORT int
|
@ -0,0 +1,58 @@
|
||||
From patchwork Wed May 23 09:43:33 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 8bit
|
||||
Subject: [xserver, 2/2] glamor: Propagate glamor_fds_from_pixmap error in
|
||||
glamor_fd_from_pixmap
|
||||
From: =?utf-8?q?Michel_D=C3=A4nzer?= <michel@daenzer.net>
|
||||
X-Patchwork-Id: 224910
|
||||
Message-Id: <20180523094333.11076-2-michel@daenzer.net>
|
||||
To: =?UTF-8?q?Louis-Francis=20Ratt=C3=A9-Boulianne?= <lfrb@collabora.com>,
|
||||
Daniel Stone <daniels@collabora.com>
|
||||
Cc: xorg-devel@lists.x.org
|
||||
Date: Wed, 23 May 2018 11:43:33 +0200
|
||||
|
||||
From: Michel Dänzer <michel.daenzer@amd.com>
|
||||
|
||||
glamor_fds_from_pixmap returns 0 on error, but we were treating that as
|
||||
success, continuing with uninitialized stride and fd values.
|
||||
|
||||
Also bail if the offset isn't 0, same as in dri3_fd_from_pixmap.
|
||||
|
||||
Fixes: c8c276c9569b "glamor: Implement PixmapFromBuffers and
|
||||
BuffersFromPixmap"
|
||||
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
|
||||
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
|
||||
---
|
||||
glamor/glamor.c | 16 +++++++---------
|
||||
1 file changed, 7 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/glamor/glamor.c b/glamor/glamor.c
|
||||
index e2c74d17a..63f0947fa 100644
|
||||
--- a/glamor/glamor.c
|
||||
+++ b/glamor/glamor.c
|
||||
@@ -865,17 +865,15 @@ glamor_fd_from_pixmap(ScreenPtr screen,
|
||||
&modifier);
|
||||
|
||||
/* Pixmaps with multi-planes/modifier are not supported in this interface */
|
||||
- if (ret > 1) {
|
||||
- while (ret > 0)
|
||||
- close(fds[--ret]);
|
||||
- return -1;
|
||||
+ if (ret == 1 && offsets[0] == 0) {
|
||||
+ *stride = strides[0];
|
||||
+ *size = pixmap->drawable.height * *stride;
|
||||
+ return fds[0];
|
||||
}
|
||||
|
||||
- ret = fds[0];
|
||||
- *stride = strides[0];
|
||||
- *size = pixmap->drawable.height * *stride;
|
||||
-
|
||||
- return ret;
|
||||
+ while (ret > 0)
|
||||
+ close(fds[--ret]);
|
||||
+ return -1;
|
||||
}
|
||||
|
||||
_X_EXPORT int
|
Loading…
Reference in New Issue
Block a user