[Libdlo] randr.c RRFirstOutput() crash when using "displaylink" driver in combination with "nvidia" driver

Mulchman mulchman at gmail.com
Wed Mar 10 15:26:43 PST 2010


I'm encountering a crash in randr.c:448 (RRFirstOutput) when using the 
"displaylink" driver with the proprietary "nvidia" driver.  The crash 
does not occur when just using the "nvidia" driver or when using the 
"nv" driver in combination with the "displaylink" driver.

This is what I mean by 'using the "nvidia" driver with the "displaylink 
driver"' - in xorg.conf:

# Real gfx card device
Section "Device"
    Identifier     "RealGfxCard"
    Driver         "nvidia"
    BoardName      "GeForce 9800 GTX+"
EndSection

# DisplayLink device
Section "Device"
    Identifier     "DisplayLinkDevice"
    driver         "displaylink"
    Option "fbdev" "/dev/fb0"
EndSection


The crash occurs in the RRFirstOutput function in randr.c as pScrPriv is 
NULL:

RROutputPtr
RRFirstOutput (ScreenPtr pScreen)
{
    // <snip>
    rrScrPriv(pScreen); // this is a #define that creates the pScrPriv 
variable
    // <snip>
    
    if (pScrPriv->primaryOutput && pScrPriv->primaryOutput->crtc)
    return pScrPriv->primaryOutput;
    // <snip>
}

'rrScrPriv' is a #define as follows:
#define rrGetScrPriv(pScr)  
((rrScrPrivPtr)dixLookupPrivate(&(pScr)->devPrivates, rrPrivKey))
#define rrScrPriv(pScr)    rrScrPrivPtr    pScrPriv = rrGetScrPriv(pScr)

So for some reason when using the "displaylink" driver in combination 
with the "nvidia" driver an entry is never added to the <x code 
dir>/dix/privates.c file dictionary thing (this is what I'm guessing [?]).

So to recap-
* When using "displaylink" with "nv" RRFirstOutput is never called.
* When using just "nvidia" (with no mention of the "displaylink" driver) 
RRFirstOutput is called and succeeds without any crashes.
* When using "displaylink" with "nvidia" RRFirstOutput is called and 
there's a crash.

#0  RRFirstOutput (pScreen=<value optimized out>) at ../../randr/randr.c:448
#1  0x0000000000522ee4 in ProcRRGetScreenInfo (client=0x1dbea80) at 
../../randr/rrscreen.c:621
#2  0x000000000044e174 in Dispatch () at ../../dix/dispatch.c:456
#3  0x0000000000434085 in main (argc=<value optimized out>, 
argv=0x7fff343ca078, envp=<value optimized out>) at ../../dix/main.c:397

So, should the "displaylink" driver, xf86-video-displaylink, be doing 
some additional setup?

Thoughts/ideas?


-Pat


More information about the Libdlo mailing list