All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Lukas Wunner <lukas@wunner.de>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>,
	Sean Paul <sean@poorly.run>,
	alsa-devel@alsa-project.org,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] vga_switcheroo: Fix missing gpu_bound call at audio client registration
Date: Mon, 05 Nov 2018 14:11:06 +0100	[thread overview]
Message-ID: <s5htvkv3c0l.wl-tiwai@suse.de> (raw)
In-Reply-To: <20181105125937.nwbh6qjxkzo7rwap@wunner.de>

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

  reply	other threads:[~2018-11-05 13:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-05 11:02 [PATCH] vga_switcheroo: Fix missing gpu_bound call at audio client registration Takashi Iwai
2018-11-05 11:55 ` Lukas Wunner
2018-11-05 12:51   ` Takashi Iwai
2018-11-05 12:59     ` Lukas Wunner
2018-11-05 13:11       ` Takashi Iwai [this message]
2018-11-05 13:38         ` Lukas Wunner
2018-11-05 13:56           ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5htvkv3c0l.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=lukas@wunner.de \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=maxime.ripard@bootlin.com \
    --cc=sean@poorly.run \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.