From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rick Kerkhof Subject: Re: Acer Aspire V7-582PG (Haswell, GTX 750M) fails to power off GPU via Power Resources Date: Thu, 27 Oct 2016 10:07:45 +0000 Message-ID: References: <20161026225641.GA27017@al> <20161027081748.GX1476@lahna.fi.intel.com> <20161027090604.GB27017@al> <20161027093011.GZ1476@lahna.fi.intel.com> <20161027095508.GA1476@lahna.fi.intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1517785870==" Return-path: In-Reply-To: <20161027095508.GA1476-3PARRvDOhMZrdx17CPfAsdBPR1lH4CV8@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: nouveau-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org Sender: "Nouveau" To: Mika Westerberg Cc: linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org List-Id: linux-acpi@vger.kernel.org --===============1517785870== Content-Type: multipart/alternative; boundary=089e012278cc50aaf7053fd5ea21 --089e012278cc50aaf7053fd5ea21 Content-Type: text/plain; charset=UTF-8 Op do 27 okt. 2016 om 11:59 schreef Mika Westerberg < mika.westerberg-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>: > On Thu, Oct 27, 2016 at 09:42:28AM +0000, Rick Kerkhof wrote: > > No, there are not. Here is the recursive directory listing: > > Are you able to try the following patch and send me dmesg (or attach it > to that bug)? It should show if the ACPI core even tries to add those > power resources. > > diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c > index fcd4ce6f78d5..af9c3e15dd74 100644 > --- a/drivers/acpi/power.c > +++ b/drivers/acpi/power.c > @@ -444,6 +444,9 @@ void acpi_power_add_remove_device(struct acpi_device > *adev, bool add) > if (!adev->power.flags.power_resources) > return; > > + acpi_handle_info(adev->handle, "Adding power resources for %s\n", > + dev_name(&adev->dev)); > + > for (state = ACPI_STATE_D0; state <= ACPI_STATE_D3_HOT; state++) > acpi_power_expose_hide(adev, > > &adev->power.states[state].resources, > Thank you for the patch, I have applied it to the kernel sources but I'm not sure how to proceed from now on. Should I compile the whole kernel or can I just build an out-of-tree acpi module? --089e012278cc50aaf7053fd5ea21 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Op do 27 okt. = 2016 om 11:59 schreef Mika Westerberg <mika.westerberg-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>:
On Thu, Oct 27, 2016 at 09:42:28AM +0000, Rick Kerk= hof wrote:
>=C2=A0 =C2=A0 No, there are not. Here is the recursive directory listin= g:

Are you able to try the following patch and send me dmesg (or attach it
to that bug)? It should show if the ACPI core even tries to add those
power resources.

diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c
index fcd4ce6f78d5..af9c3e15dd74 100644
--- a/drivers/acpi/power.c
+++ b/drivers/acpi/power.c
@@ -444,6 +444,9 @@ void acpi_power_add_remove_device(struct acpi_device *a= dev, bool add)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 if (!adev->power.flags.power_resources)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return;

+=C2=A0 =C2=A0 =C2=A0 =C2=A0acpi_handle_info(adev->handle, "Adding = power resources for %s\n",
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 dev_name(&adev->dev));
+
=C2=A0 =C2=A0 =C2=A0 =C2=A0 for (state =3D ACPI_STATE_D0; state <=3D ACP= I_STATE_D3_HOT; state++)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 acpi_power_expose_h= ide(adev,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&adev= ->power.states[state].resources,

Thank you for the patch, I have applied it to the kernel s= ources but I'm not sure how to proceed from now on. Should I compile th= e whole kernel or can I just build an out-of-tree acpi module?
<= /div> --089e012278cc50aaf7053fd5ea21-- --===============1517785870== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KTm91dmVhdSBt YWlsaW5nIGxpc3QKTm91dmVhdUBsaXN0cy5mcmVlZGVza3RvcC5vcmcKaHR0cHM6Ly9saXN0cy5m cmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9ub3V2ZWF1Cg== --===============1517785870==--