Skip to content

Commit

Permalink
drm/msm/dpu: Correct dpu encoder spinlock initialization
Browse files Browse the repository at this point in the history
dpu encoder spinlock should be initialized during dpu encoder
init instead of dpu encoder setup which is part of modeset init.

Signed-off-by: Shubhashree Dhar <dhar@codeaurora.org>
[seanpaul resolved conflict in old init removal and revised the commit message]
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1561357632-15361-1-git-send-email-dhar@codeaurora.org
  • Loading branch information
Shubhashree Dhar authored and Sean Paul committed Jul 22, 2019
1 parent 7af5cdb commit 2e7b801
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -2221,8 +2221,6 @@ int dpu_encoder_setup(struct drm_device *dev, struct drm_encoder *enc,
if (ret)
goto fail;

spin_lock_init(&dpu_enc->enc_spinlock);

atomic_set(&dpu_enc->frame_done_timeout_ms, 0);
timer_setup(&dpu_enc->frame_done_timer,
dpu_encoder_frame_done_timeout, 0);
Expand Down Expand Up @@ -2276,6 +2274,7 @@ struct drm_encoder *dpu_encoder_init(struct drm_device *dev,

drm_encoder_helper_add(&dpu_enc->base, &dpu_encoder_helper_funcs);

spin_lock_init(&dpu_enc->enc_spinlock);
dpu_enc->enabled = false;

return &dpu_enc->base;
Expand Down

0 comments on commit 2e7b801

Please sign in to comment.