
[1] Remove CAP_FLAG_ROOT flag. Root willbe identified with has_parents() api. [2] Replace field(struct msm_vidc_inst_cap) cap -> cap_id. [3] Rename below pool apis. msm_memory_alloc -> msm_memory_pool_alloc msm_memory_free -> msm_memory_pool_free [4] Remove struct msm_vidc_inst_cap_entry usage in inst. inst->firmware.list -> inst->firmware_list inst->children.list -> inst->children_list [5] Organize msm_vidc_inst_capability_type enums in such a way that all parents placed first then children. It will save CPU cycles while preparing caps_list. Change-Id: I376f4e6ddec37ce326c393fba133e19ba70bab09 Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
84 sor
1.9 KiB
C
84 sor
1.9 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright (c) 2020-2021,, The Linux Foundation. All rights reserved.
|
|
*/
|
|
|
|
#ifndef _MSM_VIDC_PLATFORM_H_
|
|
#define _MSM_VIDC_PLATFORM_H_
|
|
|
|
#include <linux/platform_device.h>
|
|
|
|
#include "msm_vidc_internal.h"
|
|
#include <media/v4l2-ctrls.h>
|
|
|
|
struct msm_platform_core_capability {
|
|
enum msm_vidc_core_capability_type type;
|
|
u32 value;
|
|
};
|
|
|
|
struct msm_platform_inst_capability {
|
|
enum msm_vidc_inst_capability_type cap_id;
|
|
enum msm_vidc_domain_type domain;
|
|
enum msm_vidc_codec_type codec;
|
|
s32 min;
|
|
s32 max;
|
|
u32 step_or_mask;
|
|
s32 value;
|
|
u32 v4l2_id;
|
|
u32 hfi_id;
|
|
enum msm_vidc_inst_capability_flags flags;
|
|
enum msm_vidc_inst_capability_type parents[MAX_CAP_PARENTS];
|
|
enum msm_vidc_inst_capability_type children[MAX_CAP_CHILDREN];
|
|
int (*adjust)(void *inst,
|
|
struct v4l2_ctrl *ctrl);
|
|
int (*set)(void *inst,
|
|
enum msm_vidc_inst_capability_type cap_id);
|
|
};
|
|
|
|
struct msm_vidc_csc_coeff {
|
|
u32 *vpe_csc_custom_matrix_coeff;
|
|
u32 *vpe_csc_custom_bias_coeff;
|
|
u32 *vpe_csc_custom_limit_coeff;
|
|
};
|
|
|
|
struct msm_vidc_efuse_data {
|
|
u32 start_address;
|
|
u32 size;
|
|
u32 mask;
|
|
u32 shift;
|
|
enum efuse_purpose purpose;
|
|
};
|
|
|
|
struct msm_vidc_ubwc_config_data {
|
|
u32 max_channels;
|
|
u32 mal_length;
|
|
u32 highest_bank_bit;
|
|
u32 bank_swzl_level;
|
|
u32 bank_swz2_level;
|
|
u32 bank_swz3_level;
|
|
u32 bank_spreading;
|
|
};
|
|
|
|
struct msm_vidc_platform_data {
|
|
struct msm_platform_core_capability *core_data;
|
|
u32 core_data_size;
|
|
struct msm_platform_inst_capability *instance_data;
|
|
u32 instance_data_size;
|
|
struct msm_vidc_csc_coeff csc_data;
|
|
struct msm_vidc_ubwc_config_data *ubwc_config;
|
|
u32 *bus_bw_nrt;
|
|
struct msm_vidc_efuse_data *efuse_data;
|
|
unsigned int efuse_data_size;
|
|
unsigned int sku_version;
|
|
};
|
|
|
|
struct msm_vidc_platform {
|
|
void *core;
|
|
struct msm_vidc_platform_data data;
|
|
};
|
|
|
|
int msm_vidc_init_platform(struct platform_device *pdev);
|
|
int msm_vidc_deinit_platform(struct platform_device *pdev);
|
|
|
|
#endif // _MSM_VIDC_PLATFORM_H_
|