RADEON_FLAG_VA_UNCACHED = (1 << 4),
RADEON_FLAG_IMPLICIT_SYNC = (1 << 5),
RADEON_FLAG_NO_INTERPROCESS_SHARING = (1 << 6),
+ RADEON_FLAG_READ_ONLY = (1 << 7),
};
enum radeon_bo_usage { /* bitfield */
uint32_t ops)
{
uint64_t flags = AMDGPU_VM_PAGE_READABLE |
- AMDGPU_VM_PAGE_WRITEABLE |
AMDGPU_VM_PAGE_EXECUTABLE;
if ((bo_flags & RADEON_FLAG_VA_UNCACHED) && ws->info.chip_class >= GFX9)
flags |= AMDGPU_VM_MTYPE_UC;
+ if (!(bo_flags & RADEON_FLAG_READ_ONLY))
+ flags |= AMDGPU_VM_PAGE_WRITEABLE;
+
size = ALIGN(size, getpagesize());
return amdgpu_bo_va_op_raw(ws->dev, bo, offset, size, addr,