xorg-x11-server/0001-xf86crtc-don-t-use-display-for-vx-vy-for-gpu-screens.patch
Dave Airlie b644e663d7 fix bug with GPU hotplugging while VT switched
- reenable reverse optimus and some missing patch from F18
2013-04-12 14:13:49 +10:00

66 lines
2.2 KiB
Diff

From 2bd6a8491ad3dbd42db66be7ae48f4b6e9c698f2 Mon Sep 17 00:00:00 2001
From: Fedora X Ninjas <x@fedoraproject.org>
Date: Wed, 12 Dec 2012 14:02:54 +1000
Subject: [PATCH] xf86crtc: don't use display for vx/vy for gpu screens
---
hw/xfree86/modes/xf86Crtc.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 6975d2f..2828ee0 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -2425,11 +2425,11 @@ xf86InitialConfiguration(ScrnInfoPtr scrn, Bool canGrow)
config->debug_modes = xf86ReturnOptValBool(config->options,
OPTION_MODEDEBUG, FALSE);
- if (scrn->display->virtualX)
+ if (scrn->display->virtualX && !scrn->is_gpu)
width = scrn->display->virtualX;
else
width = config->maxWidth;
- if (scrn->display->virtualY)
+ if (scrn->display->virtualY && !scrn->is_gpu)
height = scrn->display->virtualY;
else
height = config->maxHeight;
@@ -2497,8 +2497,10 @@ xf86InitialConfiguration(ScrnInfoPtr scrn, Bool canGrow)
/* XXX override xf86 common frame computation code */
- scrn->display->frameX0 = 0;
- scrn->display->frameY0 = 0;
+ if (!scrn->is_gpu) {
+ scrn->display->frameX0 = 0;
+ scrn->display->frameY0 = 0;
+ }
for (c = 0; c < config->num_crtc; c++) {
xf86CrtcPtr crtc = config->crtc[c];
@@ -2546,7 +2548,7 @@ xf86InitialConfiguration(ScrnInfoPtr scrn, Bool canGrow)
}
}
- if (scrn->display->virtualX == 0) {
+ if (scrn->display->virtualX == 0 || scrn->is_gpu) {
/*
* Expand virtual size to cover the current config and potential mode
* switches, if the driver can't enlarge the screen later.
@@ -2561,8 +2563,10 @@ xf86InitialConfiguration(ScrnInfoPtr scrn, Bool canGrow)
}
}
- scrn->display->virtualX = width;
- scrn->display->virtualY = height;
+ if (!scrn->is_gpu) {
+ scrn->display->virtualX = width;
+ scrn->display->virtualY = height;
+ }
}
if (width > scrn->virtualX)
--
1.8.1