diff options
author | Rob Clark <robdclark@chromium.org> | 2020-10-23 09:51:16 -0700 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2020-11-04 16:00:56 -0800 |
commit | 77d205290aa944895cf7e8bea500b8fd95a6b05b (patch) | |
tree | b2cc8fd3c7501168fc7a0ce2077af832dc9b8b19 /drivers/gpu/drm/msm/msm_ringbuffer.c | |
parent | 77c406038e830a4b6219b14a116cd2a6ac9f4908 (diff) | |
download | lwn-77d205290aa944895cf7e8bea500b8fd95a6b05b.tar.gz lwn-77d205290aa944895cf7e8bea500b8fd95a6b05b.zip |
drm/msm: Protect ring->submits with it's own lock
One less place to rely on dev->struct_mutex.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Jordan Crouse <jcrouse@codeaurora.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_ringbuffer.c')
-rw-r--r-- | drivers/gpu/drm/msm/msm_ringbuffer.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/msm_ringbuffer.c b/drivers/gpu/drm/msm/msm_ringbuffer.c index 1b6958e908dc..4d2a2a4abef8 100644 --- a/drivers/gpu/drm/msm/msm_ringbuffer.c +++ b/drivers/gpu/drm/msm/msm_ringbuffer.c @@ -46,6 +46,7 @@ struct msm_ringbuffer *msm_ringbuffer_new(struct msm_gpu *gpu, int id, ring->memptrs_iova = memptrs_iova; INIT_LIST_HEAD(&ring->submits); + spin_lock_init(&ring->submit_lock); spin_lock_init(&ring->preempt_lock); snprintf(name, sizeof(name), "gpu-ring-%d", ring->id); |