aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/modes/xf86Crtc.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-07-11 11:55:48 +0200
committermarha <marha@users.sourceforge.net>2012-07-11 11:55:48 +0200
commit6cab6b3ebc8ed1a81ced93d621ea3abf05e282ab (patch)
tree21e1af7ee94600e349ae21353dc11963a06e988d /xorg-server/hw/xfree86/modes/xf86Crtc.c
parent75f57cf199b6c042b0f7515e3a1ab80f7ccecfab (diff)
parentd137057fd13e83ec15ab416c7fe774741da06047 (diff)
downloadvcxsrv-6cab6b3ebc8ed1a81ced93d621ea3abf05e282ab.tar.gz
vcxsrv-6cab6b3ebc8ed1a81ced93d621ea3abf05e282ab.tar.bz2
vcxsrv-6cab6b3ebc8ed1a81ced93d621ea3abf05e282ab.zip
Merge remote-tracking branch 'origin/released'
Conflicts: xorg-server/Xext/shm.c xorg-server/Xext/sync.c xorg-server/Xext/xf86bigfont.c xorg-server/Xi/opendev.c xorg-server/dix/dispatch.c xorg-server/include/globals.h xorg-server/mi/miinitext.c
Diffstat (limited to 'xorg-server/hw/xfree86/modes/xf86Crtc.c')
-rw-r--r--xorg-server/hw/xfree86/modes/xf86Crtc.c54
1 files changed, 54 insertions, 0 deletions
diff --git a/xorg-server/hw/xfree86/modes/xf86Crtc.c b/xorg-server/hw/xfree86/modes/xf86Crtc.c
index 2c8878fa7..d20152ce6 100644
--- a/xorg-server/hw/xfree86/modes/xf86Crtc.c
+++ b/xorg-server/hw/xfree86/modes/xf86Crtc.c
@@ -734,10 +734,27 @@ xf86CrtcCloseScreen(ScreenPtr screen)
for (c = 0; c < config->num_crtc; c++) {
xf86CrtcPtr crtc = config->crtc[c];
+ if (crtc->randr_crtc->scanout_pixmap)
+ RRCrtcDetachScanoutPixmap(crtc->randr_crtc);
+
crtc->randr_crtc = NULL;
}
+ /* detach any providers */
+ if (config->randr_provider) {
+ if (config->randr_provider->offload_sink) {
+ DetachOffloadGPU(screen);
+ config->randr_provider->offload_sink = NULL;
+ }
+ else if (config->randr_provider->output_source) {
+ DetachOutputGPU(screen);
+ config->randr_provider->output_source = NULL;
+ }
+ else if (screen->current_master)
+ DetachUnboundGPU(screen);
+ }
xf86RandR12CloseScreen(screen);
+ free(config->name);
return screen->CloseScreen(screen);
}
@@ -3202,3 +3219,40 @@ xf86_crtc_supports_gamma(ScrnInfoPtr pScrn)
return FALSE;
}
+
+void
+xf86ProviderSetup(ScrnInfoPtr scrn,
+ const xf86ProviderFuncsRec *funcs, const char *name)
+{
+ xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
+
+ assert(!xf86_config->name);
+ assert(name);
+
+ xf86_config->name = strdup(name);
+ xf86_config->provider_funcs = funcs;
+#ifdef RANDR_12_INTERFACE
+ xf86_config->randr_provider = NULL;
+#endif
+}
+
+void
+xf86DetachAllCrtc(ScrnInfoPtr scrn)
+{
+ xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
+ int i;
+
+ for (i = 0; i < xf86_config->num_crtc; i++) {
+ xf86CrtcPtr crtc = xf86_config->crtc[i];
+
+ if (crtc->randr_crtc)
+ RRCrtcDetachScanoutPixmap(crtc->randr_crtc);
+
+ /* dpms off */
+ (*crtc->funcs->dpms) (crtc, DPMSModeOff);
+ /* force a reset the next time its used */
+ crtc->randr_crtc->mode = NULL;
+ crtc->mode.HDisplay = 0;
+ crtc->x = crtc->y = 0;
+ }
+}