Message ID | CAJZ5v0guHP=icMiRBZ1B4oWQVxrtN2Nt+aE_V1646PfpsKkiJg@mail.gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
[cut] >> It seems the default values for pm_qos have changed with the patch, and that >> breaks genpd at least. I only fixed PM runtime initially, but you could try >> this diff to fix the genpd part also: >> >> diff --git a/include/linux/pm_qos.h b/include/linux/pm_qos.h >> index d68b056..7c8f643 100644 >> --- a/include/linux/pm_qos.h >> +++ b/include/linux/pm_qos.h >> @@ -34,9 +34,9 @@ enum pm_qos_flags_status { >> #define PM_QOS_NETWORK_LAT_DEFAULT_VALUE (2000 * USEC_PER_SEC) >> #define PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE 0 >> #define PM_QOS_MEMORY_BANDWIDTH_DEFAULT_VALUE 0 >> -#define PM_QOS_RESUME_LATENCY_DEFAULT_VALUE 0 >> +#define PM_QOS_RESUME_LATENCY_DEFAULT_VALUE PM_QOS_LATENCY_ANY >> #define PM_QOS_RESUME_LATENCY_NO_CONSTRAINT PM_QOS_LATENCY_ANY >> -#define PM_QOS_LATENCY_TOLERANCE_DEFAULT_VALUE 0 >> +#define PM_QOS_LATENCY_TOLERANCE_DEFAULT_VALUE (-1) >> #define PM_QOS_LATENCY_TOLERANCE_NO_CONSTRAINT (-1) >> >> #define PM_QOS_FLAG_NO_POWER_OFF (1 << 0) > > This is the original change in pm_qos.h (up to the GMail-induced > whitespace breakage): > > -#define PM_QOS_DEFAULT_VALUE -1 > +#define PM_QOS_DEFAULT_VALUE (-1) > +#define PM_QOS_LATENCY_ANY S32_MAX > > #define PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE (2000 * USEC_PER_SEC) > #define PM_QOS_NETWORK_LAT_DEFAULT_VALUE (2000 * USEC_PER_SEC) > #define PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE 0 > #define PM_QOS_MEMORY_BANDWIDTH_DEFAULT_VALUE 0 > #define PM_QOS_RESUME_LATENCY_DEFAULT_VALUE 0 > +#define PM_QOS_RESUME_LATENCY_NO_CONSTRAINT PM_QOS_LATENCY_ANY OK, so I should have changed PM_QOS_RESUME_LATENCY_DEFAULT_VALUE to PM_QOS_LATENCY_ANY too, so that the default is still "no restriction". > #define PM_QOS_LATENCY_TOLERANCE_DEFAULT_VALUE 0 > #define PM_QOS_LATENCY_TOLERANCE_NO_CONSTRAINT (-1) > > -#define PM_QOS_LATENCY_ANY ((s32)(~(__u32)0 >> 1)) > > #define PM_QOS_FLAG_NO_POWER_OFF (1 << 0) > #define PM_QOS_FLAG_REMOTE_WAKEUP (1 << 1) Thanks, Rafael
--- drivers/base/power/domain_governor.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) Index: linux-pm/drivers/base/power/domain_governor.c =================================================================== --- linux-pm.orig/drivers/base/power/domain_governor.c +++ linux-pm/drivers/base/power/domain_governor.c @@ -83,12 +83,11 @@ static bool default_suspend_ok(struct de td->cached_suspend_ok = true; } else { constraint_ns -= td->suspend_latency_ns + td->resume_latency_ns; - if (constraint_ns > 0) { - td->effective_constraint_ns = constraint_ns; - td->cached_suspend_ok = true; - } else { - td->effective_constraint_ns = 0; - } + if (constraint_ns == 0) + return false; + + td->effective_constraint_ns = constraint_ns; + td->cached_suspend_ok = constraint_ns >= 0; } /*