forked from pool/xorg-x11-server
Accepting request 22294 from X11:XOrg
Copy from X11:XOrg/xorg-x11-server based on submit request 22294 from user sndirsch OBS-URL: https://build.opensuse.org/request/show/22294 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/xorg-x11-server?expand=0&rev=147
This commit is contained in:
parent
e2ca29cba8
commit
16f8af538f
@ -1,147 +0,0 @@
|
||||
Removing DGA ended up breaking any drivers calling into the old
|
||||
xf86DiDGAInit function as it tried to see if DGA was already enabled
|
||||
and ended up crashing if the VT wasn't completely initialized. Oops.
|
||||
|
||||
Also, if the driver initializes DGA itself, have the DiDGA
|
||||
initialization overwrite that information as the DiDGA code will call
|
||||
ReInit on mode detect.
|
||||
|
||||
Signed-off-by: Keith Packard <keithp@keithp.com>
|
||||
---
|
||||
hw/xfree86/common/xf86DGA.c | 29 ++++++++++++++++-------------
|
||||
hw/xfree86/modes/xf86Crtc.c | 4 ++--
|
||||
hw/xfree86/modes/xf86Crtc.h | 8 ++++++++
|
||||
hw/xfree86/modes/xf86DiDGA.c | 15 ++++++++++++---
|
||||
4 files changed, 38 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c
|
||||
index 42b7c58..804fd37 100644
|
||||
--- a/hw/xfree86/common/xf86DGA.c
|
||||
+++ b/hw/xfree86/common/xf86DGA.c
|
||||
@@ -120,8 +120,22 @@ DGAInit(
|
||||
|
||||
DGAScreenKey = &DGAScreenKeyIndex;
|
||||
|
||||
- if(!(pScreenPriv = (DGAScreenPtr)xalloc(sizeof(DGAScreenRec))))
|
||||
- return FALSE;
|
||||
+ pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen);
|
||||
+
|
||||
+ if (!pScreenPriv)
|
||||
+ {
|
||||
+ if(!(pScreenPriv = (DGAScreenPtr)xalloc(sizeof(DGAScreenRec))))
|
||||
+ return FALSE;
|
||||
+ dixSetPrivate(&pScreen->devPrivates, DGAScreenKey, pScreenPriv);
|
||||
+ pScreenPriv->CloseScreen = pScreen->CloseScreen;
|
||||
+ pScreen->CloseScreen = DGACloseScreen;
|
||||
+ pScreenPriv->DestroyColormap = pScreen->DestroyColormap;
|
||||
+ pScreen->DestroyColormap = DGADestroyColormap;
|
||||
+ pScreenPriv->InstallColormap = pScreen->InstallColormap;
|
||||
+ pScreen->InstallColormap = DGAInstallColormap;
|
||||
+ pScreenPriv->UninstallColormap = pScreen->UninstallColormap;
|
||||
+ pScreen->UninstallColormap = DGAUninstallColormap;
|
||||
+ }
|
||||
|
||||
pScreenPriv->pScrn = pScrn;
|
||||
pScreenPriv->numModes = num;
|
||||
@@ -146,17 +160,6 @@ DGAInit(
|
||||
modes[i].flags &= ~DGA_PIXMAP_AVAILABLE;
|
||||
#endif
|
||||
|
||||
- dixSetPrivate(&pScreen->devPrivates, DGAScreenKey, pScreenPriv);
|
||||
- pScreenPriv->CloseScreen = pScreen->CloseScreen;
|
||||
- pScreen->CloseScreen = DGACloseScreen;
|
||||
- pScreenPriv->DestroyColormap = pScreen->DestroyColormap;
|
||||
- pScreen->DestroyColormap = DGADestroyColormap;
|
||||
- pScreenPriv->InstallColormap = pScreen->InstallColormap;
|
||||
- pScreen->InstallColormap = DGAInstallColormap;
|
||||
- pScreenPriv->UninstallColormap = pScreen->UninstallColormap;
|
||||
- pScreen->UninstallColormap = DGAUninstallColormap;
|
||||
-
|
||||
-
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
|
||||
index c1e31e0..506fbb9 100644
|
||||
--- a/hw/xfree86/modes/xf86Crtc.c
|
||||
+++ b/hw/xfree86/modes/xf86Crtc.c
|
||||
@@ -806,7 +806,7 @@ xf86CrtcScreenInit (ScreenPtr screen)
|
||||
screen->CloseScreen = xf86CrtcCloseScreen;
|
||||
|
||||
#ifdef XFreeXDGA
|
||||
- xf86DiDGAInit(screen, 0);
|
||||
+ _xf86_di_dga_init_internal(screen);
|
||||
#endif
|
||||
#ifdef RANDR_13_INTERFACE
|
||||
return RANDR_INTERFACE_VERSION;
|
||||
@@ -1928,7 +1928,7 @@ xf86SetScrnInfoModes (ScrnInfoPtr scrn)
|
||||
scrn->currentMode = scrn->modes;
|
||||
#ifdef XFreeXDGA
|
||||
if (scrn->pScreen)
|
||||
- xf86DiDGAReInit(scrn->pScreen);
|
||||
+ _xf86_di_dga_reinit_internal(scrn->pScreen);
|
||||
#endif
|
||||
}
|
||||
|
||||
diff --git a/hw/xfree86/modes/xf86Crtc.h b/hw/xfree86/modes/xf86Crtc.h
|
||||
index 69afaa5..9baa956 100644
|
||||
--- a/hw/xfree86/modes/xf86Crtc.h
|
||||
+++ b/hw/xfree86/modes/xf86Crtc.h
|
||||
@@ -833,6 +833,10 @@ xf86OutputGetEDID (xf86OutputPtr output, I2CBusPtr pDDCBus);
|
||||
extern _X_EXPORT Bool
|
||||
xf86DiDGAInit (ScreenPtr pScreen, unsigned long dga_address);
|
||||
|
||||
+/* this is the real function, used only internally */
|
||||
+_X_INTERNAL Bool
|
||||
+_xf86_di_dga_init_internal (ScreenPtr pScreen);
|
||||
+
|
||||
/**
|
||||
* Re-initialize dga for this screen (as when the set of modes changes)
|
||||
*/
|
||||
@@ -841,6 +845,10 @@ extern _X_EXPORT Bool
|
||||
xf86DiDGAReInit (ScreenPtr pScreen);
|
||||
#endif
|
||||
|
||||
+/* This is the real function, used only internally */
|
||||
+_X_INTERNAL Bool
|
||||
+_xf86_di_dga_reinit_internal (ScreenPtr pScreen);
|
||||
+
|
||||
/*
|
||||
* Set the subpixel order reported for the screen using
|
||||
* the information from the outputs
|
||||
diff --git a/hw/xfree86/modes/xf86DiDGA.c b/hw/xfree86/modes/xf86DiDGA.c
|
||||
index 0f7b834..60fbdbf 100644
|
||||
--- a/hw/xfree86/modes/xf86DiDGA.c
|
||||
+++ b/hw/xfree86/modes/xf86DiDGA.c
|
||||
@@ -175,6 +175,12 @@ static DGAFunctionRec xf86_dga_funcs = {
|
||||
Bool
|
||||
xf86DiDGAReInit (ScreenPtr pScreen)
|
||||
{
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
+Bool
|
||||
+_xf86_di_dga_reinit_internal (ScreenPtr pScreen)
|
||||
+{
|
||||
ScrnInfoPtr scrn = xf86Screens[pScreen->myNum];
|
||||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
|
||||
@@ -190,12 +196,15 @@ xf86DiDGAReInit (ScreenPtr pScreen)
|
||||
Bool
|
||||
xf86DiDGAInit (ScreenPtr pScreen, unsigned long dga_address)
|
||||
{
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
+Bool
|
||||
+_xf86_di_dga_init_internal (ScreenPtr pScreen)
|
||||
+{
|
||||
ScrnInfoPtr scrn = xf86Screens[pScreen->myNum];
|
||||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
|
||||
- if (DGAAvailable(pScreen->myNum))
|
||||
- return TRUE;
|
||||
-
|
||||
xf86_config->dga_flags = 0;
|
||||
xf86_config->dga_address = 0;
|
||||
xf86_config->dga_width = 0;
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9c736d4c0246a6f2214a2f2c1a6fa9e2bf860f7785bf469de575529851fc1145
|
||||
size 4679094
|
3
xorg-server-1.6.5.tar.bz2
Normal file
3
xorg-server-1.6.5.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f3c0e43cf73e7d438350016cabd9957dc000ded9c5fdeebf84a02df61963b2ce
|
||||
size 4678406
|
@ -1,3 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 12 16:48:47 CEST 2009 - sndirsch@suse.de
|
||||
|
||||
- xorg-server 1.6.5
|
||||
* This release fixes the fact that 1.6.4 would crash on drivers
|
||||
that still tried to initialize the DGA extension. It also has
|
||||
a minor improvement for Xephyr to support nesting within an
|
||||
existing window at a different depth.
|
||||
- obsoletes dga-removal-fix.diff
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 9 03:38:53 CEST 2009 - sndirsch@suse.de
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
%define moblin 0
|
||||
|
||||
Name: xorg-x11-server
|
||||
%define dirsuffix 1.6.4
|
||||
%define dirsuffix 1.6.5
|
||||
%define fglrx_driver_hack 0
|
||||
### FIXME
|
||||
%define vnc 1
|
||||
@ -33,7 +33,7 @@ BuildRequires: libjpeg-devel
|
||||
Url: http://xorg.freedesktop.org/
|
||||
%define EXPERIMENTAL 0
|
||||
Version: 7.4
|
||||
Release: 59
|
||||
Release: 60
|
||||
License: GPL v2 or later ; MIT License (or similar)
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Group: System/X11/Servers/XF86_4
|
||||
@ -138,7 +138,6 @@ Patch171: moblin-use_preferred_mode_for_all_outputs.diff
|
||||
Patch190: 0001-Unclaim-PCI-slot-if-driver-probing-fails.patch
|
||||
Patch191: 0001-Fix-sporadic-segfault-on-resume-with-intel-KMS-due-t.patch
|
||||
Patch200: bug534768-prefer_local_symbols.patch
|
||||
Patch201: dga-removal-fix.diff
|
||||
Patch532341: bug532341.diff
|
||||
Patch202: 0001-Check-harder-for-primary-PCI-device.patch
|
||||
Patch203: 0001-Fix-segfault-when-killing-X-with-ctrl-alt-backspace.patch
|
||||
@ -284,7 +283,6 @@ popd
|
||||
%patch190 -p1
|
||||
%patch191 -p1
|
||||
%patch200 -p1
|
||||
%patch201 -p1
|
||||
%patch532341 -p1
|
||||
%patch202 -p1
|
||||
%patch203 -p1
|
||||
|
Loading…
Reference in New Issue
Block a user