From: Peter Wu <lekensteyn@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: tiwai@suse.com
Subject: Re: [PATCH 1/4] gpu/vga_switcheroo: add driver control power feature. (v3)
Date: Thu, 01 Aug 2013 19:54:14 +0200 [thread overview]
Message-ID: <7475682.zspl4SL2PI@al> (raw)
In-Reply-To: <1375078019-25358-2-git-send-email-airlied@gmail.com>
Hi Dave,
I don't know anything of PM domains, but there was one minor thing I wanted to
mention, see below.
On Monday 29 July 2013 16:06:56 Dave Airlie wrote:
> From: Dave Airlie <airlied@dhcp-40-90.bne.redhat.com>
Something went wrong here I guess?
> [..]
>
> +static int vga_switcheroo_runtime_resume_hdmi_audio(struct device *dev)
> +{
> + struct pci_dev *pdev = to_pci_dev(dev);
> + int ret;
> + struct vga_switcheroo_client *client, *found = NULL;
> +
> + /* we need to check if we have to switch back on the video
> + device so the audio device can come back */
> + list_for_each_entry(client, &vgasr_priv.clients, list) {
> + if ((client->pdev->devfn & ~(0x7)) == (pdev->devfn & ~(0x7)) &&
> client_is_vga(client)) {
Less obfuscated:
PCI_SLOT(client->pdev->devfn) == PCI_SLOT(pdev->devfn)
> + found = client;
> + ret = pm_runtime_get_sync(&client->pdev->dev);
> + if (ret) {
> + if (ret != 1)
> + return ret;
> + }
> + break;
> + }
> + }
> + ret = dev->bus->pm->runtime_resume(dev);
> + if (ret)
> + return ret;
> +
> + /* put the reference for the gpu */
> + if (found)
> + pm_runtime_put_autosuspend(&found->pdev->dev);
> + return 0;
> +}
> [..]
Regards,
Peter
next prev parent reply other threads:[~2013-08-01 21:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-29 6:06 nouveau optimus dynamic power off Dave Airlie
2013-07-29 6:06 ` [PATCH 1/4] gpu/vga_switcheroo: add driver control power feature. (v3) Dave Airlie
2013-08-01 17:54 ` Peter Wu [this message]
2013-07-29 6:06 ` [PATCH 2/4] drm: allow open of dynamic off devices Dave Airlie
2013-07-29 6:06 ` [PATCH 3/4] nouveau: add runtime PM support (v0.7) Dave Airlie
2013-07-29 6:06 ` [PATCH 4/4] snd/hda: add runtime suspend/resume on optimus support Dave Airlie
2013-07-29 12:46 ` Takashi Iwai
2013-07-30 6:46 ` Dave Airlie
-- strict thread matches above, loose matches on Subject: below --
2013-07-30 1:50 [PATCH 1/4] gpu/vga_switcheroo: add driver control power feature. (v3) Hohahiu
2013-07-30 4:08 ` Dave Airlie
2013-08-05 2:56 optimus dynamic power patches Dave Airlie
2013-08-05 2:56 ` [PATCH 1/4] gpu/vga_switcheroo: add driver control power feature. (v3) Dave Airlie
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=7475682.zspl4SL2PI@al \
--to=lekensteyn@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=tiwai@suse.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).