xf86-video-intel: src/intel_module.c

Chris Wilson ickle at kemper.freedesktop.org
Fri Sep 7 06:38:13 PDT 2012


 src/intel_module.c |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 448808d8a4e78afa7fe90e318d6d7afdbff66190
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri Sep 7 14:31:52 2012 +0100

    prime: Allocate a GPU_SCREEN when not primary to fulfil the output sink role
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/intel_module.c b/src/intel_module.c
index a5d071b..b4f0ad2 100644
--- a/src/intel_module.c
+++ b/src/intel_module.c
@@ -538,14 +538,22 @@ intel_platform_probe(DriverPtr driver,
 {
 	ScrnInfoPtr scrn = NULL;
 	char *path = xf86_get_platform_device_attrib(dev, ODEV_ATTRIB_PATH);
+	unsigned scrn_flags = 0;
 
 	if (!dev->pdev)
 		return FALSE;
+
+	/* Allow ourselves to act as a slaved output if not primary */
+	if (flags & PLATFORM_PROBE_GPU_SCREEN) {
+		flags &= ~PLATFORM_PROBE_GPU_SCREEN;
+		scrn_flags |= XF86_ALLOCATE_GPU_SCREEN;
+	}
+
 	/* if we get any flags we don't understand fail to probe for now */
 	if (flags)
 		return FALSE;
 
-	scrn = xf86AllocateScreen(driver, 0);
+	scrn = xf86AllocateScreen(driver, scrn_flags);
 	if (scrn == NULL)
 		return FALSE;
 


More information about the xorg-commit mailing list