xf86-video-intel: 3 commits - src/sna/sna_driver.c

Chris Wilson ickle at kemper.freedesktop.org
Sat Aug 24 06:13:06 PDT 2013


 src/sna/sna_driver.c |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

New commits:
commit 3716345bf45bff785d0786774400eb47e1678caa
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sat Aug 24 14:04:51 2013 +0100

    sna: Don't restrict the frontbuffer to be scanout capable if hosted
    
    Since we won't be binding it to a framebuffer, we don't care if it is
    incompatible.
    
    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 16da417..dfd5b3e 100644
--- a/src/sna/sna_driver.c
+++ b/src/sna/sna_driver.c
@@ -220,6 +220,7 @@ static Bool sna_become_master(struct sna *sna)
 static Bool sna_create_screen_resources(ScreenPtr screen)
 {
 	struct sna *sna = to_sna_from_screen(screen);
+	unsigned hint;
 
 	DBG(("%s(%dx%d@%d)\n", __FUNCTION__,
 	     screen->width, screen->height, screen->rootDepth));
@@ -232,11 +233,15 @@ static Bool sna_create_screen_resources(ScreenPtr screen)
 
 	sna_accel_create(sna);
 
+	hint = SNA_CREATE_FB;
+	if (sna->flags & SNA_IS_HOSTED)
+		hint = 0;
+
 	sna->front = screen->CreatePixmap(screen,
 					  screen->width,
 					  screen->height,
 					  screen->rootDepth,
-					  SNA_CREATE_FB);
+					  hint);
 	if (!sna->front) {
 		xf86DrvMsg(screen->myNum, X_ERROR,
 			   "[intel] Unable to create front buffer %dx%d at depth %d\n",
commit 306c72cffbd8cd88e93871ee21fa85101198c1ac
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sat Aug 24 14:02:23 2013 +0100

    sna: Trust the preferred-depth returned by the host
    
    As we are not master and will not be binding the fb, it is irrelevant as
    to whether our render buffer is actually bindable.
    
    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 e6c424a..16da417 100644
--- a/src/sna/sna_driver.c
+++ b/src/sna/sna_driver.c
@@ -452,7 +452,8 @@ static Bool sna_pre_init(ScrnInfoPtr scrn, int flags)
 	case 16:
 	case 24:
 	case 30:
-		if (fb_supports_depth(fd, scrn->depth))
+		if ((sna->flags & SNA_IS_HOSTED) == 0 &&
+		    fb_supports_depth(fd, scrn->depth))
 			break;
 	default:
 		xf86DrvMsg(scrn->scrnIndex, X_ERROR,
commit 7690346248fd8d3460cc07f018827ff55b85d19d
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sat Aug 24 14:00:34 2013 +0100

    sna: Don't copy fbcon if hosted
    
    When hosted, we have no idea what the right initial contents should be
    as we are independent of the CRTC and so the existing fb is irrelevant.
    Plus, not actually being master will cause the attempt to read back the
    bound framebuffer to fail...
    
    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 83a5bba..e6c424a 100644
--- a/src/sna/sna_driver.c
+++ b/src/sna/sna_driver.c
@@ -259,7 +259,7 @@ static Bool sna_create_screen_resources(ScreenPtr screen)
 	screen->SetScreenPixmap(sna->front);
 
 	/* Only preserve the fbcon, not any subsequent server regens */
-	if (serverGeneration == 1)
+	if (serverGeneration == 1 && (sna->flags & SNA_IS_HOSTED) == 0)
 		sna_copy_fbcon(sna);
 
 	if (!sna_become_master(sna)) {


More information about the xorg-commit mailing list