mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-04-20 11:50:40 +02:00
randr: Check rrPrivKey before autobinding GPU screens
RRProviderAutoConfigGpuScreen() is called from outside RandR, so there is no guarantee that RandR has been initialized when it is called. As mentioned in commit4226c6d, it's possible that RandR has not been initialized if the server is configured with Xinerama and there is more than one X screen. Calling rrGetScrPriv when RandR isn't initialized causes an assertion failure that aborts the server: Xorg: ../include/privates.h:121: dixGetPrivateAddr: Assertion key->initialized' failed. Just as in commit4226c6d, fix the problem by checking dixPrivateKeyRegistered(rrPrivKey) before calling rrGetScrPriv. Signed-off-by: Alex Goins <agoins@nvidia.com>
This commit is contained in:
parent
e33453f911
commit
6172bd2b41
1 changed files with 14 additions and 4 deletions
|
|
@ -490,10 +490,20 @@ RRDeliverProviderEvent(ClientPtr client, WindowPtr pWin, RRProviderPtr provider)
|
|||
void
|
||||
RRProviderAutoConfigGpuScreen(ScreenPtr pScreen, ScreenPtr primaryScreen)
|
||||
{
|
||||
rrScrPrivPtr pScrPriv = rrGetScrPriv(pScreen);
|
||||
rrScrPrivPtr primaryPriv = rrGetScrPriv(primaryScreen);
|
||||
RRProviderPtr provider = pScrPriv->provider;
|
||||
RRProviderPtr primary_provider = primaryPriv->provider;
|
||||
rrScrPrivPtr pScrPriv;
|
||||
rrScrPrivPtr primaryPriv;
|
||||
RRProviderPtr provider;
|
||||
RRProviderPtr primary_provider;
|
||||
|
||||
/* Bail out if RandR wasn't initialized. */
|
||||
if (!dixPrivateKeyRegistered(rrPrivKey))
|
||||
return;
|
||||
|
||||
pScrPriv = rrGetScrPriv(pScreen);
|
||||
primaryPriv = rrGetScrPriv(primaryScreen);
|
||||
|
||||
provider = pScrPriv->provider;
|
||||
primary_provider = primaryPriv->provider;
|
||||
|
||||
if (!provider || !primary_provider)
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue