Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1709704
| From | <Mario.Limonciello@dell.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | RE: [PATCH v2 2/2] ACPI / Sleep: Check low power idle constraints for debug only |
| Date | 2017-08-11 16:50 +0200 |
| Message-ID | <udjqa-4KG-25@gated-at.bofh.it> (permalink) |
| References | <uclu1-6Bf-3@gated-at.bofh.it> <uclu1-6Bf-9@gated-at.bofh.it> <ud3Oq-3qn-9@gated-at.bofh.it> <ud4AO-3Hh-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
> -----Original Message-----
> From: Srinivas Pandruvada [mailto:srinivas.pandruvada@linux.intel.com]
> Sent: Thursday, August 10, 2017 5:54 PM
> To: Limonciello, Mario <Mario_Limonciello@Dell.com>; rjw@rjwysocki.net;
> lenb@kernel.org
> Cc: linux-pm@vger.kernel.org; linux-kernel@vger.kernel.org; linux-
> acpi@vger.kernel.org; lukas@wunner.de
> Subject: Re: [PATCH v2 2/2] ACPI / Sleep: Check low power idle constraints for
> debug only
>
> On Thu, 2017-08-10 at 22:07 +0000, Mario.Limonciello@dell.com wrote:
> >
> > >
> > >
> [...]
>
> > > +
> > > + ret = acpi_device_get_power(adev, &state);
> > > + if (!ret)
> > > + pr_debug("LPI: %s required min power state
> > > %d, current
> > > power state %d, real power state %d\n",
> > > + lpi_constraints_table[i].name,
> > > + lpi_constraints_table[i].min_dsta
> > > te,
> > > + adev->power.state, state);
> > Isn't this superfluous to be showing the state returned from
> > acpi_device_get_power and
> > also probing directly at the state? You can't just rely on the
> > information you got
> > back from apci_device_get_power?
> They can be different as one is real power state and the other is what
> was set.
> For example on Dell 9365 it shows
>
> [ 1924.393653] LPI: \_SB.PCI0.XHC required min power state 3, current
> power state 3, real power state 255
>
Isn't 255 ACPI_STATE_UNKNOWN? That makes it seem like it
is a logic problem in acpi_device_get_power (or somewhere down the chain)
doesn't it?
> >
> > >
> > > +
> > > + if (adev->flags.power_manageable && adev-
> > > >power.state <
> > > + lpi_constraints_table[i].m
> > > in_dstate)
> > > + pr_info("LPI: Constraint [%s] not
> > > matched\n",
> > > + lpi_constraints_table[i].name);
> > Similarly here, can't you just compare against &state instead?
> >
> The problem then the check will fail for XHCI on Dell 9365. So not
> using "state".
>
> Thanks,
> Srinivas
> > >
> > > + }
> > > +}
> > > +
> > > static void acpi_sleep_run_lps0_dsm(unsigned int func)
> > > {
> > > union acpi_object *out_obj;
> > > @@ -729,6 +886,9 @@ static int lps0_device_attach(struct
> > > acpi_device *adev,
> > > "_DSM function 0 evaluation
> > > failed\n");
> > > }
> > > ACPI_FREE(out_obj);
> > > +
> > > + lpi_device_get_constraints();
> > > +
> > > return 0;
> > > }
> > >
> > > @@ -773,6 +933,8 @@ static void acpi_freeze_wake(void)
> > > */
> > > if (acpi_sci_irq_valid() &&
> > > !irqd_is_wakeup_armed(irq_get_irq_data(acpi_sci_irq)))
> > > {
> > > + if (pm_debug_messages_enabled())
> > > + lpi_check_constraints();
> > > pm_system_cancel_wakeup();
> > > s2idle_wakeup = true;
> > > }
> > > --
> > > 2.7.5
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 2/2] ACPI / Sleep: Check low power idle constraints for debug only Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> - 2017-08-09 00:50 +0200
Re: [PATCH v2 2/2] ACPI / Sleep: Check low power idle constraints for debug only "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-08-10 01:30 +0200
Re: [PATCH v2 2/2] ACPI / Sleep: Check low power idle constraints for debug only Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> - 2017-08-10 03:00 +0200
RE: [PATCH v2 2/2] ACPI / Sleep: Check low power idle constraints for debug only <Mario.Limonciello@dell.com> - 2017-08-11 00:10 +0200
Re: [PATCH v2 2/2] ACPI / Sleep: Check low power idle constraints for debug only Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> - 2017-08-11 01:00 +0200
RE: [PATCH v2 2/2] ACPI / Sleep: Check low power idle constraints for debug only <Mario.Limonciello@dell.com> - 2017-08-11 16:50 +0200
Re: [PATCH v2 2/2] ACPI / Sleep: Check low power idle constraints for debug only Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> - 2017-08-11 18:20 +0200
Re: [PATCH v2 2/2] ACPI / Sleep: Check low power idle constraints for debug only "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-08-12 16:20 +0200
csiph-web