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:
parent
10023bf8f5
commit
7050c8da56
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue