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, 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.


thanks,

Takashi
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://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