Re: [PATCH 08/20] drm/armada: use xchg() to atomically update dplane->old_fb

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 ?

-Emil
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux