summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorThomas Hellstrom <[email protected]>2010-10-12 11:10:59 +0200
committerThomas Hellstrom <[email protected]>2010-10-12 15:09:05 +0200
commitb6b7ce84e517cfb7d1c02ef2f389c8f2e5fea04c (patch)
tree3b2ef1cd41b63e72b65a8a7fb0d0b361cfaa5eaf /src/gallium
parent201c3d36697fccfee6b6dacf9529d1951f77651c (diff)
st/xorg: Don't try to remove invalid fbs
Signed-off-by: Thomas Hellstrom <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/state_trackers/xorg/xorg_driver.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/state_trackers/xorg/xorg_driver.c b/src/gallium/state_trackers/xorg/xorg_driver.c
index f7b3ad3505c..ca745393a9a 100644
--- a/src/gallium/state_trackers/xorg/xorg_driver.c
+++ b/src/gallium/state_trackers/xorg/xorg_driver.c
@@ -369,6 +369,7 @@ drv_pre_init(ScrnInfoPtr pScrn, int flags)
ms = modesettingPTR(pScrn);
ms->pEnt = pEnt;
ms->cust = cust;
+ ms->fb_id = 1;
pScrn->displayWidth = 640; /* default it */
@@ -864,8 +865,10 @@ drv_leave_vt(int scrnIndex, int flags)
}
}
- drmModeRmFB(ms->fd, ms->fb_id);
- ms->fb_id = -1;
+ if (ms->fb_id != -1) {
+ drmModeRmFB(ms->fd, ms->fb_id);
+ ms->fb_id = -1;
+ }
/* idle hardware */
if (!ms->kms)
@@ -946,7 +949,6 @@ drv_close_screen(int scrnIndex, ScreenPtr pScreen)
}
#endif
- drmModeRmFB(ms->fd, ms->fb_id);
ms->destroy_front_buffer(pScrn);
if (ms->exa)