drm/i915/dmc: move assert_dmc_loaded() to intel_dmc.c
Start localizing DMC register and data access to intel_dmc.c. Signed-off-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/4b96fe56c9c01bc671992dd6fe619638b157878f.1647870374.git.jani.nikula@intel.com
This commit is contained in:
parent
78a574deef
commit
790daf744e
|
@ -905,18 +905,6 @@ static void bxt_disable_dc9(struct drm_i915_private *dev_priv)
|
|||
intel_pps_unlock_regs_wa(dev_priv);
|
||||
}
|
||||
|
||||
static void assert_dmc_loaded(struct drm_i915_private *dev_priv)
|
||||
{
|
||||
drm_WARN_ONCE(&dev_priv->drm,
|
||||
!intel_de_read(dev_priv,
|
||||
DMC_PROGRAM(dev_priv->dmc.dmc_info[DMC_FW_MAIN].start_mmioaddr, 0)),
|
||||
"DMC program storage start is NULL\n");
|
||||
drm_WARN_ONCE(&dev_priv->drm, !intel_de_read(dev_priv, DMC_SSP_BASE),
|
||||
"DMC SSP Base Not fine\n");
|
||||
drm_WARN_ONCE(&dev_priv->drm, !intel_de_read(dev_priv, DMC_HTP_SKL),
|
||||
"DMC HTP Not fine\n");
|
||||
}
|
||||
|
||||
/**
|
||||
* intel_display_power_set_target_dc_state - Set target dc state.
|
||||
* @dev_priv: i915 device
|
||||
|
|
|
@ -305,6 +305,17 @@ void intel_dmc_load_program(struct drm_i915_private *dev_priv)
|
|||
gen9_set_dc_state_debugmask(dev_priv);
|
||||
}
|
||||
|
||||
void assert_dmc_loaded(struct drm_i915_private *i915)
|
||||
{
|
||||
drm_WARN_ONCE(&i915->drm,
|
||||
!intel_de_read(i915, DMC_PROGRAM(i915->dmc.dmc_info[DMC_FW_MAIN].start_mmioaddr, 0)),
|
||||
"DMC program storage start is NULL\n");
|
||||
drm_WARN_ONCE(&i915->drm, !intel_de_read(i915, DMC_SSP_BASE),
|
||||
"DMC SSP Base Not fine\n");
|
||||
drm_WARN_ONCE(&i915->drm, !intel_de_read(i915, DMC_HTP_SKL),
|
||||
"DMC HTP Not fine\n");
|
||||
}
|
||||
|
||||
static bool fw_info_matches_stepping(const struct intel_fw_info *fw_info,
|
||||
const struct stepping_info *si)
|
||||
{
|
||||
|
|
|
@ -55,4 +55,6 @@ void intel_dmc_ucode_suspend(struct drm_i915_private *i915);
|
|||
void intel_dmc_ucode_resume(struct drm_i915_private *i915);
|
||||
bool intel_dmc_has_payload(struct drm_i915_private *i915);
|
||||
|
||||
void assert_dmc_loaded(struct drm_i915_private *i915);
|
||||
|
||||
#endif /* __INTEL_DMC_H__ */
|
||||
|
|
Loading…
Reference in New Issue