On Wed, Sep 30, 2015 at 11:49:44AM +0100, Emil Velikov wrote: > Hi Russell, > > On 29 September 2015 at 19:10, Russell King <rmk+kernel@xxxxxxxxxxxxxxxx> wrote: > > Rather than using a spinlock, use xchg() to atomically update > > dplane->old_fb. This allows us to eliminate dplane->lock. > > > > Signed-off-by: Russell King <rmk+kernel@xxxxxxxxxxxxxxxx> > > --- > [...] > > @@ -76,13 +75,10 @@ static void armada_ovl_retire_fb(struct armada_ovl_plane *dplane, > > { > > struct drm_framebuffer *old_fb; > > > > - spin_lock(&dplane->lock); > > - old_fb = dplane->old_fb; > > - dplane->old_fb = fb; > > - spin_unlock(&dplane->lock); > > + old_fb = xchg(&dplane->old_fb, fb); > > > > if (old_fb) > > - armada_drm_queue_unref_work(dplane->base.dev, old_fb); > > + armada_drm_queue_unref_work(dplane->base.base.dev, old_fb); > Shouldn't this be part of another patch ? Yes, you're right, it should be in: drm/armada: introduce generic armada_plane struct Now moved there, thanks. -- FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net. _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel