[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#827984: assertion failure with multiple GPUs and Xinerama enabled



On 23.06.2016 22:32, Christopher Cramer wrote:
> Package: xserver-xorg-video-radeon
> Version: 1:7.7.0-1
> Severity: normal
> 
> I have a FirePro 2450, which is a single card that has two GPUs and shows up
> as two separate PCI devices, with two DVI outputs per GPU.
> 
> Xinerama seems to be unofficially deprecated these days, but anyway the X
> server dies on assertion failure when Xinerama is enabled with multiple
> GPUs.

[...]

> Program terminated with signal SIGABRT, Aborted.
> #0  0x00007fa75f914458 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55
> [Current thread is 1 (Thread 0x7fa761b7fa00 (LWP 4230))]
> #0  0x00007fa75f914458 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55
> #1  0x00007fa75f9158da in __GI_abort () at abort.c:89
> #2  0x00007fa75f90d387 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x7fa75b3ec350 "key->initialized", file=file@entry=0x7fa75b3ec324 "/usr/include/xorg/privates.h", line=line@entry=122, 
>     function=function@entry=0x7fa75b3edf40 <__PRETTY_FUNCTION__.10025> "dixGetPrivateAddr") at assert.c:92
> #3  0x00007fa75f90d432 in __GI___assert_fail (assertion=assertion@entry=0x7fa75b3ec350 "key->initialized", file=file@entry=0x7fa75b3ec324 "/usr/include/xorg/privates.h", line=line@entry=122, 
>     function=function@entry=0x7fa75b3edf40 <__PRETTY_FUNCTION__.10025> "dixGetPrivateAddr") at assert.c:101
> #4  0x00007fa75b39c74d in dixGetPrivateAddr (key=<optimized out>, key=<optimized out>, privates=0x563fb3b312c8) at /usr/include/xorg/privates.h:122
> #5  0x00007fa75b3d7435 in dixGetPrivateAddr (key=<optimized out>, key=<optimized out>, privates=<optimized out>) at ../../src/radeon_kms.c:295
> #6  dixLookupPrivate (key=<optimized out>, privates=<optimized out>) at /usr/include/xorg/privates.h:165
> #7  RADEONCreateScreenResources_KMS (pScreen=0x563fb3b30ef0) at ../../src/radeon_kms.c:244
> #8  0x0000563fb2ce473e in xf86CrtcCreateScreenResources (screen=0x563fb3b30ef0) at ../../../../hw/xfree86/modes/xf86Crtc.c:716
> #9  0x0000563fb2c75abe in dix_main (argc=7, argv=0x7ffd5dd6af98, envp=<optimized out>) at ../../dix/main.c:225
> #10 0x00007fa75f9015f0 in __libc_start_main (main=0x563fb2c5ff60 <main>, argc=7, argv=0x7ffd5dd6af98, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffd5dd6af88) at libc-start.c:291
> #11 0x0000563fb2c5ff99 in _start ()

Does the attached patch fix this?


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
From f9cea23e1d06d1cd4c6b72400fd0f5ea5eb76d0a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <michel.daenzer@amd.com>
Date: Fri, 24 Jun 2016 11:12:49 +0900
Subject: [PATCH xf86-video-ati] Only use rrGetScrPriv if RandR is enabled
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/drmmode_display.c |  2 +-
 src/radeon_kms.c      | 21 ++++++++++++---------
 2 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index b5d3dc9..2555465 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -2613,7 +2613,7 @@ restart_destroy:
 			changed = TRUE;
 	}
 
-	if (changed) {
+	if (changed && dixPrivateKeyRegistered(rrPrivKey)) {
 #if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,14,99,2,0)
 		RRSetChanged(xf86ScrnToScreen(scrn));
 #else
diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index 940aad2..41ee597 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -241,7 +241,6 @@ static Bool RADEONCreateScreenResources_KMS(ScreenPtr pScreen)
 {
     ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
     RADEONInfoPtr  info   = RADEONPTR(pScrn);
-    rrScrPrivPtr rrScrPriv = rrGetScrPriv(pScreen);
     PixmapPtr pixmap;
     struct radeon_surface *surface;
 
@@ -251,17 +250,21 @@ static Bool RADEONCreateScreenResources_KMS(ScreenPtr pScreen)
     pScreen->CreateScreenResources = RADEONCreateScreenResources_KMS;
 
     /* Set the RandR primary output if Xorg hasn't */
-    if (
+    if (dixPrivateKeyRegistered(rrPrivKey)) {
+	rrScrPrivPtr rrScrPriv = rrGetScrPriv(pScreen);
+
+	if (
 #ifdef RADEON_PIXMAP_SHARING
-	!pScreen->isGPU &&
+	    !pScreen->isGPU &&
 #endif
-	!rrScrPriv->primaryOutput)
-    {
-	xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
+	    !rrScrPriv->primaryOutput)
+	{
+	    xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
 
-	rrScrPriv->primaryOutput = xf86_config->output[0]->randr_output;
-	RROutputChanged(rrScrPriv->primaryOutput, FALSE);
-	rrScrPriv->layoutChanged = TRUE;
+	    rrScrPriv->primaryOutput = xf86_config->output[0]->randr_output;
+	    RROutputChanged(rrScrPriv->primaryOutput, FALSE);
+	    rrScrPriv->layoutChanged = TRUE;
+	}
     }
 
     if (!drmmode_set_desired_modes(pScrn, &info->drmmode, FALSE))
-- 
2.8.1


Reply to: