mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 19:30:11 +01:00
st/xorg: Acquire/drop DRM master in order to work with multiple servers.
This commit is contained in:
parent
f21b0e9a04
commit
5eeb44f398
1 changed files with 15 additions and 0 deletions
|
|
@ -633,6 +633,10 @@ LeaveVT(int scrnIndex, int flags)
|
|||
|
||||
RestoreHWState(pScrn);
|
||||
|
||||
if (drmDropMaster(ms->fd))
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
|
||||
"drmDropMaster failed: %s\n", strerror(errno));
|
||||
|
||||
pScrn->vtSema = FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -645,6 +649,17 @@ EnterVT(int scrnIndex, int flags)
|
|||
ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
|
||||
modesettingPtr ms = modesettingPTR(pScrn);
|
||||
|
||||
if (drmSetMaster(ms->fd)) {
|
||||
if (errno == EINVAL) {
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
|
||||
"drmSetMaster failed: 2.6.29 or newer kernel required for "
|
||||
"multi-server DRI\n");
|
||||
} else {
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
|
||||
"drmSetMaster failed: %s\n", strerror(errno));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Only save state once per server generation since that's what most
|
||||
* drivers do. Could change this to save state at each VT enter.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue