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

Commit ed117417 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: vidc: Change rotation type from config to param"

parents 0c042b90 582c72a3
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -1369,13 +1369,13 @@ int create_pkt_cmd_session_set_property(
		pkt->size += sizeof(u32) * 2;
		break;
	}
	case HAL_CONFIG_VPE_OPERATIONS:
	case HAL_PARAM_VPE_ROTATION:
	{
		struct hfi_operations_type *hfi;
		struct hal_operations *prop =
			(struct hal_operations *) pdata;
		pkt->rg_property_data[0] = HFI_PROPERTY_CONFIG_VPE_OPERATIONS;
		hfi = (struct hfi_operations_type *) &pkt->rg_property_data[1];
		struct hfi_vpe_rotation_type *hfi;
		struct hal_vpe_rotation *prop =
			(struct hal_vpe_rotation *) pdata;
		pkt->rg_property_data[0] = HFI_PROPERTY_PARAM_VPE_ROTATION;
		hfi = (struct hfi_vpe_rotation_type *)&pkt->rg_property_data[1];
		switch (prop->rotate) {
		case HAL_ROTATE_NONE:
			hfi->rotation = HFI_ROTATE_NONE;
@@ -1411,7 +1411,7 @@ int create_pkt_cmd_session_set_property(
			rc = -EINVAL;
			break;
		}
		pkt->size += sizeof(u32) + sizeof(struct hfi_operations_type);
		pkt->size += sizeof(u32) + sizeof(struct hfi_vpe_rotation_type);
		break;
	}
	case HAL_PARAM_VENC_INTRA_REFRESH:
+5 −12
Original line number Diff line number Diff line
@@ -1117,7 +1117,7 @@ int msm_venc_s_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl)
	struct hal_h264_entropy_control h264_entropy_control;
	struct hal_intra_period intra_period;
	struct hal_idr_period idr_period;
	struct hal_operations operations;
	struct hal_vpe_rotation vpe_rotation;
	struct hal_intra_refresh intra_refresh;
	struct hal_multi_slice_control multi_slice_control;
	struct hal_h264_db_control h264_db_control;
@@ -1345,19 +1345,12 @@ int msm_venc_s_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl)
		break;
	case V4L2_CID_MPEG_VIDC_VIDEO_ROTATION:
	{
		if (!(inst->capability.pixelprocess_capabilities &
			HAL_VIDEO_ENCODER_ROTATION_CAPABILITY)) {
			dprintk(VIDC_ERR, "Rotation not supported: %#x\n",
				ctrl->id);
			rc = -ENOTSUPP;
			break;
		}
		property_id = HAL_CONFIG_VPE_OPERATIONS;
		operations.rotate = msm_comm_v4l2_to_hal(
		property_id = HAL_PARAM_VPE_ROTATION;
		vpe_rotation.rotate = msm_comm_v4l2_to_hal(
				V4L2_CID_MPEG_VIDC_VIDEO_ROTATION,
				ctrl->val);
		operations.flip = HAL_FLIP_NONE;
		pdata = &operations;
		vpe_rotation.flip = HAL_FLIP_NONE;
		pdata = &vpe_rotation;
		break;
	}
	case V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE: {
+3 −3
Original line number Diff line number Diff line
@@ -154,7 +154,7 @@ enum hal_property {
	HAL_PARAM_VENC_SESSION_QP_RANGE,
	HAL_CONFIG_VENC_INTRA_PERIOD,
	HAL_CONFIG_VENC_IDR_PERIOD,
	HAL_CONFIG_VPE_OPERATIONS,
	HAL_PARAM_VPE_ROTATION,
	HAL_PARAM_VENC_INTRA_REFRESH,
	HAL_PARAM_VENC_MULTI_SLICE_CONTROL,
	HAL_SYS_DEBUG_CONFIG,
@@ -634,7 +634,7 @@ enum hal_flip {
	HAL_UNUSED_FLIP = 0x10000000,
};

struct hal_operations {
struct hal_vpe_rotation {
	enum hal_rotate rotate;
	enum hal_flip flip;
};
@@ -1019,7 +1019,7 @@ union hal_get_property {
	struct hal_quantization_range quantization_range;
	struct hal_intra_period intra_period;
	struct hal_idr_period idr_period;
	struct hal_operations operations;
	struct hal_vpe_rotation vpe_rotation;
	struct hal_intra_refresh intra_refresh;
	struct hal_multi_slice_control multi_slice_control;
	struct hal_debug_config debug_config;
+6 −11
Original line number Diff line number Diff line
@@ -327,8 +327,6 @@ struct hfi_buffer_info {
	(HFI_PROPERTY_CONFIG_VENC_COMMON_START + 0x004)
#define  HFI_PROPERTY_CONFIG_VENC_SLICE_SIZE                \
	(HFI_PROPERTY_CONFIG_VENC_COMMON_START + 0x005)
#define HFI_PROPERTY_PARAM_VPE_COMMON_START				\
	(HFI_DOMAIN_BASE_VPE + HFI_ARCH_COMMON_OFFSET + 0x7000)
#define  HFI_PROPERTY_CONFIG_VENC_SYNC_FRAME_SEQUENCE_HEADER	\
	(HFI_PROPERTY_CONFIG_VENC_COMMON_START + 0x008)
#define  HFI_PROPERTY_CONFIG_VENC_MARKLTRFRAME			\
@@ -344,13 +342,15 @@ struct hfi_buffer_info {
#define HFI_PROPERTY_CONFIG_VENC_SESSION_QP			\
	(HFI_PROPERTY_CONFIG_VENC_COMMON_START + 0x012)

#define HFI_PROPERTY_PARAM_VPE_COMMON_START				\
	(HFI_DOMAIN_BASE_VPE + HFI_ARCH_COMMON_OFFSET + 0x7000)
#define HFI_PROPERTY_PARAM_VPE_ROTATION				\
	(HFI_PROPERTY_PARAM_VPE_COMMON_START + 0x001)

#define HFI_PROPERTY_CONFIG_VPE_COMMON_START				\
	(HFI_DOMAIN_BASE_VPE + HFI_ARCH_COMMON_OFFSET + 0x8000)
#define  HFI_PROPERTY_CONFIG_VENC_BLUR_FRAME_SIZE		\
	(HFI_PROPERTY_CONFIG_COMMON_START + 0x010)
#define HFI_PROPERTY_CONFIG_VPE_OPERATIONS				\
	(HFI_PROPERTY_CONFIG_VPE_COMMON_START + 0x002)

struct hfi_pic_struct {
	u32 progressive_only;
@@ -472,7 +472,7 @@ struct hfi_idr_period {
	u32 idr_period;
};

struct hfi_operations_type {
struct hfi_vpe_rotation_type {
	u32 rotation;
	u32 flip;
};
@@ -716,12 +716,7 @@ struct hfi_vpe_color_space_conversion {

#define HFI_FLIP_NONE					(HFI_COMMON_BASE + 0x1)
#define HFI_FLIP_HORIZONTAL				(HFI_COMMON_BASE + 0x2)
#define HFI_FLIP_VERTICAL				(HFI_COMMON_BASE + 0x3)

struct hfi_operations {
	u32 rotate;
	u32 flip;
};
#define HFI_FLIP_VERTICAL				(HFI_COMMON_BASE + 0x4)

#define HFI_RESOURCE_SYSCACHE 0x00000002