video: rockchip: mpp: Use ROCKCHIP_MPP_PROC_FS instead of PROC_FS

For kernel-tiny, remove debug relative code, and reduce the size of module.

Change-Id: Ic78a0839a75c9cebb56fa32e87235bd97be0370a
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
This commit is contained in:
Ding Wei
2021-08-27 16:49:31 +08:00
committed by Tao Huang
parent 07f556c601
commit e39950f6fe
15 changed files with 32 additions and 26 deletions

View File

@@ -3,12 +3,18 @@
menuconfig ROCKCHIP_MPP_SERVICE
tristate "mpp service framework"
depends on ARCH_ROCKCHIP
default n
help
rockchip mpp service framework.
if ROCKCHIP_MPP_SERVICE
config ROCKCHIP_MPP_PROC_FS
bool "mpp service procfs"
depends on PROC_FS
default y
help
rockchip mpp service procfs.
config ROCKCHIP_MPP_RKVDEC
bool "RKV decoder device driver"
help

View File

@@ -54,7 +54,7 @@ struct mpp_msg_v1 {
__u64 data_ptr;
};
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_ROCKCHIP_MPP_PROC_FS
const char *mpp_device_name[MPP_DEVICE_BUTT] = {
[MPP_DEVICE_VDPU1] = "VDPU1",
[MPP_DEVICE_VDPU2] = "VDPU2",
@@ -2192,7 +2192,7 @@ int mpp_clk_set_rate(struct mpp_clk_info *clk_info,
return 0;
}
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_ROCKCHIP_MPP_PROC_FS
static int fops_show_u32(struct seq_file *file, void *v)
{
u32 *val = file->private;

View File

@@ -463,7 +463,7 @@ struct mpp_service {
dev_t dev_id;
struct cdev mpp_cdev;
struct device *child_dev;
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_ROCKCHIP_MPP_PROC_FS
struct proc_dir_entry *procfs;
#endif
unsigned long hw_support;
@@ -731,7 +731,7 @@ static inline int mpp_reset_up_write(struct mpp_reset_group *group)
return 0;
}
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_ROCKCHIP_MPP_PROC_FS
struct proc_dir_entry *
mpp_procfs_create_u32(const char *name, umode_t mode,
struct proc_dir_entry *parent, void *data);
@@ -744,7 +744,7 @@ mpp_procfs_create_u32(const char *name, umode_t mode,
}
#endif
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_ROCKCHIP_MPP_PROC_FS
extern const char *mpp_device_name[MPP_DEVICE_BUTT];
extern const char *enc_info_item_name[ENC_INFO_BUTT];
#endif

View File

@@ -216,7 +216,7 @@ struct iep2_dev {
struct mpp_clk_info aclk_info;
struct mpp_clk_info hclk_info;
struct mpp_clk_info sclk_info;
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_ROCKCHIP_MPP_PROC_FS
struct proc_dir_entry *procfs;
#endif
struct reset_control *rst_a;
@@ -744,7 +744,7 @@ static int iep2_free_task(struct mpp_session *session,
return 0;
}
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_ROCKCHIP_MPP_PROC_FS
static int iep2_procfs_remove(struct mpp_dev *mpp)
{
struct iep2_dev *iep = to_iep2_dev(mpp);

View File

@@ -94,7 +94,7 @@ struct jpgdec_dev {
struct mpp_clk_info aclk_info;
struct mpp_clk_info hclk_info;
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_ROCKCHIP_MPP_PROC_FS
struct proc_dir_entry *procfs;
#endif
struct reset_control *rst_a;
@@ -351,7 +351,7 @@ static int jpgdec_free_task(struct mpp_session *session,
return 0;
}
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_ROCKCHIP_MPP_PROC_FS
static int jpgdec_procfs_remove(struct mpp_dev *mpp)
{
struct jpgdec_dev *dec = to_jpgdec_dev(mpp);

View File

@@ -161,7 +161,7 @@ struct rkvdec_dev {
struct mpp_clk_info cabac_clk_info;
struct mpp_clk_info hevc_cabac_clk_info;
u32 default_max_load;
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_ROCKCHIP_MPP_PROC_FS
struct proc_dir_entry *procfs;
#endif
struct reset_control *rst_a;
@@ -1146,7 +1146,7 @@ static int rkvdec_free_task(struct mpp_session *session,
return 0;
}
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_ROCKCHIP_MPP_PROC_FS
static int rkvdec_procfs_remove(struct mpp_dev *mpp)
{
struct rkvdec_dev *dec = to_rkvdec_dev(mpp);

View File

@@ -556,7 +556,7 @@ static int rkvdec2_init_session(struct mpp_session *session)
return 0;
}
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_ROCKCHIP_MPP_PROC_FS
static int rkvdec2_procfs_remove(struct mpp_dev *mpp)
{
struct rkvdec2_dev *dec = to_rkvdec2_dev(mpp);

View File

@@ -170,7 +170,7 @@ struct rkvdec2_dev {
struct mpp_clk_info cabac_clk_info;
struct mpp_clk_info hevc_cabac_clk_info;
u32 default_max_load;
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_ROCKCHIP_MPP_PROC_FS
struct proc_dir_entry *procfs;
#endif
struct reset_control *rst_a;

View File

@@ -863,7 +863,7 @@ err_free_node:
return ret;
}
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_ROCKCHIP_MPP_PROC_FS
int rkvdec2_link_procfs_init(struct mpp_dev *mpp)
{
struct rkvdec2_dev *dec = to_rkvdec2_dev(mpp);

View File

@@ -184,7 +184,7 @@ struct rkvenc_dev {
struct mpp_clk_info hclk_info;
struct mpp_clk_info core_clk_info;
u32 default_max_load;
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_ROCKCHIP_MPP_PROC_FS
struct proc_dir_entry *procfs;
#endif
struct reset_control *rst_a;
@@ -714,7 +714,7 @@ static int rkvenc_init_session(struct mpp_session *session)
return 0;
}
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_ROCKCHIP_MPP_PROC_FS
static int rkvenc_procfs_remove(struct mpp_dev *mpp)
{
struct rkvenc_dev *enc = to_rkvenc_dev(mpp);

View File

@@ -144,7 +144,7 @@ static int mpp_remove_service(struct mpp_service *srv)
return 0;
}
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_ROCKCHIP_MPP_PROC_FS
static int mpp_procfs_remove(struct mpp_service *srv)
{
if (srv->procfs) {

View File

@@ -118,7 +118,7 @@ struct vdpu_dev {
struct mpp_clk_info aclk_info;
struct mpp_clk_info hclk_info;
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_ROCKCHIP_MPP_PROC_FS
struct proc_dir_entry *procfs;
#endif
struct reset_control *rst_a;
@@ -480,7 +480,7 @@ static int vdpu_free_task(struct mpp_session *session,
return 0;
}
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_ROCKCHIP_MPP_PROC_FS
static int vdpu_procfs_remove(struct mpp_dev *mpp)
{
struct vdpu_dev *dec = to_vdpu_dev(mpp);

View File

@@ -102,7 +102,7 @@ struct vdpu_dev {
struct mpp_clk_info aclk_info;
struct mpp_clk_info hclk_info;
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_ROCKCHIP_MPP_PROC_FS
struct proc_dir_entry *procfs;
#endif
struct reset_control *rst_a;
@@ -432,7 +432,7 @@ static int vdpu_free_task(struct mpp_session *session,
return 0;
}
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_ROCKCHIP_MPP_PROC_FS
static int vdpu_procfs_remove(struct mpp_dev *mpp)
{
struct vdpu_dev *dec = to_vdpu_dev(mpp);

View File

@@ -99,7 +99,7 @@ struct vepu_dev {
struct mpp_clk_info aclk_info;
struct mpp_clk_info hclk_info;
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_ROCKCHIP_MPP_PROC_FS
struct proc_dir_entry *procfs;
#endif
struct reset_control *rst_a;
@@ -467,7 +467,7 @@ static int vepu_init_session(struct mpp_session *session)
return 0;
}
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_ROCKCHIP_MPP_PROC_FS
static int vepu_procfs_remove(struct mpp_dev *mpp)
{
struct vepu_dev *enc = to_vepu_dev(mpp);

View File

@@ -115,7 +115,7 @@ struct vepu_dev {
struct mpp_clk_info aclk_info;
struct mpp_clk_info hclk_info;
u32 default_max_load;
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_ROCKCHIP_MPP_PROC_FS
struct proc_dir_entry *procfs;
#endif
struct reset_control *rst_a;
@@ -489,7 +489,7 @@ static int vepu_init_session(struct mpp_session *session)
return 0;
}
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_ROCKCHIP_MPP_PROC_FS
static int vepu_procfs_remove(struct mpp_dev *mpp)
{
struct vepu_dev *enc = to_vepu_dev(mpp);