Re: [PATCH] vga_switcheroo: Fix missing gpu_bound call at audio client registration

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

 



On Mon, Nov 05, 2018 at 02:11:06PM +0100, Takashi Iwai wrote:
> On Mon, 05 Nov 2018 13:59:37 +0100, Lukas Wunner wrote:
> > 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.
> 
> OK, then let's queue the fix.
> 
> Would you take it and go through drm merges, or shall I take it via
> sound git tree?  I don't mind either way.

It looks like commit 37a3a98ef601 (which this one is fixing) went in
through the sound tree, so I think it makes sense to use it for this
patch as well.

Thanks,

Lukas
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux