Commit f9e81b8d authored by Sean Paul's avatar Sean Paul Committed by Rob Clark

drm/msm: dpu: Remove crtc_lock

Each time it's called we're holding the crtc modeset lock, so it's
redundant.

Changes in v2:
- None
Reviewed-by: default avatarJeykumar Sankaran <jsanka@codeaurora.org>
Signed-off-by: default avatarSean Paul <seanpaul@chromium.org>
Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
parent 3e46c5df
...@@ -69,7 +69,6 @@ static void dpu_crtc_destroy(struct drm_crtc *crtc) ...@@ -69,7 +69,6 @@ static void dpu_crtc_destroy(struct drm_crtc *crtc)
return; return;
drm_crtc_cleanup(crtc); drm_crtc_cleanup(crtc);
mutex_destroy(&dpu_crtc->crtc_lock);
kfree(dpu_crtc); kfree(dpu_crtc);
} }
...@@ -833,8 +832,6 @@ static void dpu_crtc_disable(struct drm_crtc *crtc, ...@@ -833,8 +832,6 @@ static void dpu_crtc_disable(struct drm_crtc *crtc,
old_crtc_state->encoder_mask) old_crtc_state->encoder_mask)
dpu_encoder_assign_crtc(encoder, NULL); dpu_encoder_assign_crtc(encoder, NULL);
mutex_lock(&dpu_crtc->crtc_lock);
/* wait for frame_event_done completion */ /* wait for frame_event_done completion */
if (_dpu_crtc_wait_for_frame_done(crtc)) if (_dpu_crtc_wait_for_frame_done(crtc))
DPU_ERROR("crtc%d wait for frame done failed;frame_pending%d\n", DPU_ERROR("crtc%d wait for frame done failed;frame_pending%d\n",
...@@ -863,8 +860,6 @@ static void dpu_crtc_disable(struct drm_crtc *crtc, ...@@ -863,8 +860,6 @@ static void dpu_crtc_disable(struct drm_crtc *crtc,
cstate->bw_control = false; cstate->bw_control = false;
cstate->bw_split_vote = false; cstate->bw_split_vote = false;
mutex_unlock(&dpu_crtc->crtc_lock);
if (crtc->state->event && !crtc->state->active) { if (crtc->state->event && !crtc->state->active) {
spin_lock_irqsave(&crtc->dev->event_lock, flags); spin_lock_irqsave(&crtc->dev->event_lock, flags);
drm_crtc_send_vblank_event(crtc, crtc->state->event); drm_crtc_send_vblank_event(crtc, crtc->state->event);
...@@ -897,12 +892,9 @@ static void dpu_crtc_enable(struct drm_crtc *crtc, ...@@ -897,12 +892,9 @@ static void dpu_crtc_enable(struct drm_crtc *crtc,
dpu_encoder_register_frame_event_callback(encoder, dpu_encoder_register_frame_event_callback(encoder,
dpu_crtc_frame_event_cb, (void *)crtc); dpu_crtc_frame_event_cb, (void *)crtc);
mutex_lock(&dpu_crtc->crtc_lock);
trace_dpu_crtc_enable(DRMID(crtc), true, dpu_crtc); trace_dpu_crtc_enable(DRMID(crtc), true, dpu_crtc);
dpu_crtc->enabled = true; dpu_crtc->enabled = true;
mutex_unlock(&dpu_crtc->crtc_lock);
drm_for_each_encoder_mask(encoder, crtc->dev, crtc->state->encoder_mask) drm_for_each_encoder_mask(encoder, crtc->dev, crtc->state->encoder_mask)
dpu_encoder_assign_crtc(encoder, crtc); dpu_encoder_assign_crtc(encoder, crtc);
...@@ -1204,7 +1196,6 @@ static int _dpu_debugfs_status_show(struct seq_file *s, void *data) ...@@ -1204,7 +1196,6 @@ static int _dpu_debugfs_status_show(struct seq_file *s, void *data)
drm_modeset_lock_all(crtc->dev); drm_modeset_lock_all(crtc->dev);
cstate = to_dpu_crtc_state(crtc->state); cstate = to_dpu_crtc_state(crtc->state);
mutex_lock(&dpu_crtc->crtc_lock);
mode = &crtc->state->adjusted_mode; mode = &crtc->state->adjusted_mode;
out_width = _dpu_crtc_get_mixer_width(cstate, mode); out_width = _dpu_crtc_get_mixer_width(cstate, mode);
...@@ -1291,7 +1282,6 @@ static int _dpu_debugfs_status_show(struct seq_file *s, void *data) ...@@ -1291,7 +1282,6 @@ static int _dpu_debugfs_status_show(struct seq_file *s, void *data)
dpu_crtc->vblank_cb_time = ktime_set(0, 0); dpu_crtc->vblank_cb_time = ktime_set(0, 0);
} }
mutex_unlock(&dpu_crtc->crtc_lock);
drm_modeset_unlock_all(crtc->dev); drm_modeset_unlock_all(crtc->dev);
return 0; return 0;
...@@ -1441,7 +1431,6 @@ struct drm_crtc *dpu_crtc_init(struct drm_device *dev, struct drm_plane *plane, ...@@ -1441,7 +1431,6 @@ struct drm_crtc *dpu_crtc_init(struct drm_device *dev, struct drm_plane *plane,
crtc = &dpu_crtc->base; crtc = &dpu_crtc->base;
crtc->dev = dev; crtc->dev = dev;
mutex_init(&dpu_crtc->crtc_lock);
spin_lock_init(&dpu_crtc->spin_lock); spin_lock_init(&dpu_crtc->spin_lock);
atomic_set(&dpu_crtc->frame_pending, 0); atomic_set(&dpu_crtc->frame_pending, 0);
......
...@@ -140,7 +140,6 @@ struct dpu_crtc_frame_event { ...@@ -140,7 +140,6 @@ struct dpu_crtc_frame_event {
* @dirty_list : list of color processing features are dirty * @dirty_list : list of color processing features are dirty
* @ad_dirty: list containing ad properties that are dirty * @ad_dirty: list containing ad properties that are dirty
* @ad_active: list containing ad properties that are active * @ad_active: list containing ad properties that are active
* @crtc_lock : crtc lock around create, destroy and access.
* @frame_pending : Whether or not an update is pending * @frame_pending : Whether or not an update is pending
* @frame_events : static allocation of in-flight frame events * @frame_events : static allocation of in-flight frame events
* @frame_event_list : available frame event list * @frame_event_list : available frame event list
...@@ -173,8 +172,6 @@ struct dpu_crtc { ...@@ -173,8 +172,6 @@ struct dpu_crtc {
struct list_head ad_dirty; struct list_head ad_dirty;
struct list_head ad_active; struct list_head ad_active;
struct mutex crtc_lock;
atomic_t frame_pending; atomic_t frame_pending;
struct dpu_crtc_frame_event frame_events[DPU_CRTC_FRAME_EVENT_SIZE]; struct dpu_crtc_frame_event frame_events[DPU_CRTC_FRAME_EVENT_SIZE];
struct list_head frame_event_list; struct list_head frame_event_list;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment