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

Commit b524a7f5 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: vidc: Set operating rate to video firmware"

parents b30fd65c abb00635
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -1001,6 +1001,18 @@ int create_pkt_cmd_session_set_property(
		pkt->size += sizeof(struct hfi_frame_rate);
		break;
	}
	case HAL_CONFIG_OPERATING_RATE:
	{
		struct hfi_operating_rate *hfi;
		struct hal_operating_rate *prop =
			(struct hal_operating_rate *) pdata;

		pkt->rg_property_data[0] = HFI_PROPERTY_CONFIG_OPERATING_RATE;
		hfi = (struct hfi_operating_rate *) &pkt->rg_property_data[1];
		hfi->operating_rate = prop->operating_rate;
		pkt->size += sizeof(struct hfi_operating_rate);
		break;
	}
	case HAL_PARAM_UNCOMPRESSED_FORMAT_SELECT:
	{
		u32 buffer_type;
+5 −0
Original line number Diff line number Diff line
@@ -1248,6 +1248,7 @@ int msm_venc_s_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl)
	int rc = 0;
	struct hal_request_iframe request_iframe;
	struct hal_bitrate bitrate;
	struct hal_operating_rate operating_rate;
	struct hal_profile_level profile_level;
	enum hal_h264_entropy h264_entropy;
	struct hal_intra_period intra_period;
@@ -1925,6 +1926,10 @@ int msm_venc_s_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl)
				ctrl->val >> 16);
			inst->clk_data.operating_rate = ctrl->val;
			inst->clk_data.turbo_mode = false;
			property_id = HAL_CONFIG_OPERATING_RATE;
			operating_rate.operating_rate =
				inst->clk_data.operating_rate;
			pdata = &operating_rate;
		}
		break;
	case V4L2_CID_MPEG_VIDC_VIDEO_VENC_BITRATE_TYPE:
+5 −0
Original line number Diff line number Diff line
@@ -118,6 +118,7 @@ enum hal_extradata_id {

enum hal_property {
	HAL_CONFIG_FRAME_RATE = 0x04000001,
	HAL_CONFIG_OPERATING_RATE,
	HAL_PARAM_UNCOMPRESSED_FORMAT_SELECT,
	HAL_PARAM_UNCOMPRESSED_PLANE_ACTUAL_CONSTRAINTS_INFO,
	HAL_PARAM_UNCOMPRESSED_PLANE_ACTUAL_INFO,
@@ -408,6 +409,10 @@ struct hal_frame_rate {
	u32 frame_rate;
};

struct hal_operating_rate {
	u32 operating_rate;
};

enum hal_uncompressed_format {
	HAL_COLOR_FORMAT_MONOCHROME     = 0x00000001,
	HAL_COLOR_FORMAT_NV12           = 0x00000002,
+6 −0
Original line number Diff line number Diff line
@@ -247,6 +247,8 @@ struct hfi_buffer_info {
	(HFI_PROPERTY_CONFIG_COMMON_START + 0x001)
#define HFI_PROPERTY_CONFIG_VIDEOCORES_USAGE				\
	(HFI_PROPERTY_CONFIG_COMMON_START + 0x002)
#define HFI_PROPERTY_CONFIG_OPERATING_RATE				\
	(HFI_PROPERTY_CONFIG_COMMON_START + 0x003)

#define HFI_PROPERTY_PARAM_VDEC_COMMON_START				\
	(HFI_DOMAIN_BASE_VDEC + HFI_ARCH_COMMON_OFFSET + 0x3000)
@@ -479,6 +481,10 @@ struct hfi_frame_rate {
	u32 frame_rate;
};

struct hfi_operating_rate {
	u32 operating_rate;
};

#define HFI_INTRA_REFRESH_NONE				(HFI_COMMON_BASE + 0x1)
#define HFI_INTRA_REFRESH_CYCLIC			(HFI_COMMON_BASE + 0x2)
#define HFI_INTRA_REFRESH_RANDOM			(HFI_COMMON_BASE + 0x5)