It serves no purpose, things should be sufficiently synchronized already
by atomic framework.  And it is somewhat awkward to be holding a spinlock
when msm_gem_iova() is going to start needing to grab a mutex.

Signed-off-by: Rob Clark <robdcl...@gmail.com>
---
 drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c 
b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c
index 5e11653..c7ea5a0 100644
--- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c
+++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c
@@ -22,8 +22,6 @@
 struct mdp5_plane {
        struct drm_plane base;
 
-       spinlock_t pipe_lock;     /* protect REG_MDP5_PIPE_* registers */
-
        uint32_t nformats;
        uint32_t formats[32];
 };
@@ -875,7 +873,6 @@ static int mdp5_plane_mode_set(struct drm_plane *plane,
                struct drm_crtc *crtc, struct drm_framebuffer *fb,
                struct drm_rect *src, struct drm_rect *dest)
 {
-       struct mdp5_plane *mdp5_plane = to_mdp5_plane(plane);
        struct drm_plane_state *pstate = plane->state;
        struct mdp5_hw_pipe *hwpipe = to_mdp5_plane_state(pstate)->hwpipe;
        struct mdp5_kms *mdp5_kms = get_kms(plane);
@@ -896,7 +893,6 @@ static int mdp5_plane_mode_set(struct drm_plane *plane,
        uint32_t src_img_w, src_img_h;
        uint32_t src_x_r;
        int crtc_x_r;
-       unsigned long flags;
        int ret;
 
        nplanes = fb->format->num_planes;
@@ -975,8 +971,6 @@ static int mdp5_plane_mode_set(struct drm_plane *plane,
        hflip = !!(rotation & DRM_REFLECT_X);
        vflip = !!(rotation & DRM_REFLECT_Y);
 
-       spin_lock_irqsave(&mdp5_plane->pipe_lock, flags);
-
        mdp5_hwpipe_mode_set(mdp5_kms, hwpipe, fb, &step, &pe,
                             config, hdecm, vdecm, hflip, vflip,
                             crtc_x, crtc_y, crtc_w, crtc_h,
@@ -989,8 +983,6 @@ static int mdp5_plane_mode_set(struct drm_plane *plane,
                                     src_img_w, src_img_h,
                                     src_x_r, src_y, src_w, src_h);
 
-       spin_unlock_irqrestore(&mdp5_plane->pipe_lock, flags);
-
        plane->fb = fb;
 
        return ret;
@@ -1132,8 +1124,6 @@ struct drm_plane *mdp5_plane_init(struct drm_device *dev,
        mdp5_plane->nformats = mdp_get_formats(mdp5_plane->formats,
                ARRAY_SIZE(mdp5_plane->formats), false);
 
-       spin_lock_init(&mdp5_plane->pipe_lock);
-
        if (type == DRM_PLANE_TYPE_CURSOR)
                ret = drm_universal_plane_init(dev, plane, 0xff,
                                &mdp5_cursor_plane_funcs,
-- 
2.9.4

_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno

Reply via email to