modesetting: add set/drop master around VT switch
This commit is contained in:
parent
001dec8980
commit
00c663a3bc
|
@ -756,10 +756,12 @@ static void
|
|||
LeaveVT(int scrnIndex, int flags)
|
||||
{
|
||||
ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
|
||||
|
||||
modesettingPtr ms = modesettingPTR(pScrn);
|
||||
xf86_hide_cursors(pScrn);
|
||||
|
||||
pScrn->vtSema = FALSE;
|
||||
|
||||
drmDropMaster(ms->fd);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -773,6 +775,11 @@ EnterVT(int scrnIndex, int flags)
|
|||
|
||||
pScrn->vtSema = TRUE;
|
||||
|
||||
if (drmSetMaster(ms->fd)) {
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "drmSetMaster failed: %s\n",
|
||||
strerror(errno));
|
||||
}
|
||||
|
||||
if (!drmmode_set_desired_modes(pScrn, &ms->drmmode))
|
||||
return FALSE;
|
||||
|
||||
|
@ -815,8 +822,6 @@ CloseScreen(int scrnIndex, ScreenPtr pScreen)
|
|||
pScreen->CreateScreenResources = ms->createScreenResources;
|
||||
pScreen->BlockHandler = ms->BlockHandler;
|
||||
|
||||
drmDropMaster(ms->fd);
|
||||
|
||||
pScrn->vtSema = FALSE;
|
||||
pScreen->CloseScreen = ms->CloseScreen;
|
||||
return (*pScreen->CloseScreen) (scrnIndex, pScreen);
|
||||
|
|
Loading…
Reference in New Issue