Commit ffa0c87f authored by Dmitry Baryshkov's avatar Dmitry Baryshkov

drm/msm/mdp5: drop global_state_lock

Since the commit b962a120 ("drm/atomic: integrate modeset lock with
private objects") the DRM framework no longer requires the external
lock for private objects. Drop the lock, letting the DRM to manage
private object locking.
Signed-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: default avatarAbhinav Kumar <quic_abhinavk@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/570183/
Link: https://lore.kernel.org/r/20231203000532.1290480-6-dmitry.baryshkov@linaro.org
parent f9c27e64
...@@ -84,11 +84,6 @@ struct mdp5_global_state *mdp5_get_global_state(struct drm_atomic_state *s) ...@@ -84,11 +84,6 @@ struct mdp5_global_state *mdp5_get_global_state(struct drm_atomic_state *s)
struct msm_drm_private *priv = s->dev->dev_private; struct msm_drm_private *priv = s->dev->dev_private;
struct mdp5_kms *mdp5_kms = to_mdp5_kms(to_mdp_kms(priv->kms)); struct mdp5_kms *mdp5_kms = to_mdp5_kms(to_mdp_kms(priv->kms));
struct drm_private_state *priv_state; struct drm_private_state *priv_state;
int ret;
ret = drm_modeset_lock(&mdp5_kms->glob_state_lock, s->acquire_ctx);
if (ret)
return ERR_PTR(ret);
priv_state = drm_atomic_get_private_obj_state(s, &mdp5_kms->glob_state); priv_state = drm_atomic_get_private_obj_state(s, &mdp5_kms->glob_state);
if (IS_ERR(priv_state)) if (IS_ERR(priv_state))
...@@ -138,8 +133,6 @@ static int mdp5_global_obj_init(struct mdp5_kms *mdp5_kms) ...@@ -138,8 +133,6 @@ static int mdp5_global_obj_init(struct mdp5_kms *mdp5_kms)
{ {
struct mdp5_global_state *state; struct mdp5_global_state *state;
drm_modeset_lock_init(&mdp5_kms->glob_state_lock);
state = kzalloc(sizeof(*state), GFP_KERNEL); state = kzalloc(sizeof(*state), GFP_KERNEL);
if (!state) if (!state)
return -ENOMEM; return -ENOMEM;
...@@ -580,7 +573,6 @@ static void mdp5_destroy(struct mdp5_kms *mdp5_kms) ...@@ -580,7 +573,6 @@ static void mdp5_destroy(struct mdp5_kms *mdp5_kms)
pm_runtime_disable(&mdp5_kms->pdev->dev); pm_runtime_disable(&mdp5_kms->pdev->dev);
drm_atomic_private_obj_fini(&mdp5_kms->glob_state); drm_atomic_private_obj_fini(&mdp5_kms->glob_state);
drm_modeset_lock_fini(&mdp5_kms->glob_state_lock);
} }
static int construct_pipes(struct mdp5_kms *mdp5_kms, int cnt, static int construct_pipes(struct mdp5_kms *mdp5_kms, int cnt,
......
...@@ -40,7 +40,6 @@ struct mdp5_kms { ...@@ -40,7 +40,6 @@ struct mdp5_kms {
* Global private object state, Do not access directly, use * Global private object state, Do not access directly, use
* mdp5_global_get_state() * mdp5_global_get_state()
*/ */
struct drm_modeset_lock glob_state_lock;
struct drm_private_obj glob_state; struct drm_private_obj glob_state;
struct mdp5_smp *smp; struct mdp5_smp *smp;
......
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