result = intel_rc6_residency_ns(rc6, INTEL_RC6_RES_RC6); if (HAS_RC6p(rc6_to_i915(rc6)))
result += intel_rc6_residency_ns(rc6, INTEL_RC6_RES_RC6p); if (HAS_RC6pp(rc6_to_i915(rc6)))
result += intel_rc6_residency_ns(rc6, INTEL_RC6_RES_RC6pp);
if (has_power) {
rc0_power = div64_u64(NSEC_PER_SEC * rc0_sample_energy[1],
ktime_to_ns(dt));
if (!rc0_power) { if (rc0_freq)
pr_debug("No power measured while in RC0! GPU Freq: %uMHz in RC0\n",
rc0_freq); else
pr_err("No power and freq measured while in RC0\n");
err = -EINVAL; goto out_unlock;
}
}
if (has_power) {
rc6_power = div64_u64(NSEC_PER_SEC * rc6_sample_energy[1],
ktime_to_ns(dt));
pr_info("GPU consumed %lluuW in RC0 and %lluuW in RC6\n",
rc0_power, rc6_power);
if (2 * rc6_power > rc0_power) {
pr_err("GPU leaked energy while in RC6!\n" "GPU Freq: %uMHz in RC6 and %uMHz in RC0\n" "RC0 energy before & after sleep respectively: %lluuJ %lluuJ\n" "RC6 energy before & after sleep respectively: %lluuJ %lluuJ\n",
rc6_freq, rc0_freq, rc0_sample_energy[0], rc0_sample_energy[1],
rc6_sample_energy[0], rc6_sample_energy[1]);
diff = res[1] - res[0];
threshold = (9 * NSEC_PER_MSEC * sleep_time) / 10; if (diff < threshold)
pr_err("Did not enter RC6 properly, RC6 start residency=%lluns, RC6 end residency=%lluns\n",
res[0], res[1]);
err = -EINVAL; goto out_unlock;
}
}
/* Restore what should have been the original state! */
intel_rc6_unpark(rc6);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.