1
0

Accepting request 20674 from X11:XOrg

Copy from X11:XOrg/xorg-x11-server based on submit request 20674 from user mhopf

OBS-URL: https://build.opensuse.org/request/show/20674
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/xorg-x11-server?expand=0&rev=141
This commit is contained in:
OBS User autobuild 2009-09-22 21:57:35 +00:00 committed by Git OBS Bridge
parent 6297a6f6ae
commit 19962694af
3 changed files with 13 additions and 60 deletions

View File

@ -1,68 +1,16 @@
From 1efa035209aea97d452d829e29af2e5f1ac94272 Mon Sep 17 00:00:00 2001
From: Matthias Hopf <mhopf@suse.de>
Date: Fri, 4 Sep 2009 17:32:45 +0200
Subject: [PATCH] Work around sporadic segfault on resume with intel/KMS due to cursor->bits == NULL.
Apparently SavedCursor is sometime tried to be set while already being set.
---
hw/xfree86/modes/xf86Cursors.c | 8 ++++++++
hw/xfree86/ramdac/xf86Cursor.c | 17 ++++++++++-------
2 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/hw/xfree86/modes/xf86Cursors.c b/hw/xfree86/modes/xf86Cursors.c
index 8c5a94c..3436636 100644
index fc4df84..385848b 100644
--- a/hw/xfree86/modes/xf86Cursors.c
+++ b/hw/xfree86/modes/xf86Cursors.c
@@ -461,6 +461,10 @@ xf86_use_hw_cursor (ScreenPtr screen, CursorPtr cursor)
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
+ if (xf86_config->cursor == cursor) {
+ xf86DrvMsg(index, X_ERROR, "Trying to set already set cursor.\n");
+ return FALSE;
+ }
if (xf86_config->cursor)
FreeCursor (xf86_config->cursor, None);
xf86_config->cursor = cursor;
@@ -480,6 +484,10 @@ xf86_use_hw_cursor_argb (ScreenPtr screen, CursorPtr cursor)
@@ -480,10 +480,10 @@ xf86_use_hw_cursor_argb (ScreenPtr screen, CursorPtr cursor)
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
+ if (xf86_config->cursor == cursor) {
+ xf86DrvMsg(index, X_ERROR, "Trying to set already set cursor.\n");
+ return FALSE;
+ }
+ ++cursor->refcnt;
if (xf86_config->cursor)
FreeCursor (xf86_config->cursor, None);
xf86_config->cursor = cursor;
diff --git a/hw/xfree86/ramdac/xf86Cursor.c b/hw/xfree86/ramdac/xf86Cursor.c
index 6b71f46..7aa7039 100644
--- a/hw/xfree86/ramdac/xf86Cursor.c
+++ b/hw/xfree86/ramdac/xf86Cursor.c
@@ -209,13 +209,16 @@ xf86CursorEnableDisableFBAccess(
xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
&pScreen->devPrivates, xf86CursorScreenKey);
- if (!enable && ScreenPriv->CurrentCursor != NullCursor) {
- CursorPtr currentCursor = ScreenPriv->CurrentCursor;
- xf86CursorSetCursor(pDev, pScreen, NullCursor, ScreenPriv->x,
- ScreenPriv->y);
- ScreenPriv->isUp = FALSE;
- ScreenPriv->SWCursor = TRUE;
- ScreenPriv->SavedCursor = currentCursor;
+ if (!enable) {
+ if (ScreenPriv->CurrentCursor != NullCursor) {
+ CursorPtr currentCursor = ScreenPriv->CurrentCursor;
+ xf86CursorSetCursor(pDev, pScreen, NullCursor, ScreenPriv->x,
+ ScreenPriv->y);
+ ScreenPriv->isUp = FALSE;
+ ScreenPriv->SWCursor = TRUE;
+ ScreenPriv->SavedCursor = currentCursor;
+ } else
+ ScreenPriv->SavedCursor = NULL;
}
if (ScreenPriv->EnableDisableFBAccess)
--
1.6.0.2
- ++cursor->refcnt;
/* Make sure ARGB support is available */
if ((cursor_info->Flags & HARDWARE_CURSOR_ARGB) == 0)

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Sep 21 16:46:38 CEST 2009 - mhopf@novell.com
- Less intrusive fix for server segfault. Should fix fdo #24010 (memleak).
-------------------------------------------------------------------
Thu Sep 10 15:44:07 CEST 2009 - sndirsch@suse.de

View File

@ -33,7 +33,7 @@ BuildRequires: libjpeg-devel
Url: http://xorg.freedesktop.org/
%define EXPERIMENTAL 0
Version: 7.4
Release: 53
Release: 54
License: GPL v2 or later ; MIT License (or similar)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Group: System/X11/Servers/XF86_4