#include <linux/clk.h>
#include <linux/interconnect.h>
#include <linux/iopoll.h>
#include <linux/kernel.h>
#include <linux/pm_domain.h>
#include <linux/pm_opp.h>
#include <linux/pm_runtime.h>
#include <linux/reset.h>
#include <linux/types.h>
#include <media/v4l2-mem2mem.h>
#include "core.h"
#include "hfi_parser.h"
#include "hfi_venus_io.h"
#include "pm_helpers.h"
#include "hfi_platform.h"
static bool legacy_binding;
static int core_clks_get(struct venus_core *core)
{ … }
static int core_clks_enable(struct venus_core *core)
{ … }
static void core_clks_disable(struct venus_core *core)
{ … }
static int core_clks_set_rate(struct venus_core *core, unsigned long freq)
{ … }
static int vcodec_clks_get(struct venus_core *core, struct device *dev,
struct clk **clks, const char * const *id)
{ … }
static int vcodec_clks_enable(struct venus_core *core, struct clk **clks)
{ … }
static void vcodec_clks_disable(struct venus_core *core, struct clk **clks)
{ … }
static u32 load_per_instance(struct venus_inst *inst)
{ … }
static u32 load_per_type(struct venus_core *core, u32 session_type)
{ … }
static void mbs_to_bw(struct venus_inst *inst, u32 mbs, u32 *avg, u32 *peak)
{ … }
static int load_scale_bw(struct venus_core *core)
{ … }
static int load_scale_v1(struct venus_inst *inst)
{ … }
static int core_get_v1(struct venus_core *core)
{ … }
static void core_put_v1(struct venus_core *core)
{ … }
static int core_power_v1(struct venus_core *core, int on)
{ … }
static const struct venus_pm_ops pm_ops_v1 = …;
static void
vcodec_control_v3(struct venus_core *core, u32 session_type, bool enable)
{ … }
static int vdec_get_v3(struct device *dev)
{ … }
static int vdec_power_v3(struct device *dev, int on)
{ … }
static int venc_get_v3(struct device *dev)
{ … }
static int venc_power_v3(struct device *dev, int on)
{ … }
static const struct venus_pm_ops pm_ops_v3 = …;
static int vcodec_control_v4(struct venus_core *core, u32 coreid, bool enable)
{ … }
static int poweroff_coreid(struct venus_core *core, unsigned int coreid_mask)
{ … }
static int poweron_coreid(struct venus_core *core, unsigned int coreid_mask)
{ … }
static inline int power_save_mode_enable(struct venus_inst *inst,
bool enable)
{ … }
static int move_core_to_power_save_mode(struct venus_core *core,
u32 core_id)
{ … }
static void
min_loaded_core(struct venus_inst *inst, u32 *min_coreid, u32 *min_load, bool low_power)
{ … }
static int decide_core(struct venus_inst *inst)
{ … }
static int acquire_core(struct venus_inst *inst)
{ … }
static int release_core(struct venus_inst *inst)
{ … }
static int coreid_power_v4(struct venus_inst *inst, int on)
{ … }
static int vdec_get_v4(struct device *dev)
{ … }
static void vdec_put_v4(struct device *dev)
{ … }
static int vdec_power_v4(struct device *dev, int on)
{ … }
static int venc_get_v4(struct device *dev)
{ … }
static void venc_put_v4(struct device *dev)
{ … }
static int venc_power_v4(struct device *dev, int on)
{ … }
static int vcodec_domains_get(struct venus_core *core)
{ … }
static void vcodec_domains_put(struct venus_core *core)
{ … }
static int core_resets_reset(struct venus_core *core)
{ … }
static int core_resets_get(struct venus_core *core)
{ … }
static int core_get_v4(struct venus_core *core)
{ … }
static void core_put_v4(struct venus_core *core)
{ … }
static int core_power_v4(struct venus_core *core, int on)
{ … }
static unsigned long calculate_inst_freq(struct venus_inst *inst,
unsigned long filled_len)
{ … }
static int load_scale_v4(struct venus_inst *inst)
{ … }
static const struct venus_pm_ops pm_ops_v4 = …;
const struct venus_pm_ops *venus_pm_get(enum hfi_version version)
{ … }