From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
To: 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
Date: Thu, 10 Aug 2017 15:54:12 -0700 [thread overview]
Message-ID: <1502405652.20268.20.camel@linux.intel.com> (raw)
In-Reply-To: <146e121b5db84fb8a8aa692cee01cb7b@ausx13mpc120.AMER.DELL.COM>
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
>
> >
> > +
> > + 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
next prev parent reply other threads:[~2017-08-10 22:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-08 22:41 [PATCH v2 0/2] ACPI: Low power idle constraints check Srinivas Pandruvada
2017-08-08 22:41 ` [PATCH v2 1/2] PM / sleep: Export the setting of pm_debug_messages_on Srinivas Pandruvada
2017-08-08 22:41 ` [PATCH v2 2/2] ACPI / Sleep: Check low power idle constraints for debug only Srinivas Pandruvada
2017-08-09 23:17 ` Rafael J. Wysocki
2017-08-10 0:50 ` Srinivas Pandruvada
2017-08-10 22:07 ` Mario.Limonciello
2017-08-10 22:07 ` Mario.Limonciello
2017-08-10 22:54 ` Srinivas Pandruvada [this message]
2017-08-11 14:43 ` Mario.Limonciello
2017-08-11 14:43 ` Mario.Limonciello
2017-08-11 16:18 ` Srinivas Pandruvada
2017-08-12 14:07 ` Rafael J. Wysocki
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=1502405652.20268.20.camel@linux.intel.com \
--to=srinivas.pandruvada@linux.intel.com \
--cc=Mario.Limonciello@dell.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=rjw@rjwysocki.net \
/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.