[ANNOUNCE] xorg-server 1.6.4
Paulo Zanoni
przanoni at gmail.com
Tue Sep 29 10:57:13 PDT 2009
Hi
I have tried 1.6.4 + my distro's patches and it segfaults at the DGA stuff.
Then I added keith's patch and it still segfaults (but now it doesn't
print on the log and seems to freeze the machine. the only way to
detect the segfault is to ssh the machine and then run X).
Pasting IRC log since I'm lazy:
<pzanoni> jcristau: MrCooper: the package i'm using is not exactly the
upstream package (it's 1.6.4 + keithp's patch + the distro's patches)
and here is the backtrace: http://pastebin.com/m33f8b2ca
<pzanoni> and it keeps printing forever that same line on the backtrace
* jeremyhu saiu ("Leaving")
<jcristau> looks very much like stack overflow
<pzanoni> looks like the function is calling itself
<jcristau> or some other fun stack corruption.
<MrCooper> yeah, infinite recursion
<MrCooper> pzanoni: please follow up to keithp's patch post with this
information
<keithp> sure looks like DGA is getting mis-connected
<jcristau> DGAInit called twice?
<keithp> yeah
<keithp> dunno how that could happen though
<jcristau> pzanoni: put a breakpoint on DGAInit, see where it's called from?
<keithp> yeah, if the driver calls DGAInit, bad things will happen
<pzanoni> Breakpoint 1, DGAInit (pScreen=0x9396310, funcs=0x937b26c,
modes=0x939c810,
<pzanoni> num=63) at xf86DGA.c:110
<pzanoni> 110 ){
<pzanoni> (gdb) bt
<pzanoni> #0 DGAInit (pScreen=0x9396310, funcs=0x937b26c,
modes=0x939c810, num=63)
<pzanoni> at xf86DGA.c:110
<pzanoni> #1 0xb79f333b in RADEONDGAInit ()
<pzanoni> from /usr/lib/xorg/modules/drivers//radeon_drv.so
<pzanoni> #2 0xb79fed10 in RADEONScreenInit ()
<pzanoni> from /usr/lib/xorg/modules/drivers//radeon_drv.so
<pzanoni> #3 0x0806cae9 in AddScreen (pfnInit=0xb79fd210
<RADEONScreenInit>, argc=1,
<pzanoni> argv=0xbffaad64) at main.c:703
<pzanoni> #4 0x080ad133 in InitOutput (pScreenInfo=0x821f1e0, argc=1,
argv=0xbffaad64)
<pzanoni> at xf86Init.c:1256
<pzanoni> #5 0x0806d1d0 in main (argc=1, argv=0xbffaad64,
envp=0xbffaad6c) at main.c:316
<keithp> oops
<MrCooper> the radeon driver releases certainly do call it
<keithp> MrCooper: does radeon support framebuffer resize?
<MrCooper> only with KMS, which isn't released yet
<keithp> ok.
<keithp> framebuffer resize means DGA will crash your machine
<MrCooper> the current Git code no longer calls any *DGAInit
<keithp> MrCooper: very sensible
<pzanoni> ati 6.12.4, /proc/config.gz tells me CONFIG_DRM_RADEON_KMS is not set
<keithp> MrCooper: should be easy to work around; just make DGAInit
check for an existing private
<MrCooper> cool
<keithp> Frankly, I think I'll make the xf86DiDGA override the radeon DGA code
<keithp> as the DiDGA code will always re-initialize it on mode switch
* efw saiu (Read error: 110 (Connection timed out))
<pzanoni> do I still need to send the email? =P
* rnoland saiu (Remote closed the connection)
<keithp> pzanoni: please, I'll reply with an amended patch
On Mon, Sep 28, 2009 at 6:39 PM, Keith Packard <keithp at keithp.com> wrote:
> Excerpts from Alan Coopersmith's message of Mon Sep 28 14:08:07 -0700 2009:
>
>> If they're really internal only, should they be marked _X_HIDDEN
>> to keep them from being abused by misguided modules?
>
> How about _X_INTERNAL?
>
> From 1c9c89299c806c0687a1d724452f73a293f5f2f2 Mon Sep 17 00:00:00 2001
> From: Keith Packard <keithp at keithp.com>
> 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 <keithp at keithp.com>
> ---
> 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..0f79066 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 */
> +_X_INTERNAL 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 */
> +_X_INTERNAL 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..f93810d 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;
> +}
> +
> +_X_INTERNAL 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;
> +}
> +
> +_X_INTERNAL 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
>
>
>
> --
> keith.packard at intel.com
>
> _______________________________________________
> xorg mailing list
> xorg at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xorg
>
--
Paulo R. Zanoni
More information about the xorg
mailing list