#include "ivpu_drv.h"
#include "ivpu_hw.h"
#include "ivpu_hw_btrs.h"
#include "ivpu_hw_btrs_lnl_reg.h"
#include "ivpu_hw_btrs_mtl_reg.h"
#include "ivpu_hw_reg_io.h"
#include "ivpu_pm.h"
#define BTRS_MTL_IRQ_MASK …
#define BTRS_LNL_IRQ_MASK …
#define BTRS_MTL_ALL_IRQ_MASK …
#define BTRS_IRQ_DISABLE_MASK …
#define BTRS_LNL_ALL_IRQ_MASK …
#define BTRS_MTL_WP_CONFIG_1_TILE_5_3_RATIO …
#define BTRS_MTL_WP_CONFIG_1_TILE_4_3_RATIO …
#define BTRS_MTL_WP_CONFIG_2_TILE_5_3_RATIO …
#define BTRS_MTL_WP_CONFIG_2_TILE_4_3_RATIO …
#define BTRS_MTL_WP_CONFIG_0_TILE_PLL_OFF …
#define PLL_CDYN_DEFAULT …
#define PLL_EPP_DEFAULT …
#define PLL_CONFIG_DEFAULT …
#define PLL_SIMULATION_FREQ …
#define PLL_REF_CLK_FREQ …
#define PLL_TIMEOUT_US …
#define IDLE_TIMEOUT_US …
#define TIMEOUT_US …
#define WP_CONFIG(tile, ratio) …
#define MTL_CONFIG_1_TILE …
#define MTL_CONFIG_2_TILE …
#define MTL_PLL_RATIO_5_3 …
#define MTL_PLL_RATIO_4_3 …
#define BTRS_MTL_TILE_FUSE_ENABLE_BOTH …
#define BTRS_MTL_TILE_SKU_BOTH …
#define BTRS_LNL_TILE_MAX_NUM …
#define BTRS_LNL_TILE_MAX_MASK …
#define WEIGHTS_DEFAULT …
#define WEIGHTS_ATS_DEFAULT …
#define DCT_REQ …
#define DCT_ENABLE …
#define DCT_DISABLE …
int ivpu_hw_btrs_irqs_clear_with_0_mtl(struct ivpu_device *vdev)
{ … }
static void freq_ratios_init_mtl(struct ivpu_device *vdev)
{ … }
static void freq_ratios_init_lnl(struct ivpu_device *vdev)
{ … }
void ivpu_hw_btrs_freq_ratios_init(struct ivpu_device *vdev)
{ … }
static bool tile_disable_check(u32 config)
{ … }
static int read_tile_config_fuse(struct ivpu_device *vdev, u32 *tile_fuse_config)
{ … }
static int info_init_mtl(struct ivpu_device *vdev)
{ … }
static int info_init_lnl(struct ivpu_device *vdev)
{ … }
int ivpu_hw_btrs_info_init(struct ivpu_device *vdev)
{ … }
static int wp_request_sync(struct ivpu_device *vdev)
{ … }
static int wait_for_status_ready(struct ivpu_device *vdev, bool enable)
{ … }
struct wp_request { … };
static void wp_request_mtl(struct ivpu_device *vdev, struct wp_request *wp)
{ … }
static void wp_request_lnl(struct ivpu_device *vdev, struct wp_request *wp)
{ … }
static void wp_request(struct ivpu_device *vdev, struct wp_request *wp)
{ … }
static int wp_request_send(struct ivpu_device *vdev, struct wp_request *wp)
{ … }
static void prepare_wp_request(struct ivpu_device *vdev, struct wp_request *wp, bool enable)
{ … }
static int wait_for_pll_lock(struct ivpu_device *vdev, bool enable)
{ … }
int ivpu_hw_btrs_wp_drive(struct ivpu_device *vdev, bool enable)
{ … }
static int d0i3_drive_mtl(struct ivpu_device *vdev, bool enable)
{ … }
static int d0i3_drive_lnl(struct ivpu_device *vdev, bool enable)
{ … }
static int d0i3_drive(struct ivpu_device *vdev, bool enable)
{ … }
int ivpu_hw_btrs_d0i3_enable(struct ivpu_device *vdev)
{ … }
int ivpu_hw_btrs_d0i3_disable(struct ivpu_device *vdev)
{ … }
int ivpu_hw_btrs_wait_for_clock_res_own_ack(struct ivpu_device *vdev)
{ … }
void ivpu_hw_btrs_set_port_arbitration_weights_lnl(struct ivpu_device *vdev)
{ … }
static int ip_reset_mtl(struct ivpu_device *vdev)
{ … }
static int ip_reset_lnl(struct ivpu_device *vdev)
{ … }
int ivpu_hw_btrs_ip_reset(struct ivpu_device *vdev)
{ … }
void ivpu_hw_btrs_profiling_freq_reg_set_lnl(struct ivpu_device *vdev)
{ … }
void ivpu_hw_btrs_ats_print_lnl(struct ivpu_device *vdev)
{ … }
void ivpu_hw_btrs_clock_relinquish_disable_lnl(struct ivpu_device *vdev)
{ … }
bool ivpu_hw_btrs_is_idle(struct ivpu_device *vdev)
{ … }
int ivpu_hw_btrs_wait_for_idle(struct ivpu_device *vdev)
{ … }
bool ivpu_hw_btrs_irq_handler_mtl(struct ivpu_device *vdev, int irq)
{ … }
bool ivpu_hw_btrs_irq_handler_lnl(struct ivpu_device *vdev, int irq)
{ … }
int ivpu_hw_btrs_dct_get_request(struct ivpu_device *vdev, bool *enable)
{ … }
void ivpu_hw_btrs_dct_set_status(struct ivpu_device *vdev, bool enable, u32 active_percent)
{ … }
static u32 pll_ratio_to_freq_mtl(u32 ratio, u32 config)
{ … }
u32 ivpu_hw_btrs_ratio_to_freq(struct ivpu_device *vdev, u32 ratio)
{ … }
static u32 pll_freq_get_mtl(struct ivpu_device *vdev)
{ … }
static u32 pll_freq_get_lnl(struct ivpu_device *vdev)
{ … }
u32 ivpu_hw_btrs_pll_freq_get(struct ivpu_device *vdev)
{ … }
u32 ivpu_hw_btrs_telemetry_offset_get(struct ivpu_device *vdev)
{ … }
u32 ivpu_hw_btrs_telemetry_size_get(struct ivpu_device *vdev)
{ … }
u32 ivpu_hw_btrs_telemetry_enable_get(struct ivpu_device *vdev)
{ … }
void ivpu_hw_btrs_global_int_disable(struct ivpu_device *vdev)
{ … }
void ivpu_hw_btrs_global_int_enable(struct ivpu_device *vdev)
{ … }
void ivpu_hw_btrs_irq_enable(struct ivpu_device *vdev)
{ … }
void ivpu_hw_btrs_irq_disable(struct ivpu_device *vdev)
{ … }
static void diagnose_failure_mtl(struct ivpu_device *vdev)
{ … }
static void diagnose_failure_lnl(struct ivpu_device *vdev)
{ … }
void ivpu_hw_btrs_diagnose_failure(struct ivpu_device *vdev)
{ … }