/* * It seems that the DMC likes to transition between the DC states a lot * when there are no connected displays (no active power domains) during * command submission. * * This activity has negative impact on the performance of the chip with * huge latencies observed in the interrupt handler and elsewhere. * * Work around it by grabbing a GT IRQ power domain whilst there is any * GT activity, preventing any DC state transitions.
*/
gt->awake = intel_display_power_get(display, POWER_DOMAIN_GT_IRQ);
GEM_BUG_ON(!gt->awake);
/* Everything switched off, flush any residual interrupt just in case */
intel_synchronize_irq(i915);
/* Defer dropping the display power well for 100ms, it's slow! */
GEM_BUG_ON(!wakeref);
intel_display_power_put_async(display, POWER_DOMAIN_GT_IRQ, wakeref);
void intel_gt_pm_init_early(struct intel_gt *gt)
{ /* * We access the runtime_pm structure via gt->i915 here rather than * gt->uncore as we do elsewhere in the file because gt->uncore is not * yet initialized for all tiles at this point in the driver startup. * runtime_pm is per-device rather than per-tile, so this is still the * correct structure.
*/
intel_wakeref_init(>->wakeref, gt->i915, &wf_ops, "GT");
seqcount_mutex_init(>->stats.lock, >->wakeref.mutex);
}
void intel_gt_pm_init(struct intel_gt *gt)
{ /* * Enabling power-management should be "self-healing". If we cannot * enable a feature, simply leave it disabled with a notice to the * user.
*/
intel_rc6_init(>->rc6);
intel_rps_init(>->rps);
}
staticbool reset_engines(struct intel_gt *gt)
{ if (intel_gt_gpu_reset_clobbers_display(gt)) returnfalse;
/* Use a raw wakeref to avoid calling intel_display_power_get early */
wakeref = intel_runtime_pm_get(gt->uncore->rpm);
intel_uncore_forcewake_get(gt->uncore, FORCEWAKE_ALL);
intel_gt_check_clock_frequency(gt);
/* * As we have just resumed the machine and woken the device up from * deep PCI sleep (presumably D3_cold), assume the HW has been reset * back to defaults, recovering from whatever wedged state we left it * in and so worth trying to use the device once more.
*/ if (intel_gt_is_wedged(gt))
intel_gt_unset_wedged(gt);
/* For GuC mode, ensure submission is disabled before stopping ring */
intel_uc_reset_prepare(>->uc);
for_each_engine(engine, gt, id) { if (engine->reset.prepare)
engine->reset.prepare(engine);
void intel_gt_resume_early(struct intel_gt *gt)
{ /* * Sanitize steer semaphores during driver resume. This is necessary * to address observed cases of steer semaphores being * held after a suspend operation. Confirmation from the hardware team * assures the safety of this operation, as no lock acquisitions * by other agents occur during driver load/resume process.
*/
intel_gt_mcr_lock_sanitize(gt);
int intel_gt_resume(struct intel_gt *gt)
{ struct intel_engine_cs *engine; enum intel_engine_id id;
intel_wakeref_t wakeref; int err;
err = intel_gt_has_unrecoverable_error(gt); if (err) return err;
GT_TRACE(gt, "\n");
/* * After resume, we may need to poke into the pinned kernel * contexts to paper over any damage caused by the sudden suspend. * Only the kernel contexts should remain pinned over suspend, * allowing us to fixup the user contexts on their first pin.
*/
gt_sanitize(gt, true);
/* Only when the HW is re-initialised, can we replay the requests */
err = intel_gt_init_hw(gt); if (err) {
gt_probe_error(gt, "Failed to initialize GPU, declaring it wedged!\n"); goto err_wedged;
}
/* We expect to be idle already; but also want to be independent */
wait_for_suspend(gt);
if (is_mock_gt(gt)) return;
GEM_BUG_ON(gt->awake);
intel_uc_suspend(>->uc);
/* * On disabling the device, we want to turn off HW access to memory * that we no longer own. * * However, not all suspend-states disable the device. S0 (s2idle) * is effectively runtime-suspend, the device is left powered on * but needs to be put into a low power state. We need to keep * powermanagement enabled, but we also retain system state and so * it remains safe to keep on using our allocated memory.
*/ if (pm_suspend_target() == PM_SUSPEND_TO_IDLE) return;
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.