Skip to content

Commit

Permalink
nvrm: put it back to non-snooped sysram
Browse files Browse the repository at this point in the history
nvrm: force memcpy not to be extracted by SSE
  • Loading branch information
shinpei0208 committed Oct 4, 2013
1 parent f07a8ba commit f0bb578
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/user/nvrm/nvrm_gdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ int gdev_raw_read(struct gdev_mem *mem, void *buf, uint64_t addr, uint32_t size)
}

uint64_t offset = addr - mem->addr;
memcpy(buf, ptr + offset, size);
__nvrm_io_memcpy(buf, ptr + offset, size);

if (!mem->map) {
nvrm_bo_host_unmap(bo);
Expand All @@ -507,7 +507,7 @@ int gdev_raw_write(struct gdev_mem *mem, uint64_t addr, const void *buf, uint32_
}

uint64_t offset = addr - mem->addr;
memcpy(ptr + offset, buf, size);
__nvrm_io_memcpy(ptr + offset, buf, size);

if (!mem->map) {
nvrm_bo_host_unmap(bo);
Expand Down
6 changes: 5 additions & 1 deletion nvrm/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ struct nvrm_bo *nvrm_bo_create(struct nvrm_vspace *vas, uint64_t size, int sysra
bo->size = size;
bo->handle = nvrm_handle_alloc(bo->ctx);
uint32_t flags1 = sysram ? 0xd001 : 0x1d101;
uint32_t flags2 = sysram ? 0x3a000000 : 0x18000000;
#if 0
uint32_t flags2 = sysram ? 0x3a000000 : 0x18000000; /* snooped. */
#else
uint32_t flags2 = sysram ? 0x5a000000 : 0x18000000;
#endif
if (nvrm_ioctl_memory(bo->ctx, bo->dev->odev, bo->vas->ovas, bo->handle, flags1, flags2, 0, size))
goto out_bo;
if (nvrm_ioctl_vspace_map(bo->ctx, bo->dev->odev, bo->vas->odma, bo->handle, 0, size, &bo->gpu_addr))
Expand Down

0 comments on commit f0bb578

Please sign in to comment.