video-driver: Abstract platform resources
Move clocks, gdsc, bandwidth resources out of venus_hfi and use the ops in variant and venus_hfi code. Change-Id: I1be77c9d384f4eef2cb8085b75c39dc3fd3eeb86 Signed-off-by: Stanimir Varbanov <quic_c_svarba@quicinc.com>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
a558b04808
commit
8b003fb153
35
driver/vidc/inc/resources.h
Normal file
35
driver/vidc/inc/resources.h
Normal file
@@ -0,0 +1,35 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2020-2022, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _MSM_VIDC_RESOURCES_H_
|
||||
#define _MSM_VIDC_RESOURCES_H_
|
||||
|
||||
struct msm_vidc_core;
|
||||
|
||||
struct msm_vidc_resources_ops {
|
||||
int (*get)(struct msm_vidc_core *core);
|
||||
void (*put)(struct msm_vidc_core *core);
|
||||
|
||||
int (*reset_bridge)(struct msm_vidc_core *core);
|
||||
|
||||
int (*gdsc_on)(struct msm_vidc_core *core, const char *name);
|
||||
int (*gdsc_off)(struct msm_vidc_core *core, const char *name);
|
||||
int (*gdsc_hw_ctrl)(struct msm_vidc_core *core);
|
||||
int (*gdsc_sw_ctrl)(struct msm_vidc_core *core);
|
||||
|
||||
int (*llcc)(struct msm_vidc_core *core, bool enable);
|
||||
int (*set_bw)(struct msm_vidc_core *core, unsigned long bw_ddr,
|
||||
unsigned long bw_llcc);
|
||||
int (*set_clks)(struct msm_vidc_core *core, u64 rate);
|
||||
|
||||
int (*clk_disable)(struct msm_vidc_core *core, const char *name);
|
||||
int (*clk_enable)(struct msm_vidc_core *core, const char *name);
|
||||
|
||||
int (*set_regs)(struct msm_vidc_core *core);
|
||||
};
|
||||
|
||||
const struct msm_vidc_resources_ops *get_resources_ops(void);
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user