summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2012-09-03 15:09:36 +1000
committerDave Airlie <airlied@redhat.com>2012-09-04 16:16:17 +1000
commit0db936a5b7125d9b73633733cb34e5e4b72f01e8 (patch)
tree2d4a8e2319b4e18a3d4e11b1017d1d16d8489813
parent18deac48db0d2387242461025904eb28a0f71fac (diff)
xf86: call enter/leave VT for gpu screens as well
Otherwise we can't do fast user switch properly for multiple GPUs. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--hw/xfree86/common/xf86Events.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c
index 47429ecfe..3ad34b543 100644
--- a/hw/xfree86/common/xf86Events.c
+++ b/hw/xfree86/common/xf86Events.c
@@ -460,6 +460,8 @@ xf86VTSwitch(void)
OsBlockSIGIO();
for (i = 0; i < xf86NumScreens; i++)
xf86Screens[i]->LeaveVT(xf86Screens[i]);
+ for (i = 0; i < xf86NumGPUScreens; i++)
+ xf86GPUScreens[i]->LeaveVT(xf86GPUScreens[i]);
xf86AccessLeave(); /* We need this here, otherwise */
@@ -474,6 +476,10 @@ xf86VTSwitch(void)
if (!xf86Screens[i]->EnterVT(xf86Screens[i]))
FatalError("EnterVT failed for screen %d\n", i);
}
+ for (i = 0; i < xf86NumGPUScreens; i++) {
+ if (!xf86GPUScreens[i]->EnterVT(xf86GPUScreens[i]))
+ FatalError("EnterVT failed for gpu screen %d\n", i);
+ }
if (!(dispatchException & DE_TERMINATE)) {
for (i = 0; i < xf86NumScreens; i++) {
if (xf86Screens[i]->EnableDisableFBAccess)
@@ -530,6 +536,11 @@ xf86VTSwitch(void)
if (!xf86Screens[i]->EnterVT(xf86Screens[i]))
FatalError("EnterVT failed for screen %d\n", i);
}
+ for (i = 0; i < xf86NumGPUScreens; i++) {
+ xf86GPUScreens[i]->vtSema = TRUE;
+ if (!xf86GPUScreens[i]->EnterVT(xf86GPUScreens[i]))
+ FatalError("EnterVT failed for gpu screen %d\n", i);
+ }
for (i = 0; i < xf86NumScreens; i++) {
if (xf86Screens[i]->EnableDisableFBAccess)
(*xf86Screens[i]->EnableDisableFBAccess) (xf86Screens[i], TRUE);