diff options
| author | Michel Dänzer <michel@tungstengraphics.com> | 2007-06-15 17:13:11 +0200 | 
|---|---|---|
| committer | Michel Dänzer <michel@tungstengraphics.com> | 2007-06-15 17:13:11 +0200 | 
| commit | 3d5d41fa9823cf44138c8f4bc954bca80539d74e (patch) | |
| tree | 7f060a0348405663e8a9a00e26a90dcc58cf21b3 /linux-core | |
| parent | 84bea383538df83c049680497ba2179e50d07ca3 (diff) | |
i915: Fix handling of breadcrumb counter wraparounds.
Diffstat (limited to 'linux-core')
| -rw-r--r-- | linux-core/i915_drv.c | 6 | ||||
| -rw-r--r-- | linux-core/i915_fence.c | 2 | 
2 files changed, 4 insertions, 4 deletions
| diff --git a/linux-core/i915_drv.c b/linux-core/i915_drv.c index 4c35b4c3..49437066 100644 --- a/linux-core/i915_drv.c +++ b/linux-core/i915_drv.c @@ -41,9 +41,9 @@ static struct pci_device_id pciidlist[] = {  #ifdef I915_HAVE_FENCE  static drm_fence_driver_t i915_fence_driver = {  	.num_classes = 1, -	.wrap_diff = (1 << 30), -	.flush_diff = (1 << 29), -	.sequence_mask = 0x7fffffffU, +	.wrap_diff = (1U << (BREADCRUMB_BITS - 1)), +	.flush_diff = (1U << (BREADCRUMB_BITS - 2)), +	.sequence_mask = BREADCRUMB_MASK,  	.lazy_capable = 1,  	.emit = i915_fence_emit_sequence,  	.poke_flush = i915_poke_flush, diff --git a/linux-core/i915_fence.c b/linux-core/i915_fence.c index 88daa57c..00873485 100644 --- a/linux-core/i915_fence.c +++ b/linux-core/i915_fence.c @@ -61,7 +61,7 @@ static void i915_perform_flush(drm_device_t * dev)  		 * First update fences with the current breadcrumb.  		 */ -		diff = sequence - fc->last_exe_flush; +		diff = (sequence - fc->last_exe_flush) & BREADCRUMB_MASK;  		if (diff < driver->wrap_diff && diff != 0) {  			drm_fence_handler(dev, 0, sequence, DRM_FENCE_TYPE_EXE);  		} | 
