xf86-video-intel: 2 commits - src/intel_module.c src/sna/sna_composite.c

Chris Wilson ickle at kemper.freedesktop.org
Sun Oct 21 05:14:36 PDT 2012


 src/intel_module.c      |    6 ++++--
 src/sna/sna_composite.c |    8 ++++----
 2 files changed, 8 insertions(+), 6 deletions(-)

New commits:
commit 9fa6e4aa2daee99ff5f6efc11232de22100bac80
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Oct 21 12:48:06 2012 +0100

    intel: Sanity check that the platform probes points to a i915.ko GEM device
    
    References: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1069031
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/intel_module.c b/src/intel_module.c
index e6ca964..ef62667 100644
--- a/src/intel_module.c
+++ b/src/intel_module.c
@@ -383,7 +383,7 @@ static Bool intel_driver_func(ScrnInfoPtr pScrn,
 	}
 }
 
-static Bool has_kernel_mode_setting(struct pci_device *dev)
+static Bool has_kernel_mode_setting(const struct pci_device *dev)
 {
 	char id[20];
 	int ret, fd;
@@ -418,7 +418,6 @@ static Bool has_kernel_mode_setting(struct pci_device *dev)
 			if (drmIoctl(fd, DRM_IOCTL_I915_GETPARAM, &gp))
 				ret = FALSE;
 		}
-
 		close(fd);
 	}
 
@@ -559,6 +558,9 @@ intel_platform_probe(DriverPtr driver,
 	if (!dev->pdev)
 		return FALSE;
 
+	if (!has_kernel_mode_setting(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;
commit f6eed98fcfea54d50a282ac71ee654645551ae11
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Oct 21 10:46:14 2012 +0100

    sna: Mark the to-be-damaged region first, then Process afterwards
    
    Damage is processed in two phases, with the actual Damage being appended
    before the operation is performed so that a copy can be made before
    modification (e.g. software cursors).
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_composite.c b/src/sna/sna_composite.c
index 60d39cd..c2af3b4 100644
--- a/src/sna/sna_composite.c
+++ b/src/sna/sna_composite.c
@@ -827,6 +827,10 @@ sna_composite_rectangles(CARD8		 op,
 		goto fallback;
 	}
 
+	/* XXX xserver-1.8: CompositeRects is not tracked by Damage, so we must
+	 * manually append the damaged regions ourselves.
+	 */
+	DamageRegionAppend(&pixmap->drawable, &region);
 	boxes = pixman_region_rectangles(&region, &num_boxes);
 
 	/* If we going to be overwriting any CPU damage with a subsequent
@@ -984,10 +988,6 @@ fallback_composite:
 	}
 
 done:
-	/* XXX xserver-1.8: CompositeRects is not tracked by Damage, so we must
-	 * manually append the damaged regions ourselves.
-	 */
-	DamageRegionAppend(&pixmap->drawable, &region);
 	DamageRegionProcessPending(&pixmap->drawable);
 
 	pixman_region_fini(&region);


More information about the xorg-commit mailing list