#include <drm/drm_managed.h>
#include <linux/pm_runtime.h>
#include "gt/intel_gt.h"
#include "gt/intel_engine_regs.h"
#include "gt/intel_gt_regs.h"
#include "i915_drv.h"
#include "i915_iosf_mbi.h"
#include "i915_reg.h"
#include "i915_trace.h"
#include "i915_vgpu.h"
#define FORCEWAKE_ACK_TIMEOUT_MS …
#define GT_FIFO_TIMEOUT_MS …
#define __raw_posting_read(...) …
static void
fw_domains_get(struct intel_uncore *uncore, enum forcewake_domains fw_domains)
{ … }
void
intel_uncore_mmio_debug_init_early(struct drm_i915_private *i915)
{ … }
static void mmio_debug_suspend(struct intel_uncore *uncore)
{ … }
static bool check_for_unclaimed_mmio(struct intel_uncore *uncore);
static void mmio_debug_resume(struct intel_uncore *uncore)
{ … }
static const char * const forcewake_domain_names[] = …;
const char *
intel_uncore_forcewake_domain_to_str(const enum forcewake_domain_id id)
{ … }
#define fw_ack(d) …
#define fw_set(d, val) …
#define fw_clear(d, val) …
static inline void
fw_domain_reset(const struct intel_uncore_forcewake_domain *d)
{ … }
static inline void
fw_domain_arm_timer(struct intel_uncore_forcewake_domain *d)
{ … }
static inline int
__wait_for_ack(const struct intel_uncore_forcewake_domain *d,
const u32 ack,
const u32 value)
{ … }
static inline int
wait_ack_clear(const struct intel_uncore_forcewake_domain *d,
const u32 ack)
{ … }
static inline int
wait_ack_set(const struct intel_uncore_forcewake_domain *d,
const u32 ack)
{ … }
static inline void
fw_domain_wait_ack_clear(const struct intel_uncore_forcewake_domain *d)
{ … }
enum ack_type { … };
static int
fw_domain_wait_ack_with_fallback(const struct intel_uncore_forcewake_domain *d,
const enum ack_type type)
{ … }
static inline void
fw_domain_wait_ack_clear_fallback(const struct intel_uncore_forcewake_domain *d)
{ … }
static inline void
fw_domain_get(const struct intel_uncore_forcewake_domain *d)
{ … }
static inline void
fw_domain_wait_ack_set(const struct intel_uncore_forcewake_domain *d)
{ … }
static inline void
fw_domain_wait_ack_set_fallback(const struct intel_uncore_forcewake_domain *d)
{ … }
static inline void
fw_domain_put(const struct intel_uncore_forcewake_domain *d)
{ … }
static void
fw_domains_get_normal(struct intel_uncore *uncore, enum forcewake_domains fw_domains)
{ … }
static void
fw_domains_get_with_fallback(struct intel_uncore *uncore,
enum forcewake_domains fw_domains)
{ … }
static void
fw_domains_put(struct intel_uncore *uncore, enum forcewake_domains fw_domains)
{ … }
static void
fw_domains_reset(struct intel_uncore *uncore,
enum forcewake_domains fw_domains)
{ … }
static inline u32 gt_thread_status(struct intel_uncore *uncore)
{ … }
static void __gen6_gt_wait_for_thread_c0(struct intel_uncore *uncore)
{ … }
static void fw_domains_get_with_thread_status(struct intel_uncore *uncore,
enum forcewake_domains fw_domains)
{ … }
static inline u32 fifo_free_entries(struct intel_uncore *uncore)
{ … }
static void __gen6_gt_wait_for_fifo(struct intel_uncore *uncore)
{ … }
static enum hrtimer_restart
intel_uncore_fw_release_timer(struct hrtimer *timer)
{ … }
static unsigned int
intel_uncore_forcewake_reset(struct intel_uncore *uncore)
{ … }
static bool
fpga_check_for_unclaimed_mmio(struct intel_uncore *uncore)
{ … }
static bool
vlv_check_for_unclaimed_mmio(struct intel_uncore *uncore)
{ … }
static bool
gen6_check_for_fifo_debug(struct intel_uncore *uncore)
{ … }
static bool
check_for_unclaimed_mmio(struct intel_uncore *uncore)
{ … }
static void forcewake_early_sanitize(struct intel_uncore *uncore,
unsigned int restore_forcewake)
{ … }
void intel_uncore_suspend(struct intel_uncore *uncore)
{ … }
void intel_uncore_resume_early(struct intel_uncore *uncore)
{ … }
void intel_uncore_runtime_resume(struct intel_uncore *uncore)
{ … }
static void __intel_uncore_forcewake_get(struct intel_uncore *uncore,
enum forcewake_domains fw_domains)
{ … }
void intel_uncore_forcewake_get(struct intel_uncore *uncore,
enum forcewake_domains fw_domains)
{ … }
void intel_uncore_forcewake_user_get(struct intel_uncore *uncore)
{ … }
void intel_uncore_forcewake_user_put(struct intel_uncore *uncore)
{ … }
void intel_uncore_forcewake_get__locked(struct intel_uncore *uncore,
enum forcewake_domains fw_domains)
{ … }
static void __intel_uncore_forcewake_put(struct intel_uncore *uncore,
enum forcewake_domains fw_domains,
bool delayed)
{ … }
void intel_uncore_forcewake_put(struct intel_uncore *uncore,
enum forcewake_domains fw_domains)
{ … }
void intel_uncore_forcewake_put_delayed(struct intel_uncore *uncore,
enum forcewake_domains fw_domains)
{ … }
void intel_uncore_forcewake_flush(struct intel_uncore *uncore,
enum forcewake_domains fw_domains)
{ … }
void intel_uncore_forcewake_put__locked(struct intel_uncore *uncore,
enum forcewake_domains fw_domains)
{ … }
void assert_forcewakes_inactive(struct intel_uncore *uncore)
{ … }
void assert_forcewakes_active(struct intel_uncore *uncore,
enum forcewake_domains fw_domains)
{ … }
#define NEEDS_FORCE_WAKE(reg) …
static int fw_range_cmp(u32 offset, const struct intel_forcewake_range *entry)
{ … }
#define BSEARCH(key, base, num, cmp) …
static enum forcewake_domains
find_fw_domain(struct intel_uncore *uncore, u32 offset)
{ … }
static const struct i915_range gen8_shadowed_regs[] = …;
static const struct i915_range gen11_shadowed_regs[] = …;
static const struct i915_range gen12_shadowed_regs[] = …;
static const struct i915_range dg2_shadowed_regs[] = …;
static const struct i915_range mtl_shadowed_regs[] = …;
static const struct i915_range xelpmp_shadowed_regs[] = …;
static int mmio_range_cmp(u32 key, const struct i915_range *range)
{ … }
static bool is_shadowed(struct intel_uncore *uncore, u32 offset)
{ … }
static enum forcewake_domains
gen6_reg_write_fw_domains(struct intel_uncore *uncore, i915_reg_t reg)
{ … }
#define __fwtable_reg_read_fw_domains(uncore, offset) …
#define __fwtable_reg_write_fw_domains(uncore, offset) …
#define GEN_FW_RANGE(s, e, d) …
static const struct intel_forcewake_range __gen6_fw_ranges[] = …;
static const struct intel_forcewake_range __vlv_fw_ranges[] = …;
static const struct intel_forcewake_range __chv_fw_ranges[] = …;
static const struct intel_forcewake_range __gen9_fw_ranges[] = …;
static const struct intel_forcewake_range __gen11_fw_ranges[] = …;
static const struct intel_forcewake_range __gen12_fw_ranges[] = …;
static const struct intel_forcewake_range __dg2_fw_ranges[] = …;
static const struct intel_forcewake_range __mtl_fw_ranges[] = …;
static const struct intel_forcewake_range __xelpmp_fw_ranges[] = …;
static void
ilk_dummy_write(struct intel_uncore *uncore)
{ … }
static void
__unclaimed_reg_debug(struct intel_uncore *uncore,
const i915_reg_t reg,
const bool read)
{ … }
static void
__unclaimed_previous_reg_debug(struct intel_uncore *uncore,
const i915_reg_t reg,
const bool read)
{ … }
static inline bool __must_check
unclaimed_reg_debug_header(struct intel_uncore *uncore,
const i915_reg_t reg, const bool read)
{ … }
static inline void
unclaimed_reg_debug_footer(struct intel_uncore *uncore,
const i915_reg_t reg, const bool read)
{ … }
#define __vgpu_read(x) …
__vgpu_read(…)
__vgpu_read(…)
__vgpu_read(…)
__vgpu_read(…)
#define GEN2_READ_HEADER …
#define GEN2_READ_FOOTER …
#define __gen2_read …
#define __gen5_read …
__gen5_read(8)
__gen5_read(16)
__gen5_read(32)
__gen5_read(64)
__gen2_read(8)
__gen2_read(16)
__gen2_read(32)
__gen2_read(64)
#undef __gen5_read
#undef __gen2_read
#undef GEN2_READ_FOOTER
#undef GEN2_READ_HEADER
#define GEN6_READ_HEADER …
#define GEN6_READ_FOOTER …
static noinline void ___force_wake_auto(struct intel_uncore *uncore,
enum forcewake_domains fw_domains)
{ … }
static inline void __force_wake_auto(struct intel_uncore *uncore,
enum forcewake_domains fw_domains)
{ … }
#define __gen_fwtable_read …
static enum forcewake_domains
fwtable_reg_read_fw_domains(struct intel_uncore *uncore, i915_reg_t reg) { … }
__gen_fwtable_read(8)
__gen_fwtable_read(16)
__gen_fwtable_read(32)
__gen_fwtable_read(64)
#undef __gen_fwtable_read
#undef GEN6_READ_FOOTER
#undef GEN6_READ_HEADER
#define GEN2_WRITE_HEADER … \
#define GEN2_WRITE_FOOTER
#define __gen2_write …
#define __gen5_write …
__gen5_write
__gen5_write
__gen5_write
__gen2_write
__gen2_write
__gen2_write
#undef __gen5_write
#undef __gen2_write
#undef GEN2_WRITE_FOOTER
#undef GEN2_WRITE_HEADER
#define GEN6_WRITE_HEADER …
#define GEN6_WRITE_FOOTER …
#define __gen6_write(x) …
__gen6_write(…)
__gen6_write(…)
__gen6_write(…)
#define __gen_fwtable_write …
static enum forcewake_domains
fwtable_reg_write_fw_domains(struct intel_uncore *uncore, i915_reg_t reg)
{ … }
__gen_fwtable_write
__gen_fwtable_write
__gen_fwtable_write
#undef __gen_fwtable_write
#undef GEN6_WRITE_FOOTER
#undef GEN6_WRITE_HEADER
#define __vgpu_write(x) …
__vgpu_write(…)
__vgpu_write(…)
__vgpu_write(…)
#define ASSIGN_RAW_WRITE_MMIO_VFUNCS(uncore, x) …
#define ASSIGN_RAW_READ_MMIO_VFUNCS(uncore, x) …
#define ASSIGN_WRITE_MMIO_VFUNCS(uncore, x) …
#define ASSIGN_READ_MMIO_VFUNCS(uncore, x) …
static int __fw_domain_init(struct intel_uncore *uncore,
enum forcewake_domain_id domain_id,
i915_reg_t reg_set,
i915_reg_t reg_ack)
{ … }
static void fw_domain_fini(struct intel_uncore *uncore,
enum forcewake_domain_id domain_id)
{ … }
static void intel_uncore_fw_domains_fini(struct intel_uncore *uncore)
{ … }
static const struct intel_uncore_fw_get uncore_get_fallback = …;
static const struct intel_uncore_fw_get uncore_get_normal = …;
static const struct intel_uncore_fw_get uncore_get_thread_status = …;
static int intel_uncore_fw_domains_init(struct intel_uncore *uncore)
{ … }
#define ASSIGN_FW_DOMAINS_TABLE(uncore, d) …
#define ASSIGN_SHADOW_TABLE(uncore, d) …
static int i915_pmic_bus_access_notifier(struct notifier_block *nb,
unsigned long action, void *data)
{ … }
static void uncore_unmap_mmio(struct drm_device *drm, void *regs)
{ … }
int intel_uncore_setup_mmio(struct intel_uncore *uncore, phys_addr_t phys_addr)
{ … }
void intel_uncore_init_early(struct intel_uncore *uncore,
struct intel_gt *gt)
{ … }
static void uncore_raw_init(struct intel_uncore *uncore)
{ … }
static int uncore_media_forcewake_init(struct intel_uncore *uncore)
{ … }
static int uncore_forcewake_init(struct intel_uncore *uncore)
{ … }
static int sanity_check_mmio_access(struct intel_uncore *uncore)
{ … }
int intel_uncore_init_mmio(struct intel_uncore *uncore)
{ … }
void intel_uncore_prune_engine_fw_domains(struct intel_uncore *uncore,
struct intel_gt *gt)
{ … }
static void driver_initiated_flr(struct intel_uncore *uncore)
{ … }
void intel_uncore_fini_mmio(struct drm_device *dev, void *data)
{ … }
int __intel_wait_for_register_fw(struct intel_uncore *uncore,
i915_reg_t reg,
u32 mask,
u32 value,
unsigned int fast_timeout_us,
unsigned int slow_timeout_ms,
u32 *out_value)
{ … }
int __intel_wait_for_register(struct intel_uncore *uncore,
i915_reg_t reg,
u32 mask,
u32 value,
unsigned int fast_timeout_us,
unsigned int slow_timeout_ms,
u32 *out_value)
{ … }
bool intel_uncore_unclaimed_mmio(struct intel_uncore *uncore)
{ … }
bool
intel_uncore_arm_unclaimed_mmio_detection(struct intel_uncore *uncore)
{ … }
enum forcewake_domains
intel_uncore_forcewake_for_reg(struct intel_uncore *uncore,
i915_reg_t reg, unsigned int op)
{ … }
#if IS_ENABLED(CONFIG_DRM_I915_SELFTEST)
#include "selftests/mock_uncore.c"
#include "selftests/intel_uncore.c"
#endif