#include <linux/debugfs.h>
#include <linux/firmware.h>
#include "i915_drv.h"
#include "i915_reg.h"
#include "intel_de.h"
#include "intel_dmc.h"
#include "intel_dmc_regs.h"
#include "intel_step.h"
#define INTEL_DMC_FIRMWARE_URL …
enum intel_dmc_id { … };
struct intel_dmc { … };
static struct intel_dmc *i915_to_dmc(struct drm_i915_private *i915)
{ … }
static const char *dmc_firmware_param(struct drm_i915_private *i915)
{ … }
static bool dmc_firmware_param_disabled(struct drm_i915_private *i915)
{ … }
#define DMC_VERSION(major, minor) …
#define DMC_VERSION_MAJOR(version) …
#define DMC_VERSION_MINOR(version) …
#define DMC_PATH(platform) …
#define DMC_LEGACY_PATH(platform, major, minor) …
#define XE2LPD_DMC_MAX_FW_SIZE …
#define XELPDP_DMC_MAX_FW_SIZE …
#define DISPLAY_VER13_DMC_MAX_FW_SIZE …
#define DISPLAY_VER12_DMC_MAX_FW_SIZE …
#define XE2LPD_DMC_PATH …
MODULE_FIRMWARE(…);
#define BMG_DMC_PATH …
MODULE_FIRMWARE(…);
#define MTL_DMC_PATH …
MODULE_FIRMWARE(…);
#define DG2_DMC_PATH …
MODULE_FIRMWARE(…);
#define ADLP_DMC_PATH …
#define ADLP_DMC_FALLBACK_PATH …
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
#define ADLS_DMC_PATH …
MODULE_FIRMWARE(…);
#define DG1_DMC_PATH …
MODULE_FIRMWARE(…);
#define RKL_DMC_PATH …
MODULE_FIRMWARE(…);
#define TGL_DMC_PATH …
MODULE_FIRMWARE(…);
#define ICL_DMC_PATH …
#define ICL_DMC_MAX_FW_SIZE …
MODULE_FIRMWARE(…);
#define GLK_DMC_PATH …
#define GLK_DMC_MAX_FW_SIZE …
MODULE_FIRMWARE(…);
#define KBL_DMC_PATH …
#define KBL_DMC_MAX_FW_SIZE …
MODULE_FIRMWARE(…);
#define SKL_DMC_PATH …
#define SKL_DMC_MAX_FW_SIZE …
MODULE_FIRMWARE(…);
#define BXT_DMC_PATH …
#define BXT_DMC_MAX_FW_SIZE …
MODULE_FIRMWARE(…);
static const char *dmc_firmware_default(struct drm_i915_private *i915, u32 *size)
{ … }
#define DMC_DEFAULT_FW_OFFSET …
#define PACKAGE_MAX_FW_INFO_ENTRIES …
#define PACKAGE_V2_MAX_FW_INFO_ENTRIES …
#define DMC_V1_MAX_MMIO_COUNT …
#define DMC_V3_MAX_MMIO_COUNT …
#define DMC_V1_MMIO_START_RANGE …
#define PIPE_TO_DMC_ID(pipe) …
struct intel_css_header { … } __packed;
struct intel_fw_info { … } __packed;
struct intel_package_header { … } __packed;
struct intel_dmc_header_base { … } __packed;
struct intel_dmc_header_v1 { … } __packed;
struct intel_dmc_header_v3 { … } __packed;
struct stepping_info { … };
#define for_each_dmc_id(__dmc_id) …
static bool is_valid_dmc_id(enum intel_dmc_id dmc_id)
{ … }
static bool has_dmc_id_fw(struct drm_i915_private *i915, enum intel_dmc_id dmc_id)
{ … }
bool intel_dmc_has_payload(struct drm_i915_private *i915)
{ … }
static const struct stepping_info *
intel_get_stepping_info(struct drm_i915_private *i915,
struct stepping_info *si)
{ … }
static void gen9_set_dc_state_debugmask(struct drm_i915_private *i915)
{ … }
static void disable_event_handler(struct drm_i915_private *i915,
i915_reg_t ctl_reg, i915_reg_t htp_reg)
{ … }
static void disable_all_event_handlers(struct drm_i915_private *i915)
{ … }
static void adlp_pipedmc_clock_gating_wa(struct drm_i915_private *i915, bool enable)
{ … }
static void mtl_pipedmc_clock_gating_wa(struct drm_i915_private *i915)
{ … }
static void pipedmc_clock_gating_wa(struct drm_i915_private *i915, bool enable)
{ … }
void intel_dmc_enable_pipe(struct drm_i915_private *i915, enum pipe pipe)
{ … }
void intel_dmc_disable_pipe(struct drm_i915_private *i915, enum pipe pipe)
{ … }
static bool is_dmc_evt_ctl_reg(struct drm_i915_private *i915,
enum intel_dmc_id dmc_id, i915_reg_t reg)
{ … }
static bool is_dmc_evt_htp_reg(struct drm_i915_private *i915,
enum intel_dmc_id dmc_id, i915_reg_t reg)
{ … }
static bool disable_dmc_evt(struct drm_i915_private *i915,
enum intel_dmc_id dmc_id,
i915_reg_t reg, u32 data)
{ … }
static u32 dmc_mmiodata(struct drm_i915_private *i915,
struct intel_dmc *dmc,
enum intel_dmc_id dmc_id, int i)
{ … }
void intel_dmc_load_program(struct drm_i915_private *i915)
{ … }
void intel_dmc_disable_program(struct drm_i915_private *i915)
{ … }
void assert_dmc_loaded(struct drm_i915_private *i915)
{ … }
static bool fw_info_matches_stepping(const struct intel_fw_info *fw_info,
const struct stepping_info *si)
{ … }
static void dmc_set_fw_offset(struct intel_dmc *dmc,
const struct intel_fw_info *fw_info,
unsigned int num_entries,
const struct stepping_info *si,
u8 package_ver)
{ … }
static bool dmc_mmio_addr_sanity_check(struct intel_dmc *dmc,
const u32 *mmioaddr, u32 mmio_count,
int header_ver, enum intel_dmc_id dmc_id)
{ … }
static u32 parse_dmc_fw_header(struct intel_dmc *dmc,
const struct intel_dmc_header_base *dmc_header,
size_t rem_size, enum intel_dmc_id dmc_id)
{ … }
static u32
parse_dmc_fw_package(struct intel_dmc *dmc,
const struct intel_package_header *package_header,
const struct stepping_info *si,
size_t rem_size)
{ … }
static u32 parse_dmc_fw_css(struct intel_dmc *dmc,
struct intel_css_header *css_header,
size_t rem_size)
{ … }
static int parse_dmc_fw(struct intel_dmc *dmc, const struct firmware *fw)
{ … }
static void intel_dmc_runtime_pm_get(struct drm_i915_private *i915)
{ … }
static void intel_dmc_runtime_pm_put(struct drm_i915_private *i915)
{ … }
static const char *dmc_fallback_path(struct drm_i915_private *i915)
{ … }
static void dmc_load_work_fn(struct work_struct *work)
{ … }
void intel_dmc_init(struct drm_i915_private *i915)
{ … }
void intel_dmc_suspend(struct drm_i915_private *i915)
{ … }
void intel_dmc_resume(struct drm_i915_private *i915)
{ … }
void intel_dmc_fini(struct drm_i915_private *i915)
{ … }
void intel_dmc_print_error_state(struct drm_printer *p,
struct drm_i915_private *i915)
{ … }
static int intel_dmc_debugfs_status_show(struct seq_file *m, void *unused)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
void intel_dmc_debugfs_register(struct drm_i915_private *i915)
{ … }