From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Dave Airlie <airlied@gmail.com>
Cc: dri-devel@lists.freedesktop.org,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
Linux PCI <linux-pci@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] nouveau: use new vga_switcheroo power domain.
Date: Wed, 9 Mar 2016 14:20:36 +0100 [thread overview]
Message-ID: <CAJZ5v0g6J0Lew=JxoTA35-JL4-wexWmNh=d_nTg_Ld=iA+RifA@mail.gmail.com> (raw)
In-Reply-To: <1457504045-12738-2-git-send-email-airlied@gmail.com>
On Wed, Mar 9, 2016 at 7:14 AM, Dave Airlie <airlied@gmail.com> wrote:
> From: Dave Airlie <airlied@redhat.com>
>
> This fixes GPU auto powerdown on the Lenovo W541,
> since we advertise Windows 2013 to the ACPI layer.
>
> Signed-off-by: Dave Airlie <airlied@redhat.com>
> ---
> drivers/gpu/drm/nouveau/nouveau_vga.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_vga.c b/drivers/gpu/drm/nouveau/nouveau_vga.c
> index af89c36..b987427f 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_vga.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_vga.c
> @@ -101,8 +101,12 @@ nouveau_vga_init(struct nouveau_drm *drm)
> runtime = true;
> vga_switcheroo_register_client(dev->pdev, &nouveau_switcheroo_ops, runtime);
>
> - if (runtime && nouveau_is_v1_dsm() && !nouveau_is_optimus())
> - vga_switcheroo_init_domain_pm_ops(drm->dev->dev, &drm->vga_pm_domain);
> + if (runtime) {
> + if (nouveau_is_v1_dsm() && !nouveau_is_optimus())
> + vga_switcheroo_init_domain_pm_ops(drm->dev->dev, &drm->vga_pm_domain);
> + else if (nouveau_is_optimus())
> + vga_switcheroo_init_parent_pr3_ops(drm->dev->dev, &drm->vga_pm_domain);
> + }
> }
>
> void
> @@ -117,7 +121,7 @@ nouveau_vga_fini(struct nouveau_drm *drm)
> runtime = true;
>
> vga_switcheroo_unregister_client(dev->pdev);
> - if (runtime && nouveau_is_v1_dsm() && !nouveau_is_optimus())
> + if (runtime && (nouveau_is_v1_dsm() || nouveau_is_optimus()))
> vga_switcheroo_fini_domain_pm_ops(drm->dev->dev);
> vga_client_register(dev->pdev, NULL, NULL, NULL);
> }
> --
Looks reasonable to me.
Thanks,
Rafael
next prev parent reply other threads:[~2016-03-09 13:20 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-09 6:14 [PATCH 1/2] vga_switcheroo: add power support for windows 10 machines Dave Airlie
2016-03-09 6:14 ` [PATCH 2/2] nouveau: use new vga_switcheroo power domain Dave Airlie
2016-03-09 13:20 ` Rafael J. Wysocki [this message]
2016-03-09 14:40 ` Lukas Wunner
2016-03-09 22:04 ` Dave Airlie
2016-03-15 20:47 ` Lukas Wunner
2016-03-09 13:19 ` [PATCH 1/2] vga_switcheroo: add power support for windows 10 machines Rafael J. Wysocki
2016-03-09 21:56 ` Dave Airlie
2016-03-10 20:57 ` Rafael J. Wysocki
2016-03-11 10:58 ` Mika Westerberg
2016-03-11 13:45 ` Rafael J. Wysocki
2016-03-14 2:19 ` Dave Airlie
2016-03-14 2:19 ` Dave Airlie
2016-03-14 9:43 ` Mika Westerberg
2016-03-14 9:47 ` Dave Airlie
2016-03-14 10:02 ` Daniel Vetter
2016-03-14 10:02 ` Daniel Vetter
2016-03-14 10:23 ` Mika Westerberg
2016-03-14 12:50 ` Rafael J. Wysocki
2016-03-14 14:30 ` Mika Westerberg
2016-03-15 13:39 ` Lukas Wunner
2016-03-15 13:39 ` Lukas Wunner
2016-03-15 13:57 ` Mika Westerberg
2016-03-14 14:30 ` Alex Deucher
2016-03-14 14:30 ` Alex Deucher
2016-03-09 14:33 ` Lukas Wunner
2016-03-09 14:33 ` Lukas Wunner
2016-03-09 16:52 ` Alex Deucher
2016-03-09 16:52 ` Alex Deucher
2016-03-09 20:17 ` Lukas Wunner
2016-03-09 20:17 ` Lukas Wunner
2016-03-09 20:22 ` Alex Deucher
2016-03-09 20:22 ` Alex Deucher
2016-03-09 22:02 ` Dave Airlie
2016-03-09 22:02 ` Dave Airlie
2016-03-09 22:00 ` Dave Airlie
2016-03-09 22:00 ` 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='CAJZ5v0g6J0Lew=JxoTA35-JL4-wexWmNh=d_nTg_Ld=iA+RifA@mail.gmail.com' \
--to=rafael@kernel.org \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
/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.