svn commit: r236932 - stable/9/sys/dev/drm2/i915
Konstantin Belousov
kib at FreeBSD.org
Mon Jun 11 21:43:17 UTC 2012
Author: kib
Date: Mon Jun 11 21:43:17 2012
New Revision: 236932
URL: http://svn.freebsd.org/changeset/base/236932
Log:
MFC r236182:
Fix calculation of the execution buffer end in the mapped pages
when it is spilled into the next page.
Modified:
stable/9/sys/dev/drm2/i915/i915_gem_execbuffer.c
Directory Properties:
stable/9/sys/ (props changed)
stable/9/sys/dev/ (props changed)
Modified: stable/9/sys/dev/drm2/i915/i915_gem_execbuffer.c
==============================================================================
--- stable/9/sys/dev/drm2/i915/i915_gem_execbuffer.c Mon Jun 11 21:41:45 2012 (r236931)
+++ stable/9/sys/dev/drm2/i915/i915_gem_execbuffer.c Mon Jun 11 21:43:17 2012 (r236932)
@@ -1069,7 +1069,8 @@ i915_gem_fix_mi_batchbuffer_end(struct d
po_r -= 4;
mkva = pmap_mapdev_attr(trunc_page(po_r), 2 * PAGE_SIZE,
PAT_WRITE_COMBINING);
- cmd = *(uint32_t *)(mkva + (po_r & PAGE_MASK));
+ po_r &= PAGE_MASK;
+ cmd = *(uint32_t *)(mkva + po_r);
if (cmd != MI_BATCH_BUFFER_END) {
/*
@@ -1083,8 +1084,7 @@ i915_gem_fix_mi_batchbuffer_end(struct d
po_w = po_r;
DRM_DEBUG("batchbuffer does not end by MI_BATCH_BUFFER_END, overwriting last bo cmd !\n");
}
-
- *(uint32_t *)(mkva + (po_w & PAGE_MASK)) = MI_BATCH_BUFFER_END;
+ *(uint32_t *)(mkva + po_w) = MI_BATCH_BUFFER_END;
}
pmap_unmapdev((vm_offset_t)mkva, 2 * PAGE_SIZE);
More information about the svn-src-stable-9
mailing list