Excerpts from Alan Swanson's message of Mon Sep 28 10:18:29 -0700 2009:

> And has also broken xf86-video-ati with exactly the same backtrace and
> probably every DGA supporting driver is also broken. Quality testing and
> not really what you want in stable release... :-/

Oops. And here I thought I'd tested both combinations... Mea culpa

Can someone else try this patch and see if it fixes things?

>From 7d0b82a1c2c5bab03df093370cb4b90d3958bc3e Mon Sep 17 00:00:00 2001
From: Keith Packard <[email protected]>
Date: Mon, 28 Sep 2009 12:39:47 -0700
Subject: [PATCH] Re-fix DGA removal.

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.

Signed-off-by: Keith Packard <[email protected]>
---
 hw/xfree86/modes/xf86Crtc.c  |    4 ++--
 hw/xfree86/modes/xf86Crtc.h  |    8 ++++++++
 hw/xfree86/modes/xf86DiDGA.c |   15 ++++++++++++---
 3 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 899cea5..4f31511 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -770,7 +770,7 @@ xf86CrtcScreenInit (ScreenPtr screen)
     screen->CloseScreen = xf86CrtcCloseScreen;
     
 #ifdef XFreeXDGA
-    xf86DiDGAInit(screen, 0);
+    _xf86_di_dga_init_for_reals(screen);
 #endif
 #ifdef RANDR_13_INTERFACE
     return RANDR_INTERFACE_VERSION;
@@ -1887,7 +1887,7 @@ xf86SetScrnInfoModes (ScrnInfoPtr scrn)
     scrn->currentMode = scrn->modes;
 #ifdef XFreeXDGA
     if (scrn->pScreen)
-           xf86DiDGAReInit(scrn->pScreen);
+           _xf86_di_dga_reinit_for_reals(scrn->pScreen);
 #endif
 }
 
diff --git a/hw/xfree86/modes/xf86Crtc.h b/hw/xfree86/modes/xf86Crtc.h
index 0a596bc..886408a 100644
--- a/hw/xfree86/modes/xf86Crtc.h
+++ b/hw/xfree86/modes/xf86Crtc.h
@@ -807,6 +807,10 @@ xf86OutputGetEDID (xf86OutputPtr output, I2CBusPtr 
pDDCBus);
 Bool
 xf86DiDGAInit (ScreenPtr pScreen, unsigned long dga_address);
 
+/* this is the real function, used only internally */
+Bool
+_xf86_di_dga_init_for_reals (ScreenPtr pScreen);
+
 /**
  * Re-initialize dga for this screen (as when the set of modes changes)
  */
@@ -814,6 +818,10 @@ xf86DiDGAInit (ScreenPtr pScreen, unsigned long 
dga_address);
 Bool
 xf86DiDGAReInit (ScreenPtr pScreen);
 
+/* This is the real function, used only internally */
+Bool
+_xf86_di_dga_reinit_for_reals (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 3992c09..8602eef 100644
--- a/hw/xfree86/modes/xf86DiDGA.c
+++ b/hw/xfree86/modes/xf86DiDGA.c
@@ -175,6 +175,12 @@ static DGAFunctionRec xf86_dga_funcs = {
 _X_EXPORT Bool
 xf86DiDGAReInit (ScreenPtr pScreen)
 {
+    return TRUE;
+}
+
+Bool
+_xf86_di_dga_reinit_for_reals (ScreenPtr pScreen)
+{
     ScrnInfoPtr                scrn = xf86Screens[pScreen->myNum];
     xf86CrtcConfigPtr   xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
     
@@ -190,12 +196,15 @@ xf86DiDGAReInit (ScreenPtr pScreen)
 _X_EXPORT Bool
 xf86DiDGAInit (ScreenPtr pScreen, unsigned long dga_address)
 {
+    return TRUE;
+}
+
+Bool
+_xf86_di_dga_init_for_reals (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.6.4.3

-- 
[email protected]

Attachment: signature.asc
Description: PGP signature

_______________________________________________
xorg mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/xorg

Reply via email to