Skip to content

Commit

Permalink
drm/msm/gpu: make ringbuffer readonly
Browse files Browse the repository at this point in the history
The GPU has no business writing into the ringbuffer, let's make it
readonly to the GPU.

Fixes: 7198e6b ("drm/msm: add a3xx gpu support")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
  • Loading branch information
robclark committed Aug 17, 2020
1 parent f228af1 commit 352c83f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpu/drm/msm/msm_ringbuffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ struct msm_ringbuffer *msm_ringbuffer_new(struct msm_gpu *gpu, int id,
ring->id = id;

ring->start = msm_gem_kernel_new(gpu->dev, MSM_GPU_RINGBUFFER_SZ,
MSM_BO_WC, gpu->aspace, &ring->bo, &ring->iova);
MSM_BO_WC | MSM_BO_GPU_READONLY, gpu->aspace, &ring->bo,
&ring->iova);

if (IS_ERR(ring->start)) {
ret = PTR_ERR(ring->start);
Expand Down

0 comments on commit 352c83f

Please sign in to comment.