summaryrefslogtreecommitdiff
path: root/src/sna
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2015-04-12 21:15:54 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2015-04-12 21:23:11 +0100
commit9c109f3dc56621215e580e74a6161f00035bdac3 (patch)
tree98d0298240fcae2b41fe7a42364699d941b6587c /src/sna
parent5d1ffd6f34d6280dbc792a8251c6442f480631e7 (diff)
sna: Mark the GPU as available before doing the mode restore on VT enter
Sometimes we want to render with the GPU when doing a mode switch, e.g. if we need to initialise an output surface. To do so, we need to prepare the acceleration layer first. Lots of thanks to Vasily for tracking this one down. Reported-by: Vasily Khoruzhick <anarsoul@gmail.com> Bugzilla: https://bugs.archlinux.org/task/43534 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna')
-rw-r--r--src/sna/sna_driver.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c
index 31500e73..488ca9b2 100644
--- a/src/sna/sna_driver.c
+++ b/src/sna/sna_driver.c
@@ -1213,6 +1213,8 @@ static Bool sna_enter_vt(VT_FUNC_ARGS_DECL)
if (intel_get_master(sna->dev))
return FALSE;
+ sna_accel_enter(sna);
+
if (sna->flags & SNA_REPROBE) {
DBG(("%s: reporting deferred hotplug event\n", __FUNCTION__));
sna_mode_discover(sna);
@@ -1221,11 +1223,11 @@ static Bool sna_enter_vt(VT_FUNC_ARGS_DECL)
sna_mode_check(sna);
if (!sna_set_desired_mode(sna)) {
+ sna_accel_leave(sna);
intel_put_master(sna->dev);
return FALSE;
}
- sna_accel_enter(sna);
return TRUE;
}