diff options
author | Dave Airlie <airlied@redhat.com> | 2012-04-17 11:50:40 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-04-17 11:50:40 +0100 |
commit | 296d08ef590063fcc6f268778bc012df2d0243c4 (patch) | |
tree | bdf9f0ef404ce1f40600b3529884b0305487d680 /src/driver.c | |
parent | d0db3b74acad13106cac19199da115b78a29207b (diff) |
modesetting: add set/drop master around VT switch
Diffstat (limited to 'src/driver.c')
-rw-r--r-- | src/driver.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/driver.c b/src/driver.c index 516bf61..827438a 100644 --- a/src/driver.c +++ b/src/driver.c @@ -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); |