Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cb428abf authored by Ruofei Ma's avatar Ruofei Ma Committed by Gerrit - the friendly Code Review server
Browse files

msm: cvp: Code clean up



Remove unused functions, structs and rename some functions to
avoid symbol conflict with other drivers.

Change-Id: I6905995977e9c98da79f971ad7681c94fd90f0d0
Signed-off-by: default avatarRuofei Ma <ruofeim@codeaurora.org>
parent 8d9cbae5
Loading
Loading
Loading
Loading
+2 −15
Original line number Diff line number Diff line
@@ -21,14 +21,7 @@ struct cvp_hfi_device *cvp_hfi_initialize(enum msm_cvp_hfi_type hfi_type,
		return NULL;
	}

	switch (hfi_type) {
	case CVP_HFI_VENUS:
		rc = cvp_venus_hfi_initialize(hdev, device_id, res, callback);
		break;
	default:
		dprintk(CVP_ERR, "Unsupported host-firmware interface\n");
		goto err_hfi_init;
	}
	rc = cvp_iris_hfi_initialize(hdev, device_id, res, callback);

	if (rc) {
		if (rc != -EPROBE_DEFER)
@@ -52,13 +45,7 @@ void cvp_hfi_deinitialize(enum msm_cvp_hfi_type hfi_type,
		return;
	}

	switch (hfi_type) {
	case CVP_HFI_VENUS:
		cvp_venus_hfi_delete_device(hdev->hfi_device_data);
		break;
	default:
		dprintk(CVP_ERR, "Unsupported host-firmware interface\n");
	}
	cvp_iris_hfi_delete_device(hdev->hfi_device_data);

	kfree(hdev);
}
+34 −50
Original line number Diff line number Diff line
@@ -27,8 +27,6 @@
#define HFI_Q_ID_CTRL_TO_HOST_DEBUG_Q	0x02
#define HFI_MASK_QHDR_STATUS			0x000000FF

#define CVP_MAX_UNCOMPRESSED_FMT_PLANES	3

#define CVP_IFACEQ_NUMQ					3
#define CVP_IFACEQ_CMDQ_IDX				0
#define CVP_IFACEQ_MSGQ_IDX				1
@@ -104,19 +102,6 @@ struct cvp_hfi_mem_map {
#define SHARED_QSIZE ALIGN(ALIGNED_SFR_SIZE + ALIGNED_QUEUE_SIZE + \
			ALIGNED_QDSS_SIZE, SZ_1M)

enum cvp_hw_reg {
	CVP_HWREG_CTRL_STATUS =  0x1,
	CVP_HWREG_QTBL_INFO =  0x2,
	CVP_HWREG_QTBL_ADDR =  0x3,
	CVP_HWREG_CTRLR_RESET =  0x4,
	CVP_HWREG_IFACEQ_FWRXREQ =  0x5,
	CVP_HWREG_IFACEQ_FWTXREQ =  0x6,
	CVP_HWREG_VHI_SOFTINTEN =  0x7,
	CVP_HWREG_VHI_SOFTINTSTATUS =  0x8,
	CVP_HWREG_VHI_SOFTINTCLR =  0x9,
	CVP_HWREG_HVI_SOFTINTEN =  0xA,
};

struct cvp_mem_addr {
	u32 align_device_addr;
	u8 *align_virtual_addr;
@@ -137,11 +122,11 @@ struct cvp_iface_q_info {
 */

/* Read as "for each 'thing' in a set of 'thingies'" */
#define venus_hfi_for_each_thing(__device, __thing, __thingy) \
	venus_hfi_for_each_thing_continue(__device, __thing, __thingy, 0)
#define iris_hfi_for_each_thing(__device, __thing, __thingy) \
	iris_hfi_for_each_thing_continue(__device, __thing, __thingy, 0)

#define venus_hfi_for_each_thing_reverse(__device, __thing, __thingy) \
	venus_hfi_for_each_thing_reverse_continue(__device, __thing, __thingy, \
#define iris_hfi_for_each_thing_reverse(__device, __thing, __thingy) \
	iris_hfi_for_each_thing_reverse_continue(__device, __thing, __thingy, \
			(__device)->res->__thingy##_set.count - 1)

/* TODO: the __from parameter technically not required since we can figure it
@@ -149,14 +134,14 @@ struct cvp_iface_q_info {
 * sees extensive use, probably worth cleaning it up but for now omitting it
 * since it introduces unnecessary complexity.
 */
#define venus_hfi_for_each_thing_continue(__device, __thing, __thingy, __from) \
#define iris_hfi_for_each_thing_continue(__device, __thing, __thingy, __from) \
	for (__thing = &(__device)->res->\
			__thingy##_set.__thingy##_tbl[__from]; \
		__thing < &(__device)->res->__thingy##_set.__thingy##_tbl[0] + \
			((__device)->res->__thingy##_set.count - __from); \
		++__thing)

#define venus_hfi_for_each_thing_reverse_continue(__device, __thing, __thingy, \
#define iris_hfi_for_each_thing_reverse_continue(__device, __thing, __thingy, \
		__from) \
	for (__thing = &(__device)->res->\
			__thingy##_set.__thingy##_tbl[__from]; \
@@ -164,46 +149,45 @@ struct cvp_iface_q_info {
		--__thing)

/* Regular set helpers */
#define venus_hfi_for_each_regulator(__device, __rinfo) \
	venus_hfi_for_each_thing(__device, __rinfo, regulator)
#define iris_hfi_for_each_regulator(__device, __rinfo) \
	iris_hfi_for_each_thing(__device, __rinfo, regulator)

#define venus_hfi_for_each_regulator_reverse(__device, __rinfo) \
	venus_hfi_for_each_thing_reverse(__device, __rinfo, regulator)
#define iris_hfi_for_each_regulator_reverse(__device, __rinfo) \
	iris_hfi_for_each_thing_reverse(__device, __rinfo, regulator)

#define venus_hfi_for_each_regulator_reverse_continue(__device, __rinfo, \
#define iris_hfi_for_each_regulator_reverse_continue(__device, __rinfo, \
		__from) \
	venus_hfi_for_each_thing_reverse_continue(__device, __rinfo, \
	iris_hfi_for_each_thing_reverse_continue(__device, __rinfo, \
			regulator, __from)

/* Clock set helpers */
#define venus_hfi_for_each_clock(__device, __cinfo) \
	venus_hfi_for_each_thing(__device, __cinfo, clock)
#define iris_hfi_for_each_clock(__device, __cinfo) \
	iris_hfi_for_each_thing(__device, __cinfo, clock)

#define venus_hfi_for_each_clock_reverse(__device, __cinfo) \
	venus_hfi_for_each_thing_reverse(__device, __cinfo, clock)
#define iris_hfi_for_each_clock_reverse(__device, __cinfo) \
	iris_hfi_for_each_thing_reverse(__device, __cinfo, clock)

#define venus_hfi_for_each_clock_reverse_continue(__device, __rinfo, \
#define iris_hfi_for_each_clock_reverse_continue(__device, __rinfo, \
		__from) \
	venus_hfi_for_each_thing_reverse_continue(__device, __rinfo, \
	iris_hfi_for_each_thing_reverse_continue(__device, __rinfo, \
			clock, __from)

/* Bus set helpers */
#define venus_hfi_for_each_bus(__device, __binfo) \
	venus_hfi_for_each_thing(__device, __binfo, bus)
#define venus_hfi_for_each_bus_reverse(__device, __binfo) \
	venus_hfi_for_each_thing_reverse(__device, __binfo, bus)
#define iris_hfi_for_each_bus(__device, __binfo) \
	iris_hfi_for_each_thing(__device, __binfo, bus)
#define iris_hfi_for_each_bus_reverse(__device, __binfo) \
	iris_hfi_for_each_thing_reverse(__device, __binfo, bus)

/* Subcache set helpers */
#define venus_hfi_for_each_subcache(__device, __sinfo) \
	venus_hfi_for_each_thing(__device, __sinfo, subcache)
#define venus_hfi_for_each_subcache_reverse(__device, __sinfo) \
	venus_hfi_for_each_thing_reverse(__device, __sinfo, subcache)
#define iris_hfi_for_each_subcache(__device, __sinfo) \
	iris_hfi_for_each_thing(__device, __sinfo, subcache)
#define iris_hfi_for_each_subcache_reverse(__device, __sinfo) \
	iris_hfi_for_each_thing_reverse(__device, __sinfo, subcache)

#define call_venus_op(d, op, args...)			\
#define call_iris_op(d, op, args...)			\
	(((d) && (d)->vpu_ops && (d)->vpu_ops->op) ? \
	((d)->vpu_ops->op(args)):0)

/* Internal data used in vidc_hal not exposed to msm_vidc*/
struct cvp_hal_data {
	u32 irq;
	phys_addr_t firmware_base;
@@ -222,9 +206,9 @@ enum dsp_flag {
	DSP_SUSPEND = BIT(1),
};

enum venus_hfi_state {
	VENUS_STATE_DEINIT = 1,
	VENUS_STATE_INIT,
enum iris_hfi_state {
	IRIS_STATE_DEINIT = 1,
	IRIS_STATE_INIT,
};

enum reset_state {
@@ -268,12 +252,12 @@ struct iris_hfi_device {
	u32 dsp_flags;
	struct cvp_hal_data *cvp_hal_data;
	struct workqueue_struct *cvp_workq;
	struct workqueue_struct *venus_pm_workq;
	struct workqueue_struct *iris_pm_workq;
	int spur_count;
	int reg_count;
	struct iris_resources resources;
	struct msm_cvp_platform_resources *res;
	enum venus_hfi_state state;
	enum iris_hfi_state state;
	struct cvp_hfi_packetization_ops *pkt_ops;
	enum hfi_packetization_type packetization_type;
	struct msm_cvp_cb_info *response_pkt;
@@ -284,9 +268,9 @@ struct iris_hfi_device {
	struct iris_hfi_vpu_ops *vpu_ops;
};

void cvp_venus_hfi_delete_device(void *device);
void cvp_iris_hfi_delete_device(void *device);

int cvp_venus_hfi_initialize(struct cvp_hfi_device *hdev, u32 device_id,
int cvp_iris_hfi_initialize(struct cvp_hfi_device *hdev, u32 device_id,
		struct msm_cvp_platform_resources *res,
		hfi_cmd_response_callback callback);

+176 −386

File changed.

Preview size limit exceeded, changes collapsed.

+0 −67
Original line number Diff line number Diff line
@@ -10,49 +10,6 @@
#include "cvp_hfi_helper.h"
#include "cvp_hfi_api.h"

#define HFI_EVENT_SESSION_SEQUENCE_CHANGED (HFI_OX_BASE + 0x3)
#define HFI_EVENT_SESSION_PROPERTY_CHANGED (HFI_OX_BASE + 0x4)
#define HFI_EVENT_SESSION_LTRUSE_FAILED (HFI_OX_BASE + 0x5)
#define HFI_EVENT_RELEASE_BUFFER_REFERENCE (HFI_OX_BASE + 0x6)

#define HFI_ERR_SESSION_EMPTY_BUFFER_DONE_OUTPUT_PENDING	\
	(HFI_OX_BASE + 0x1001)
#define HFI_ERR_SESSION_SAME_STATE_OPERATION		\
	(HFI_OX_BASE + 0x1002)
#define HFI_ERR_SESSION_SYNC_FRAME_NOT_DETECTED		\
	(HFI_OX_BASE + 0x1003)
#define  HFI_ERR_SESSION_START_CODE_NOT_FOUND		\
	(HFI_OX_BASE + 0x1004)

#define HFI_PROPERTY_CONFIG_OX_START					\
	(HFI_DOMAIN_BASE_COMMON + HFI_ARCH_OX_OFFSET + 0x02000)
#define HFI_PROPERTY_CONFIG_BUFFER_REQUIREMENTS			\
	(HFI_PROPERTY_CONFIG_OX_START + 0x001)

#define HFI_CMD_SYS_OX_START		\
(HFI_DOMAIN_BASE_COMMON + HFI_ARCH_OX_OFFSET + HFI_CMD_START_OFFSET + 0x0000)
#define HFI_CMD_SYS_PING		(HFI_CMD_SYS_OX_START + 0x002)

#define HFI_CMD_SESSION_OX_START	\
(HFI_DOMAIN_BASE_COMMON + HFI_ARCH_OX_OFFSET + HFI_CMD_START_OFFSET + 0x1000)
#define HFI_CMD_SESSION_START		(HFI_CMD_SESSION_OX_START + 0x002)
#define HFI_CMD_SESSION_STOP		(HFI_CMD_SESSION_OX_START + 0x003)
#define HFI_CMD_SESSION_EMPTY_BUFFER	(HFI_CMD_SESSION_OX_START + 0x004)
#define HFI_CMD_SESSION_FILL_BUFFER	(HFI_CMD_SESSION_OX_START + 0x005)
#define HFI_CMD_SESSION_SUSPEND		(HFI_CMD_SESSION_OX_START + 0x006)
#define HFI_CMD_SESSION_RESUME		(HFI_CMD_SESSION_OX_START + 0x007)
#define HFI_CMD_SESSION_FLUSH		(HFI_CMD_SESSION_OX_START + 0x008)
#define HFI_CMD_SESSION_GET_PROPERTY	(HFI_CMD_SESSION_OX_START + 0x009)
#define HFI_CMD_SESSION_PARSE_SEQUENCE_HEADER	\
	(HFI_CMD_SESSION_OX_START + 0x00A)
#define HFI_CMD_SESSION_RELEASE_BUFFERS		\
	(HFI_CMD_SESSION_OX_START + 0x00B)
#define HFI_CMD_SESSION_RELEASE_RESOURCES	\
	(HFI_CMD_SESSION_OX_START + 0x00C)
#define HFI_CMD_SESSION_CONTINUE	(HFI_CMD_SESSION_OX_START + 0x00D)
#define HFI_CMD_SESSION_SYNC		(HFI_CMD_SESSION_OX_START + 0x00E)

/* =============BASIC OPERATIONS=================*/
#define HFI_CMD_SESSION_CVP_START	\
	(HFI_DOMAIN_BASE_CVP + HFI_ARCH_COMMON_OFFSET +	\
	HFI_CMD_START_OFFSET + 0x1000)
@@ -145,31 +102,10 @@
	(HFI_CMD_SESSION_CVP_START + 0x101)


#define HFI_MSG_SYS_OX_START			\
(HFI_DOMAIN_BASE_COMMON + HFI_ARCH_OX_OFFSET + HFI_MSG_START_OFFSET + 0x0000)
#define HFI_MSG_SYS_PING_ACK	(HFI_MSG_SYS_OX_START + 0x2)

#define HFI_MSG_SESSION_OX_START		\
(HFI_DOMAIN_BASE_COMMON + HFI_ARCH_OX_OFFSET + HFI_MSG_START_OFFSET + 0x1000)
#define HFI_MSG_SESSION_LOAD_RESOURCES_DONE	(HFI_MSG_SESSION_OX_START + 0x1)
#define HFI_MSG_SESSION_START_DONE		(HFI_MSG_SESSION_OX_START + 0x2)
#define HFI_MSG_SESSION_STOP_DONE		(HFI_MSG_SESSION_OX_START + 0x3)
#define HFI_MSG_SESSION_SUSPEND_DONE	(HFI_MSG_SESSION_OX_START + 0x4)
#define HFI_MSG_SESSION_RESUME_DONE		(HFI_MSG_SESSION_OX_START + 0x5)
#define HFI_MSG_SESSION_FLUSH_DONE		(HFI_MSG_SESSION_OX_START + 0x6)
#define HFI_MSG_SESSION_EMPTY_BUFFER_DONE	(HFI_MSG_SESSION_OX_START + 0x7)
#define HFI_MSG_SESSION_FILL_BUFFER_DONE	(HFI_MSG_SESSION_OX_START + 0x8)
#define HFI_MSG_SESSION_PROPERTY_INFO		(HFI_MSG_SESSION_OX_START + 0x9)
#define HFI_MSG_SESSION_RELEASE_RESOURCES_DONE	\
	(HFI_MSG_SESSION_OX_START + 0xA)
#define  HFI_MSG_SESSION_RELEASE_BUFFERS_DONE			\
	(HFI_MSG_SESSION_OX_START + 0xC)

#define HFI_MSG_SESSION_CVP_START	\
	(HFI_DOMAIN_BASE_CVP + HFI_ARCH_COMMON_OFFSET +	\
	HFI_MSG_START_OFFSET + 0x1000)

/* =================BASIC OPERATIONS=================*/
#define HFI_MSG_SESSION_CVP_SET_BUFFERS\
	(HFI_MSG_SESSION_CVP_START + 0x001)
#define HFI_MSG_SESSION_CVP_RELEASE_BUFFERS \
@@ -248,9 +184,6 @@ enum session_flags {
struct cvp_hal_session {
	struct list_head list;
	void *session_id;
	bool is_decoder;
	u32 codec;
	enum hal_domain domain;
	u32 flags;
	void *device;
};
+6 −171
Original line number Diff line number Diff line
@@ -25,12 +25,10 @@
	(__t + __tsz >= __a + __asz) \
)

#define MAX_PROFILE_COUNT	16
#define VENUS_VERSION_LENGTH 128
#define CVP_VERSION_LENGTH 128

/* 16 encoder and 16 decoder sessions */
#define CVP_MAX_SESSIONS	32
#define HAL_VIDEO_CODEC_CVP	0x00010000

#define HFI_DFS_CONFIG_CMD_SIZE	38
#define HFI_DFS_FRAME_CMD_SIZE	16
@@ -144,19 +142,6 @@ enum hal_property {
	HAL_UNUSED_PROPERTY = 0xFFFFFFFF,
};

enum hal_domain {
	HAL_VIDEO_DOMAIN_VPE,
	HAL_VIDEO_DOMAIN_ENCODER,
	HAL_VIDEO_DOMAIN_DECODER,
	HAL_VIDEO_DOMAIN_CVP,
	HAL_UNUSED_DOMAIN = 0x10000000,
};

enum hal_default_properties {
	HAL_VIDEO_DYNAMIC_BUF_MODE = 0x00000001,
	HAL_VIDEO_CONTINUE_DATA_TRANSFER = 0x00000002,
};

enum hal_ssr_trigger_type {
	SSR_ERR_FATAL = 1,
	SSR_SW_DIV_BY_ZERO,
@@ -164,16 +149,6 @@ enum hal_ssr_trigger_type {
	SSR_SESSION_ABORT,
};

struct cvp_hal_profile_level {
	u32 profile;
	u32 level;
};

struct cvp_hal_profile_level_supported {
	u32 profile_count;
	struct cvp_hal_profile_level profile_level[MAX_PROFILE_COUNT];
};

enum hal_intra_refresh_mode {
	HAL_INTRA_REFRESH_NONE,
	HAL_INTRA_REFRESH_CYCLIC,
@@ -181,67 +156,6 @@ enum hal_intra_refresh_mode {
	HAL_UNUSED_INTRA = 0x10000000,
};

struct cvp_hal_intra_refresh {
	enum hal_intra_refresh_mode mode;
	u32 ir_mbs;
};

struct cvp_hal_buffer_requirements {
	enum hal_buffer buffer_type;
	u32 buffer_size;
	u32 buffer_region_size;
	u32 buffer_count_min;
	u32 buffer_count_min_host;
	u32 buffer_count_actual;
	u32 contiguous;
	u32 buffer_alignment;
};

struct cvp_hal_uncompressed_format_supported {
	enum hal_buffer buffer_type;
	u32 format_entries;
	u32 rg_format_info[1];
};

enum hal_interlace_format {
	HAL_INTERLACE_FRAME_PROGRESSIVE                 = 0x01,
	HAL_INTERLACE_INTERLEAVE_FRAME_TOPFIELDFIRST    = 0x02,
	HAL_INTERLACE_INTERLEAVE_FRAME_BOTTOMFIELDFIRST = 0x04,
	HAL_INTERLACE_FRAME_TOPFIELDFIRST               = 0x08,
	HAL_INTERLACE_FRAME_BOTTOMFIELDFIRST            = 0x10,
	HAL_UNUSED_INTERLACE = 0x10000000,
};

struct cvp_hal_interlace_format_supported {
	enum hal_buffer buffer_type;
	enum hal_interlace_format format;
};

struct cvp_hal_capability_supported {
	u32 capability_type;
	u32 min;
	u32 max;
	u32 step_size;
};

struct cvp_hal_nal_stream_format_supported {
	u32 nal_stream_format_supported;
};

enum hal_core_id {
	CVP_CORE_ID_DEFAULT = 0,
	CVP_CORE_ID_1 = 1, /* 0b01 */
	CVP_CORE_ID_2 = 2, /* 0b10 */
	CVP_CORE_ID_3 = 3, /* 0b11 */
	CVP_CORE_ID_UNUSED = 0x10000000,
};

enum hal_work_mode {
	CVP_WORK_MODE_1 = 1,
	CVP_WORK_MODE_2 = 2,
	CVP_WORK_MODE_UNUSED = 0x10000000,
};

enum cvp_resource_id {
	CVP_RESOURCE_NONE,
	CVP_RESOURCE_SYSCACHE,
@@ -270,7 +184,7 @@ struct cvp_hal_buffer_info {
};

struct cvp_hal_fw_info {
	char version[VENUS_VERSION_LENGTH];
	char version[CVP_VERSION_LENGTH];
	phys_addr_t base_addr;
	int register_base;
	int register_size;
@@ -291,15 +205,6 @@ enum hal_event_type {
	HAL_UNUSED_SEQCHG = 0x10000000,
};

enum buffer_mode_type {
	HAL_BUFFER_MODE_DYNAMIC = 0x100,
	HAL_BUFFER_MODE_STATIC = 0x001,
};

struct cvp_buffer_requirements {
	struct cvp_hal_buffer_requirements buffer[HAL_BUFFER_MAX];
};

/* HAL Response */
#define IS_HAL_SYS_CMD(cmd) ((cmd) >= HAL_SYS_INIT_DONE && \
		(cmd) <= HAL_SYS_ERROR)
@@ -357,51 +262,7 @@ enum hal_command_response {
};

struct msm_cvp_capability {
	enum hal_domain domain;
	u32 codec;
	struct cvp_hal_capability_supported width;
	struct cvp_hal_capability_supported height;
	struct cvp_hal_capability_supported mbs_per_frame;
	struct cvp_hal_capability_supported mbs_per_sec;
	struct cvp_hal_capability_supported frame_rate;
	struct cvp_hal_capability_supported scale_x;
	struct cvp_hal_capability_supported scale_y;
	struct cvp_hal_capability_supported bitrate;
	struct cvp_hal_capability_supported bframe;
	struct cvp_hal_capability_supported peakbitrate;
	struct cvp_hal_capability_supported hier_p;
	struct cvp_hal_capability_supported ltr_count;
	struct cvp_hal_capability_supported secure_output2_threshold;
	struct cvp_hal_capability_supported hier_b;
	struct cvp_hal_capability_supported lcu_size;
	struct cvp_hal_capability_supported hier_p_hybrid;
	struct cvp_hal_capability_supported mbs_per_sec_power_save;
	struct cvp_hal_capability_supported extradata;
	struct cvp_hal_capability_supported profile;
	struct cvp_hal_capability_supported level;
	struct cvp_hal_capability_supported i_qp;
	struct cvp_hal_capability_supported p_qp;
	struct cvp_hal_capability_supported b_qp;
	struct cvp_hal_capability_supported rc_modes;
	struct cvp_hal_capability_supported blur_width;
	struct cvp_hal_capability_supported blur_height;
	struct cvp_hal_capability_supported slice_delivery_mode;
	struct cvp_hal_capability_supported slice_bytes;
	struct cvp_hal_capability_supported slice_mbs;
	struct cvp_hal_capability_supported secure;
	struct cvp_hal_capability_supported max_num_b_frames;
	struct cvp_hal_capability_supported max_video_cores;
	struct cvp_hal_capability_supported max_work_modes;
	struct cvp_hal_capability_supported ubwc_cr_stats;
	struct cvp_hal_profile_level_supported profile_level;
	struct cvp_hal_uncompressed_format_supported uncomp_format;
	struct cvp_hal_interlace_format_supported HAL_format;
	struct cvp_hal_nal_stream_format_supported nal_stream_format;
	struct cvp_hal_intra_refresh intra_refresh;
	enum buffer_mode_type alloc_mode_out;
	enum buffer_mode_type alloc_mode_in;
	u32 pixelprocess_capabilities;
	u32 tme_version;
	u32 reserved[183];
};

struct cvp_hal_sys_init_done {
@@ -479,7 +340,7 @@ struct msm_cvp_cb_info {
};

enum msm_cvp_hfi_type {
	CVP_HFI_VENUS,
	CVP_HFI_IRIS,
};

enum msm_cvp_thermal_level {
@@ -501,23 +362,11 @@ enum msm_cvp_power_mode {
};

struct cvp_bus_vote_data {
	enum hal_domain domain;
	u32 codec;
	u32 color_formats[2];
	int num_formats; /* 1 = DPB-OPB unified; 2 = split */
	int input_height, input_width, fps, bitrate;
	int output_height, output_width;
	int compression_ratio;
	int complexity_factor;
	int input_cr;
	u32 domain;
	u32 ddr_bw;
	u32 sys_cache_bw;
	bool use_dpb_read;
	unsigned int lcu_size;
	enum msm_cvp_power_mode power_mode;
	enum hal_work_mode work_mode;
	bool use_sys_cache;
	bool b_frames_enabled;
};

struct cvp_hal_cmd_sys_get_property_packet {
@@ -544,29 +393,15 @@ struct cvp_hfi_device {
	int (*core_init)(void *device);
	int (*core_release)(void *device);
	int (*core_trigger_ssr)(void *device, enum hal_ssr_trigger_type);
	int (*session_init)(void *device, void *session_id,
		enum hal_domain session_type, u32 codec_type,
		void **new_session);
	int (*session_init)(void *device, void *session_id, void **new_session);
	int (*session_end)(void *session);
	int (*session_abort)(void *session);
	int (*session_set_buffers)(void *sess,
				struct cvp_buffer_addr_info *buffer_info);
	int (*session_release_buffers)(void *sess,
				struct cvp_buffer_addr_info *buffer_info);
	int (*session_load_res)(void *sess);
	int (*session_release_res)(void *sess);
	int (*session_start)(void *sess);
	int (*session_continue)(void *sess);
	int (*session_stop)(void *sess);
	int (*session_send)(void *sess,
		struct cvp_kmd_hfi_packet *in_pkt);
	int (*session_get_buf_req)(void *sess);
	int (*session_flush)(void *sess, enum hal_flush flush_mode);
	int (*session_set_property)(void *sess, enum hal_property ptype,
			void *pdata);
	int (*session_get_property)(void *sess, enum hal_property ptype);
	int (*session_pause)(void *sess);
	int (*session_resume)(void *sess);
	int (*scale_clocks)(void *dev, u32 freq);
	int (*vote_bus)(void *dev, struct cvp_bus_vote_data *data,
			int num_data);
Loading