mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
modesetting: add set/drop master around VT switch
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user