diff options
| author | Alan Kwong <akwong@codeaurora.org> | 2016-09-29 01:15:23 -0400 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-10-10 17:35:32 -0700 |
| commit | 148a1063fe46d7ae95ced51187b3fa55039d5bff (patch) | |
| tree | e7437deddb178ec8e3454f1626ba07edf92c7a02 /drivers/gpu | |
| parent | b6adc47c060ac847a42764e907ff8dcf043572aa (diff) | |
drm/msm/sde: add proper mode config lock to plane QoS check
Realtime QoS status is determined in plane atomic check using
mode config for_each macro. This macro requires locking of
mode config lock. Add lock to connector enumeration to avoid
any race conditions.
Change-Id: I6142536268c9261a7af12a8615fa0a2de17ba8e8
Signed-off-by: Alan Kwong <akwong@codeaurora.org>
Diffstat (limited to 'drivers/gpu')
| -rw-r--r-- | drivers/gpu/drm/msm/sde/sde_plane.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/sde/sde_plane.c b/drivers/gpu/drm/msm/sde/sde_plane.c index 77be4b59a77c..64227bf5be29 100644 --- a/drivers/gpu/drm/msm/sde/sde_plane.c +++ b/drivers/gpu/drm/msm/sde/sde_plane.c @@ -231,6 +231,7 @@ static bool _sde_plane_is_rt_pipe(struct drm_plane *plane, bool is_rt = false; /* check if this plane has a physical connector interface */ + mutex_lock(&plane->dev->mode_config.mutex); drm_for_each_connector(connector, plane->dev) if (connector->state && (connector->state->crtc == crtc) && @@ -239,6 +240,7 @@ static bool _sde_plane_is_rt_pipe(struct drm_plane *plane, is_rt = true; break; } + mutex_unlock(&plane->dev->mode_config.mutex); SDE_DEBUG("plane%u: pnum:%d rt:%d\n", plane->base.id, psde->pipe - SSPP_VIG0, is_rt); |
