aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/drivers/modesetting/driver.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-11-29 16:13:30 +0100
committermarha <marha@users.sourceforge.net>2014-11-29 16:13:30 +0100
commit7147e58c389cffeb930bdd8e3a2fdfc5d5bb3a0c (patch)
treee5b941fdff86328a065c46582ba53e0cc73c8576 /xorg-server/hw/xfree86/drivers/modesetting/driver.c
parent0dbe845b2f4ba08924d6fcb9634d09dc3dde13d6 (diff)
parenta1011d63ffb5cc4f41bf0f4622ee3f1493d419d9 (diff)
downloadvcxsrv-7147e58c389cffeb930bdd8e3a2fdfc5d5bb3a0c.tar.gz
vcxsrv-7147e58c389cffeb930bdd8e3a2fdfc5d5bb3a0c.tar.bz2
vcxsrv-7147e58c389cffeb930bdd8e3a2fdfc5d5bb3a0c.zip
Merge remote-tracking branch 'origin/released'
Conflicts: xorg-server/dix/dispatch.c xorg-server/hw/xwin/ddraw.h xorg-server/hw/xwin/glx/glshim.c xorg-server/hw/xwin/winclipboard/xevents.c xorg-server/hw/xwin/windialogs.c xorg-server/hw/xwin/winmultiwindowshape.c xorg-server/hw/xwin/winmultiwindowwindow.c xorg-server/hw/xwin/winprefslex.l xorg-server/hw/xwin/winshadddnl.c xorg-server/hw/xwin/winshadgdi.c xorg-server/hw/xwin/winwndproc.c xorg-server/mi/miarc.c xorg-server/os/connection.c
Diffstat (limited to 'xorg-server/hw/xfree86/drivers/modesetting/driver.c')
-rw-r--r--xorg-server/hw/xfree86/drivers/modesetting/driver.c29
1 files changed, 27 insertions, 2 deletions
diff --git a/xorg-server/hw/xfree86/drivers/modesetting/driver.c b/xorg-server/hw/xfree86/drivers/modesetting/driver.c
index c62147a0f..592f2469b 100644
--- a/xorg-server/hw/xfree86/drivers/modesetting/driver.c
+++ b/xorg-server/hw/xfree86/drivers/modesetting/driver.c
@@ -25,7 +25,7 @@
*
*
* Original Author: Alan Hourihane <alanh@tungstengraphics.com>
- * Rewrite: Dave Airlie <airlied@redhat.com>
+ * Rewrite: Dave Airlie <airlied@redhat.com>
*
*/
@@ -788,7 +788,9 @@ PreInit(ScrnInfoPtr pScrn, int flags)
try_enable_glamor(pScrn);
- if (!ms->glamor) {
+ if (ms->glamor) {
+ xf86LoadSubModule(pScrn, "dri2");
+ } else {
Bool prefer_shadow = TRUE;
ret = drmGetCap(ms->fd, DRM_CAP_DUMB_PREFER_SHADOW, &value);
@@ -1107,6 +1109,21 @@ ScreenInit(ScreenPtr pScreen, int argc, char **argv)
if (serverGeneration == 1)
xf86ShowUnusedOptions(pScrn->scrnIndex, pScrn->options);
+ if (!ms_vblank_screen_init(pScreen)) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "Failed to initialize vblank support.\n");
+ return FALSE;
+ }
+
+#ifdef GLAMOR
+ if (ms->glamor) {
+ if (!ms_dri2_screen_init(pScreen)) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "Failed to initialize the DRI2 extension.\n");
+ }
+ }
+#endif
+
return EnterVT(pScrn);
}
@@ -1172,6 +1189,14 @@ CloseScreen(ScreenPtr pScreen)
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
modesettingPtr ms = modesettingPTR(pScrn);
+#ifdef GLAMOR
+ if (ms->glamor) {
+ ms_dri2_close_screen(pScreen);
+ }
+#endif
+
+ ms_vblank_close_screen(pScreen);
+
if (ms->damage) {
DamageUnregister(ms->damage);
DamageDestroy(ms->damage);