sna: Use the unoptimized pwrite for general buffers

When we call kgem_bo_write() we have less control over the allocation of
the buffer, and do not ensure it meets the alignment criteria required
for the cacheline optimisation. So use the simple pwrite routine to
avoid reading beyond the end of the allocation.

Reported-and-tested-by: Mark Kettenis <mark.kettenis@xs4all.nl>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2013-11-04 09:31:05 +00:00
parent 10023bf8f5
commit 7050c8da56
1 changed files with 1 additions and 1 deletions

View File

@ -482,7 +482,7 @@ bool kgem_bo_write(struct kgem *kgem, struct kgem_bo *bo,
assert(length <= bytes(bo));
retry:
if (gem_write(kgem->fd, bo->handle, 0, length, data)) {
if (__gem_write(kgem->fd, bo->handle, 0, length, data)) {
int err = errno;
assert(err != EINVAL);