mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
2248a28384
In some circumstances the RC6 context can get corrupted. We can detect this and take the required action, that is disable RC6 and runtime PM. The HW recovers from the corrupted state after a system suspend/resume cycle, so detect the recovery and re-enable RC6 and runtime PM. v2: rebase (Mika) v3: - Move intel_suspend_gt_powersave() to the end of the GEM suspend sequence. - Add commit message. v4: - Rebased on intel_uncore_forcewake_put(i915->uncore, ...) API change. v5: - Rebased on latest upstream gt_pm refactoring. v6: - s/i915_rc6_/intel_rc6_/ - Don't return a value from i915_rc6_ctx_wa_check(). v7: - Rebased on latest gt rc6 refactoring. Signed-off-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com> [airlied: pull this later version of this patch into drm-next to make resolving the conflict mess easier.] Signed-off-by: Dave Airlie <airlied@redhat.com>
29 lines
686 B
C
29 lines
686 B
C
/*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
* Copyright © 2019 Intel Corporation
|
|
*/
|
|
|
|
#ifndef INTEL_RC6_H
|
|
#define INTEL_RC6_H
|
|
|
|
#include "i915_reg.h"
|
|
|
|
struct intel_engine_cs;
|
|
struct intel_rc6;
|
|
|
|
void intel_rc6_init(struct intel_rc6 *rc6);
|
|
void intel_rc6_fini(struct intel_rc6 *rc6);
|
|
|
|
void intel_rc6_sanitize(struct intel_rc6 *rc6);
|
|
void intel_rc6_enable(struct intel_rc6 *rc6);
|
|
void intel_rc6_disable(struct intel_rc6 *rc6);
|
|
|
|
u64 intel_rc6_residency_ns(struct intel_rc6 *rc6, i915_reg_t reg);
|
|
u64 intel_rc6_residency_us(struct intel_rc6 *rc6, i915_reg_t reg);
|
|
|
|
void intel_rc6_ctx_wa_check(struct intel_rc6 *rc6);
|
|
void intel_rc6_ctx_wa_resume(struct intel_rc6 *rc6);
|
|
|
|
#endif /* INTEL_RC6_H */
|