summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/msm/msm_rd.c
diff options
context:
space:
mode:
authorRob Clark <robdclark@chromium.org>2021-07-28 04:06:14 +0300
committerRob Clark <robdclark@chromium.org>2021-07-28 19:19:00 +0300
commit1d8a5ca436ee4a28eec14cb813f790f7cdeeee19 (patch)
tree4e7ef645394d0de1d8fe506ed776e24fc7198611 /drivers/gpu/drm/msm/msm_rd.c
parent79341eb74c1fd193fe17b015c856e713e82650a2 (diff)
downloadlinux-1d8a5ca436ee4a28eec14cb813f790f7cdeeee19.tar.xz
drm/msm: Conversion to drm scheduler
For existing adrenos, there is one or more ringbuffer, depending on whether preemption is supported. When preemption is supported, each ringbuffer has it's own priority. A submitqueue (which maps to a gl context or vk queue in userspace) is mapped to a specific ring- buffer at creation time, based on the submitqueue's priority. Each ringbuffer has it's own drm_gpu_scheduler. Each submitqueue maps to a drm_sched_entity. And each submit maps to a drm_sched_job. Closes: https://gitlab.freedesktop.org/drm/msm/-/issues/4 Signed-off-by: Rob Clark <robdclark@chromium.org> Acked-by: Christian König <christian.koenig@amd.com> Link: https://lore.kernel.org/r/20210728010632.2633470-10-robdclark@gmail.com Signed-off-by: Rob Clark <robdclark@chromium.org>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_rd.c')
-rw-r--r--drivers/gpu/drm/msm/msm_rd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/msm/msm_rd.c b/drivers/gpu/drm/msm/msm_rd.c
index 659e5cc4b40a..b55398a34fa4 100644
--- a/drivers/gpu/drm/msm/msm_rd.c
+++ b/drivers/gpu/drm/msm/msm_rd.c
@@ -325,15 +325,19 @@ static void snapshot_buf(struct msm_rd_state *rd,
if (!(submit->bos[idx].flags & MSM_SUBMIT_BO_READ))
return;
+ msm_gem_lock(&obj->base);
buf = msm_gem_get_vaddr_active(&obj->base);
if (IS_ERR(buf))
- return;
+ goto out_unlock;
buf += offset;
rd_write_section(rd, RD_BUFFER_CONTENTS, buf, size);
msm_gem_put_vaddr_locked(&obj->base);
+
+out_unlock:
+ msm_gem_unlock(&obj->base);
}
/* called under struct_mutex */