Re: AMD/AMD hybrid graphics

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

 



On Thu, Feb 20, 2014 at 9:37 PM, Dave Airlie <airlied@xxxxxxxxx> wrote:
> On Fri, Feb 21, 2014 at 12:25 PM, Michel Dänzer <michel@xxxxxxxxxxx> wrote:
>> On Don, 2014-02-20 at 08:44 +0100, Boszormenyi Zoltan wrote:
>>> 2014-02-20 06:47 keltezéssel, Michel Dänzer írta:
>>> > On Don, 2014-02-20 at 06:09 +0100, Boszormenyi Zoltan wrote:
>>> >> 2014-02-20 04:20 keltezéssel, Michel Dänzer írta:
>>> >>> On Mit, 2014-02-19 at 11:56 +0100, Boszormenyi Zoltan wrote:
>>> >>>> 2014-02-19 10:59 keltezéssel, Michel Dänzer írta:
>>> >>>>> On Mit, 2014-02-19 at 09:11 +0100, Boszormenyi Zoltan wrote:
>>> >>>>>
>>> >>>>>> Can Mesa/Xorg use both r600g and radeonsi at the same time?
>>> >>>>> Yes, that seems to work fine for others. You may need Mesa 10.1 or newer
>>> >>>>> though.
>>> >>>> Do you mean mean with Mesa 9.2.5 and Xorg server 1.14.4 in
>>> >>>> Fedora 20 at this time, it's not possible unless I compile my own
>>> >>>> llvm-3.5 SVN, Mesa 10.1 or 10.2 GIT and Xorg 1.15 GIT?
>>> >>> I don't think Xorg 1.15 is necessary, but it shouldn't hurt either.
>>> >>>
>>> >>>
>>> >>>> Attached is the log from both 1.14.4 (FC20) and 1.15.0 (rawhide), [...]
>>> >>> The log files end abruptly, so we need to see the X server stderr
>>> >>> output. Assuming you're using gdm, it should be captured
>>> >>> in /var/log/gdm*/:0.log .
>>> >> FC20 has lightdm by default, here's /var/log/lightdm/x-0.log
>>> > [...]
>>> >
>>> >> X: ../../../include/privates.h:122: dixGetPrivateAddr: Assertion
>>> >> `key->initialized' failed.
>>> > Can you get a backtrace for this assertion failure with gdb? See
>>> > http://wiki.x.org/wiki/Development/Documentation/ServerDebugging/
>>
>> [...]
>>
>>> #0  0x00007fadc165f1c9 in __GI_raise (sig=sig@entry=6) at
>>> ../nptl/sysdeps/unix/sysv/linux/raise.c:56
>>> #1  0x00007fadc16608d8 in __GI_abort () at abort.c:89
>>> #2  0x00007fadc1658126 in __assert_fail_base (fmt=0x7fadc17a98a0 "%s%s%s:%u: %s%sAssertion
>>> `%s' failed.\n%n", assertion=assertion@entry=0x5a4c53 "key->initialized",
>>>      file=file@entry=0x5a8dfc "../../../include/privates.h", line=line@entry=122,
>>> function=function@entry=0x5aaa90 <__PRETTY_FUNCTION__.8544> "dixGetPrivateAddr") at
>>> assert.c:92
>>> #3  0x00007fadc16581d2 in __GI___assert_fail (assertion=assertion@entry=0x5a4c53
>>> "key->initialized", file=file@entry=0x5a8dfc "../../../include/privates.h",
>>> line=line@entry=122,
>>>      function=function@entry=0x5aaa90 <__PRETTY_FUNCTION__.8544> "dixGetPrivateAddr") at
>>> assert.c:101
>>> #4  0x0000000000424f70 in dixGetPrivateAddr (key=<optimized out>, key=<optimized out>,
>>> privates=0x169d558) at ../../../include/privates.h:122
>>> #5  0x00000000004810eb in dixGetPrivateAddr (key=<optimized out>, key=<optimized out>,
>>> privates=0x169d558) at xf86cmap.c:239
>>> #6  dixSetPrivate (val=<optimized out>, key=0x822f80 <CMapScreenKeyRec>,
>>> privates=0x169d558) at ../../../include/privates.h:148
>>> #7  xf86HandleColormaps (pScreen=pScreen@entry=0x169d180, maxColors=maxColors@entry=256,
>>> sigRGBbits=10, loadPalette=loadPalette@entry=0x7fadbcd37ea0 <drmmode_load_palette>,
>>>      setOverscan=setOverscan@entry=0x0, flags=flags@entry=3) at xf86cmap.c:184
>>> #8  0x00007fadbcd3b32c in drmmode_setup_colormap (pScreen=pScreen@entry=0x169d180,
>>> pScrn=pScrn@entry=0x169c930) at drmmode_display.c:1990
>>> #9  0x00007fadbcd370ef in RADEONScreenInit_KMS (pScreen=pScreen@entry=0x169d180,
>>> argc=argc@entry=1, argv=argv@entry=0x7fff83c684c8) at radeon_kms.c:1366
>>> #10 0x0000000000438b4d in AddGPUScreen (pfnInit=0x7fadbcd36c60 <RADEONScreenInit_KMS>,
>>> argc=argc@entry=1, argv=argv@entry=0x7fff83c684c8) at dispatch.c:3874
>>> #11 0x000000000047aa9f in InitOutput (pScreenInfo=pScreenInfo@entry=0x82dd60 <screenInfo>,
>>> argc=argc@entry=1, argv=argv@entry=0x7fff83c684c8) at xf86Init.c:886
>>
>> Hmm, looks like there's confusion about how colormaps are supposed to be
>> handled.
>>
>>
>> Dave, any ideas?
>
> xf86_crtc_supports_gamma probably stops us from ever getting into that
> function, but in the case where we have 0 crtcs I could see fallout.
>
> Either fix the DDX to not call colormap handling if we have 0 crtcs
> and/or fix the server to not install bother with colormaps if we have
> 0 crtcs.
>

Does the attached patch help?

Alex

> Dave.
> _______________________________________________
> dri-devel mailing list
> dri-devel@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
From b6aef10258062e2a8ec638b9431a52214b61fdf0 Mon Sep 17 00:00:00 2001
From: Alex Deucher <alexander.deucher@xxxxxxx>
Date: Fri, 21 Feb 2014 08:33:21 -0500
Subject: [PATCH] radeon: don't install colormap handling if there are no crtcs

Fixes a crash on cards with 0 crtcs.

Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
---
 src/drmmode_display.c | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 76b79d8..641e231 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -1939,19 +1939,23 @@ static void drmmode_load_palette(ScrnInfoPtr pScrn, int numColors,
 
 Bool drmmode_setup_colormap(ScreenPtr pScreen, ScrnInfoPtr pScrn)
 {
+    xf86CrtcConfigPtr   xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
+
     xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG,
                   "Initializing kms color map\n");
-    if (!miCreateDefColormap(pScreen))
-        return FALSE;
-    /* all radeons support 10 bit CLUTs */
-    if (!xf86HandleColormaps(pScreen, 256, 10,
-                             drmmode_load_palette, NULL,
-                             CMAP_PALETTED_TRUECOLOR
+    if (xf86_config->num_crtc) {
+	if (!miCreateDefColormap(pScreen))
+	    return FALSE;
+	/* all radeons support 10 bit CLUTs */
+	if (!xf86HandleColormaps(pScreen, 256, 10,
+				 drmmode_load_palette, NULL,
+				 CMAP_PALETTED_TRUECOLOR
 #if 0 /* This option messes up text mode! (eich@xxxxxxx) */
-                             | CMAP_LOAD_EVEN_IF_OFFSCREEN
+				 | CMAP_LOAD_EVEN_IF_OFFSCREEN
 #endif
-                             | CMAP_RELOAD_ON_MODE_SWITCH))
-         return FALSE;
+				 | CMAP_RELOAD_ON_MODE_SWITCH))
+	    return FALSE;
+    }
     return TRUE;
 }
 
-- 
1.8.3.1

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux