if (flags & DRM_FREEDRENO_GEM_SCANOUT)
req.flags |= MSM_BO_SCANOUT;
+ if (flags & DRM_FREEDRENO_GEM_GPUREADONLY)
+ req.flags |= MSM_BO_GPU_READONLY;
+
ret = drmCommandWriteRead(dev->fd, DRM_MSM_GEM_NEW,
&req, sizeof(req));
if (ret)
if (!suballoc_bo) {
// TODO possibly larger size for streaming bo?
- msm_ring->ring_bo = fd_bo_new_ring(
- submit->pipe->dev, 0x8000, 0);
+ msm_ring->ring_bo = fd_bo_new_ring(submit->pipe->dev,
+ 0x8000, DRM_FREEDRENO_GEM_GPUREADONLY);
msm_ring->offset = 0;
} else {
msm_ring->ring_bo = fd_bo_ref(suballoc_bo);
size = INIT_SIZE;
msm_ring->offset = 0;
- msm_ring->ring_bo = fd_bo_new_ring(submit->pipe->dev, size, 0);
+ msm_ring->ring_bo = fd_bo_new_ring(submit->pipe->dev, size,
+ DRM_FREEDRENO_GEM_GPUREADONLY);
}
if (!msm_ringbuffer_sp_init(msm_ring, size, flags))
finalize_current_cmd(ring);
fd_bo_del(msm_ring->ring_bo);
- msm_ring->ring_bo = fd_bo_new_ring(pipe->dev, size, 0);
+ msm_ring->ring_bo = fd_bo_new_ring(pipe->dev, size,
+ DRM_FREEDRENO_GEM_GPUREADONLY);
ring->start = fd_bo_map(msm_ring->ring_bo);
ring->end = &(ring->start[size/4]);
msm_ring->u.pipe = pipe;
msm_ring->offset = 0;
- msm_ring->ring_bo = fd_bo_new_ring(pipe->dev, size, 0);
+ msm_ring->ring_bo = fd_bo_new_ring(pipe->dev, size,
+ DRM_FREEDRENO_GEM_GPUREADONLY);
msm_ring->base.refcnt = 1;
return msm_ringbuffer_sp_init(msm_ring, size, _FD_RINGBUFFER_OBJECT);