On Mon, Nov 05, 2018 at 01:51:23PM +0100, Takashi Iwai wrote:
> On Mon, 05 Nov 2018 12:55:17 +0100, Lukas Wunner wrote:
> > On Mon, Nov 05, 2018 at 12:02:53PM +0100, Takashi Iwai wrote:
> > > diff --git a/drivers/gpu/vga/vga_switcheroo.c 
> > > b/drivers/gpu/vga/vga_switcheroo.c
> > > index cf2a18571d48..a132c37d7334 100644
> > > --- a/drivers/gpu/vga/vga_switcheroo.c
> > > +++ b/drivers/gpu/vga/vga_switcheroo.c
> > > @@ -380,6 +380,9 @@ int vga_switcheroo_register_audio_client(struct 
> > > pci_dev *pdev,
> > >                   mutex_unlock(&vgasr_mutex);
> > >                   return -EINVAL;
> > >           }
> > > +         /* notify if GPU has been already bound */
> > > +         if (ops->gpu_bound)
> > > +                 ops->gpu_bound(pdev, id);
> > >   }
> > >   mutex_unlock(&vgasr_mutex);
> > 
> > If the audio client registers before vga_switcheroo becomes enabled,
> > ->gpu_bound will be executed twice.
> 
> Is it?  The addition is in the if-block of vgasr_priv.active, so this
> is executed only when vga_switcheroo_enable() was already called
> beforehand.

Ugh, you're absolutely right, sorry for the noise.

Lukas
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to