* Thu Aug 06 2009 Adam Jackson <ajax@redhat.com> 1.6.99-28.20090804

- xserver-1.6.99-dri2-crash-fixes.patch: don't cough and die just because
  the driver had the gall not to register a SwapBuffers handler.
This commit is contained in:
Adam Jackson 2009-08-06 18:05:30 +00:00
parent df08191552
commit 780d7d89a1
2 changed files with 32 additions and 1 deletions

View File

@ -19,7 +19,7 @@
Summary: X.Org X11 X server
Name: xorg-x11-server
Version: 1.6.99
Release: 27.%{gitdate}%{?dist}
Release: 28.%{gitdate}%{?dist}
URL: http://www.x.org
License: MIT
Group: User Interface/X
@ -79,6 +79,7 @@ Patch6027: xserver-1.6.0-displayfd.patch
Patch6028: xserver-1.6.99-randr-error-debugging.patch
Patch6029: xserver-1.6.1-proc-cmdline.patch
Patch6030: xserver-1.6.99-right-of.patch
Patch6031: xserver-1.6.99-dri2-crash-fixes.patch
%define moduledir %{_libdir}/xorg/modules
@ -527,6 +528,10 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Thu Aug 06 2009 Adam Jackson <ajax@redhat.com> 1.6.99-28.20090804
- xserver-1.6.99-dri2-crash-fixes.patch: don't cough and die just because
the driver had the gall not to register a SwapBuffers handler.
* Wed Aug 05 2009 Adam Jackson <ajax@redhat.com> 1.6.99-27.20090804
- xserver-1.6.99-vga-arb.patch: Fix crashes from miscompilation without
xorg-config.h.

View File

@ -0,0 +1,26 @@
From 6ba2c0f1e15b0dc6126c668461746d134b6e396d Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Wed, 5 Aug 2009 15:02:03 -0400
Subject: [PATCH] dri2: fix pageflipping code to not crash non-flipping drivers
---
hw/xfree86/dri2/dri2.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
index 7b9fb23..9958bca 100644
--- a/hw/xfree86/dri2/dri2.c
+++ b/hw/xfree86/dri2/dri2.c
@@ -392,7 +392,8 @@ DRI2SwapBuffers(DrawablePtr pDraw)
if (pSrcBuffer == NULL || pDestBuffer == NULL)
return BadValue;
- if (DRI2FlipCheck(pDraw) &&
+ if (ds->SwapBuffers &&
+ DRI2FlipCheck(pDraw) &&
(*ds->SwapBuffers)(pDraw, pDestBuffer, pSrcBuffer, pPriv))
{
pPriv->swapPending = TRUE;
--
1.6.4