#include <linux/string_helpers.h>
#include "i915_drv.h"
#include "i915_irq.h"
#include "i915_reg.h"
#include "intel_backlight_regs.h"
#include "intel_cdclk.h"
#include "intel_clock_gating.h"
#include "intel_combo_phy.h"
#include "intel_de.h"
#include "intel_display_power.h"
#include "intel_display_power_map.h"
#include "intel_display_power_well.h"
#include "intel_display_types.h"
#include "intel_dmc.h"
#include "intel_mchbar_regs.h"
#include "intel_pch_refclk.h"
#include "intel_pcode.h"
#include "intel_pmdemand.h"
#include "intel_pps_regs.h"
#include "intel_snps_phy.h"
#include "skl_watermark.h"
#include "skl_watermark_regs.h"
#include "vlv_sideband.h"
#define for_each_power_domain_well(__dev_priv, __power_well, __domain) …
#define for_each_power_domain_well_reverse(__dev_priv, __power_well, __domain) …
static const char *
intel_display_power_domain_str(enum intel_display_power_domain domain)
{ … }
static bool __intel_display_power_is_enabled(struct drm_i915_private *dev_priv,
enum intel_display_power_domain domain)
{ … }
bool intel_display_power_is_enabled(struct drm_i915_private *dev_priv,
enum intel_display_power_domain domain)
{ … }
static u32
sanitize_target_dc_state(struct drm_i915_private *i915,
u32 target_dc_state)
{ … }
void intel_display_power_set_target_dc_state(struct drm_i915_private *dev_priv,
u32 state)
{ … }
static void __async_put_domains_mask(struct i915_power_domains *power_domains,
struct intel_power_domain_mask *mask)
{ … }
#if IS_ENABLED(CONFIG_DRM_I915_DEBUG_RUNTIME_PM)
static bool
assert_async_put_domain_masks_disjoint(struct i915_power_domains *power_domains)
{ … }
static bool
__async_put_domains_state_ok(struct i915_power_domains *power_domains)
{ … }
static void print_power_domains(struct i915_power_domains *power_domains,
const char *prefix, struct intel_power_domain_mask *mask)
{ … }
static void
print_async_put_domains_state(struct i915_power_domains *power_domains)
{ … }
static void
verify_async_put_domains_state(struct i915_power_domains *power_domains)
{ … }
#else
static void
assert_async_put_domain_masks_disjoint(struct i915_power_domains *power_domains)
{
}
static void
verify_async_put_domains_state(struct i915_power_domains *power_domains)
{
}
#endif
static void async_put_domains_mask(struct i915_power_domains *power_domains,
struct intel_power_domain_mask *mask)
{ … }
static void
async_put_domains_clear_domain(struct i915_power_domains *power_domains,
enum intel_display_power_domain domain)
{ … }
static void
cancel_async_put_work(struct i915_power_domains *power_domains, bool sync)
{ … }
static bool
intel_display_power_grab_async_put_ref(struct drm_i915_private *dev_priv,
enum intel_display_power_domain domain)
{ … }
static void
__intel_display_power_get_domain(struct drm_i915_private *dev_priv,
enum intel_display_power_domain domain)
{ … }
intel_wakeref_t intel_display_power_get(struct drm_i915_private *dev_priv,
enum intel_display_power_domain domain)
{ … }
intel_wakeref_t
intel_display_power_get_if_enabled(struct drm_i915_private *dev_priv,
enum intel_display_power_domain domain)
{ … }
static void
__intel_display_power_put_domain(struct drm_i915_private *dev_priv,
enum intel_display_power_domain domain)
{ … }
static void __intel_display_power_put(struct drm_i915_private *dev_priv,
enum intel_display_power_domain domain)
{ … }
static void
queue_async_put_domains_work(struct i915_power_domains *power_domains,
intel_wakeref_t wakeref,
int delay_ms)
{ … }
static void
release_async_put_domains(struct i915_power_domains *power_domains,
struct intel_power_domain_mask *mask)
{ … }
static void
intel_display_power_put_async_work(struct work_struct *work)
{ … }
void __intel_display_power_put_async(struct drm_i915_private *i915,
enum intel_display_power_domain domain,
intel_wakeref_t wakeref,
int delay_ms)
{ … }
void intel_display_power_flush_work(struct drm_i915_private *i915)
{ … }
static void
intel_display_power_flush_work_sync(struct drm_i915_private *i915)
{ … }
#if IS_ENABLED(CONFIG_DRM_I915_DEBUG_RUNTIME_PM)
void intel_display_power_put(struct drm_i915_private *dev_priv,
enum intel_display_power_domain domain,
intel_wakeref_t wakeref)
{ … }
#else
void intel_display_power_put_unchecked(struct drm_i915_private *dev_priv,
enum intel_display_power_domain domain)
{
__intel_display_power_put(dev_priv, domain);
intel_runtime_pm_put_unchecked(&dev_priv->runtime_pm);
}
#endif
void
intel_display_power_get_in_set(struct drm_i915_private *i915,
struct intel_display_power_domain_set *power_domain_set,
enum intel_display_power_domain domain)
{ … }
bool
intel_display_power_get_in_set_if_enabled(struct drm_i915_private *i915,
struct intel_display_power_domain_set *power_domain_set,
enum intel_display_power_domain domain)
{ … }
void
intel_display_power_put_mask_in_set(struct drm_i915_private *i915,
struct intel_display_power_domain_set *power_domain_set,
struct intel_power_domain_mask *mask)
{ … }
static int
sanitize_disable_power_well_option(const struct drm_i915_private *dev_priv,
int disable_power_well)
{ … }
static u32 get_allowed_dc_mask(const struct drm_i915_private *dev_priv,
int enable_dc)
{ … }
int intel_power_domains_init(struct drm_i915_private *dev_priv)
{ … }
void intel_power_domains_cleanup(struct drm_i915_private *dev_priv)
{ … }
static void intel_power_domains_sync_hw(struct drm_i915_private *dev_priv)
{ … }
static void gen9_dbuf_slice_set(struct drm_i915_private *dev_priv,
enum dbuf_slice slice, bool enable)
{ … }
void gen9_dbuf_slices_update(struct drm_i915_private *dev_priv,
u8 req_slices)
{ … }
static void gen9_dbuf_enable(struct drm_i915_private *dev_priv)
{ … }
static void gen9_dbuf_disable(struct drm_i915_private *dev_priv)
{ … }
static void gen12_dbuf_slices_config(struct drm_i915_private *dev_priv)
{ … }
static void icl_mbus_init(struct drm_i915_private *dev_priv)
{ … }
static void hsw_assert_cdclk(struct drm_i915_private *dev_priv)
{ … }
static void assert_can_disable_lcpll(struct drm_i915_private *dev_priv)
{ … }
static u32 hsw_read_dcomp(struct drm_i915_private *dev_priv)
{ … }
static void hsw_write_dcomp(struct drm_i915_private *dev_priv, u32 val)
{ … }
static void hsw_disable_lcpll(struct drm_i915_private *dev_priv,
bool switch_to_fclk, bool allow_power_down)
{ … }
static void hsw_restore_lcpll(struct drm_i915_private *dev_priv)
{ … }
static void hsw_enable_pc8(struct drm_i915_private *dev_priv)
{ … }
static void hsw_disable_pc8(struct drm_i915_private *dev_priv)
{ … }
static void intel_pch_reset_handshake(struct drm_i915_private *dev_priv,
bool enable)
{ … }
static void skl_display_core_init(struct drm_i915_private *dev_priv,
bool resume)
{ … }
static void skl_display_core_uninit(struct drm_i915_private *dev_priv)
{ … }
static void bxt_display_core_init(struct drm_i915_private *dev_priv, bool resume)
{ … }
static void bxt_display_core_uninit(struct drm_i915_private *dev_priv)
{ … }
struct buddy_page_mask { … };
static const struct buddy_page_mask tgl_buddy_page_masks[] = …;
static const struct buddy_page_mask wa_1409767108_buddy_page_masks[] = …;
static void tgl_bw_buddy_init(struct drm_i915_private *dev_priv)
{ … }
static void icl_display_core_init(struct drm_i915_private *dev_priv,
bool resume)
{ … }
static void icl_display_core_uninit(struct drm_i915_private *dev_priv)
{ … }
static void chv_phy_control_init(struct drm_i915_private *dev_priv)
{ … }
static void vlv_cmnlane_wa(struct drm_i915_private *dev_priv)
{ … }
static bool vlv_punit_is_power_gated(struct drm_i915_private *dev_priv, u32 reg0)
{ … }
static void assert_ved_power_gated(struct drm_i915_private *dev_priv)
{ … }
static void assert_isp_power_gated(struct drm_i915_private *dev_priv)
{ … }
static void intel_power_domains_verify_state(struct drm_i915_private *dev_priv);
void intel_power_domains_init_hw(struct drm_i915_private *i915, bool resume)
{ … }
void intel_power_domains_driver_remove(struct drm_i915_private *i915)
{ … }
void intel_power_domains_sanitize_state(struct drm_i915_private *i915)
{ … }
void intel_power_domains_enable(struct drm_i915_private *i915)
{ … }
void intel_power_domains_disable(struct drm_i915_private *i915)
{ … }
void intel_power_domains_suspend(struct drm_i915_private *i915, bool s2idle)
{ … }
void intel_power_domains_resume(struct drm_i915_private *i915)
{ … }
#if IS_ENABLED(CONFIG_DRM_I915_DEBUG_RUNTIME_PM)
static void intel_power_domains_dump_info(struct drm_i915_private *i915)
{ … }
static void intel_power_domains_verify_state(struct drm_i915_private *i915)
{ … }
#else
static void intel_power_domains_verify_state(struct drm_i915_private *i915)
{
}
#endif
void intel_display_power_suspend_late(struct drm_i915_private *i915)
{ … }
void intel_display_power_resume_early(struct drm_i915_private *i915)
{ … }
void intel_display_power_suspend(struct drm_i915_private *i915)
{ … }
void intel_display_power_resume(struct drm_i915_private *i915)
{ … }
void intel_display_power_debug(struct drm_i915_private *i915, struct seq_file *m)
{ … }
struct intel_ddi_port_domains { … };
static const struct intel_ddi_port_domains
i9xx_port_domains[] = …;
static const struct intel_ddi_port_domains
d11_port_domains[] = …;
static const struct intel_ddi_port_domains
d12_port_domains[] = …;
static const struct intel_ddi_port_domains
d13_port_domains[] = …;
static void
intel_port_domains_for_platform(struct drm_i915_private *i915,
const struct intel_ddi_port_domains **domains,
int *domains_size)
{ … }
static const struct intel_ddi_port_domains *
intel_port_domains_for_port(struct drm_i915_private *i915, enum port port)
{ … }
enum intel_display_power_domain
intel_display_power_ddi_io_domain(struct drm_i915_private *i915, enum port port)
{ … }
enum intel_display_power_domain
intel_display_power_ddi_lanes_domain(struct drm_i915_private *i915, enum port port)
{ … }
static const struct intel_ddi_port_domains *
intel_port_domains_for_aux_ch(struct drm_i915_private *i915, enum aux_ch aux_ch)
{ … }
enum intel_display_power_domain
intel_display_power_aux_io_domain(struct drm_i915_private *i915, enum aux_ch aux_ch)
{ … }
enum intel_display_power_domain
intel_display_power_legacy_aux_domain(struct drm_i915_private *i915, enum aux_ch aux_ch)
{ … }
enum intel_display_power_domain
intel_display_power_tbt_aux_domain(struct drm_i915_private *i915, enum aux_ch aux_ch)
{ … }