xf86-video-intel: src/sna/sna_driver.c
Chris Wilson
ickle at kemper.freedesktop.org
Wed Sep 10 02:53:08 PDT 2014
src/sna/sna_driver.c | 28 +++++++++++-----------------
1 file changed, 11 insertions(+), 17 deletions(-)
New commits:
commit 0d1df4762ffd7babb95a5f48f77487a6c7db83fe
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Sep 10 08:36:18 2014 +0100
sna: Relax early failure to set KMS modes
Under the new world order, we may not have KMS rights until we are given
a VT.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c
index 66f72dc..401737b 100644
--- a/src/sna/sna_driver.c
+++ b/src/sna/sna_driver.c
@@ -264,26 +264,20 @@ static Bool sna_create_screen_resources(ScreenPtr screen)
assert(sna->front == new_front);
screen->DestroyPixmap(new_front); /* transfer ownership to screen */
- if (intel_get_master(sna->scrn)) {
- xf86DrvMsg(screen->myNum, X_ERROR,
- "[intel] Failed to become DRM master\n");
- screen->DestroyPixmap(sna->front);
- sna->front = NULL;
- return FALSE;
- }
-
sna_mode_set_primary(sna);
- /* Only preserve the fbcon, not any subsequent server regens */
- if (serverGeneration == 1 && (sna->flags & SNA_IS_HOSTED) == 0)
- sna_copy_fbcon(sna);
+ /* Try to become master and copy the current fbcon before the
+ * actual VT switch. If we fail here, we will try to reset the
+ * mode in the eventual VT switch. This can fail if systemd has
+ * already revoked our KMS privileges, so just carry on regardless,
+ * and hope that everything is sorted after the VT switch.
+ */
+ if (intel_get_master(sna->scrn) == 0) {
+ /* Only preserve the fbcon, not any subsequent server regens */
+ if (serverGeneration == 1 && (sna->flags & SNA_IS_HOSTED) == 0)
+ sna_copy_fbcon(sna);
- if (!sna_set_desired_mode(sna)) {
- xf86DrvMsg(screen->myNum, X_ERROR,
- "[intel] Failed to set initial mode\n");
- screen->DestroyPixmap(sna->front);
- sna->front = NULL;
- return FALSE;
+ (void)sna_set_desired_mode(sna);
}
return TRUE;
More information about the xorg-commit
mailing list