Xorg segfaults on i915gm during intel_drv.so init
Michal Suchanek
hramrach at gmail.com
Tue Apr 10 09:35:18 PDT 2012
Hello,
maybe this patch would work (to git before reverting).
Can you try on the system where X crashes on startup?
I suspect that under some circumstances the damage destroy is
attempted when screen is not fully initialized, and the X server
crashes while calculating screenDrawable.
Alternatively, this could be wrapped in the damage_registered part but
that would mean that the only way to determine that the screen
structure is in usable state is by checking damage_registered.
Thanks
Michal
-------------- next part --------------
diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c
index f9602fa..74e572f 100644
--- a/hw/xfree86/modes/xf86Rotate.c
+++ b/hw/xfree86/modes/xf86Rotate.c
@@ -272,7 +272,7 @@ xf86RotateDestroy(xf86CrtcPtr crtc)
ScrnInfoPtr pScrn = crtc->scrn;
ScreenPtr pScreen = pScrn->pScreen;
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
- DrawablePtr screenDrawable = &pScreen->root->drawable;
+ DrawablePtr screenDrawable = NULL;
int c;
/* Free memory from rotation */
@@ -290,10 +290,12 @@ xf86RotateDestroy(xf86CrtcPtr crtc)
/*
* Clean up damage structures when no crtcs are rotated
*/
+ if (pScreen && pScreen->root)
+ screenDrawable = &pScreen->root->drawable;
if (screenDrawable && xf86_config->rotation_damage) {
/* Free damage structure */
if (xf86_config->rotation_damage_registered) {
- DamageUnregister(&pScreen->root->drawable,
+ DamageUnregister(screenDrawable,
xf86_config->rotation_damage);
xf86_config->rotation_damage_registered = FALSE;
DisableLimitedSchedulingLatency();
More information about the xorg-devel
mailing list