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

Commit 18f1c814 authored by Rishabh Jain's avatar Rishabh Jain Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: ope: Add support to dynamic switch pix_pattern



Add support to dynamically switch pix_pattern of read clients
based on data received in each request.

CRs-Fixed: 2811530
Change-Id: Icb3ebd33cae59b8db87bc0011d6560492ad29c3a
Signed-off-by: default avatarRishabh Jain <risjai@codeaurora.org>
parent 9d4e62ea
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1978,6 +1978,14 @@ static int cam_ope_mgr_process_cmd_io_buf_req(struct cam_ope_hw_mgr *hw_mgr,
				alignment = in_res->alignment;
				unpack_format = in_res->unpacker_format;
				pack_format = 0;
				if (in_io_buf->pix_pattern >
					PIXEL_PATTERN_CRYCBY) {
					CAM_ERR(CAM_OPE,
						 "Invalid pix pattern = %u",
						in_io_buf->pix_pattern);
					return -EINVAL;
				}
				io_buf->pix_pattern = in_io_buf->pix_pattern;
			} else if (in_io_buf->direction == CAM_BUF_OUTPUT) {
				out_res =
					&ctx_data->ope_acquire.out_res[rsc_idx];
+1 −0
Original line number Diff line number Diff line
@@ -363,6 +363,7 @@ struct ope_io_buf {
	uint32_t format;
	uint32_t fence;
	uint32_t num_planes;
	uint32_t pix_pattern;
	uint32_t num_stripes[OPE_MAX_PLANES];
	struct ope_stripe_io s_io[OPE_MAX_PLANES][OPE_MAX_STRIPES];
};
+1 −1
Original line number Diff line number Diff line
@@ -244,7 +244,7 @@ static uint32_t *cam_ope_bus_rd_update(struct ope_hw *ope_hw_info,
			temp = 0;
			temp |= stripe_io->s_location &
				rd_res_val_client->stripe_location_mask;
			temp |=	(io_port_info->pixel_pattern[rsc_type] &
			temp |= (io_buf->pix_pattern &
				rd_res_val_client->pix_pattern_mask) <<
				rd_res_val_client->pix_pattern_shift;
			temp_reg[count++] = temp;
+2 −2
Original line number Diff line number Diff line
@@ -104,7 +104,7 @@ struct ope_stripe_info {
 * @direction:     Direction of a buffer of a port(Input/Output)
 * @resource_type: Port type
 * @num_planes:    Number of planes for a port
 * @reserved:      Reserved
 * @pix_pattern:   Pixel pattern for raw input
 * @num_stripes:   Stripes per plane
 * @mem_handle:    Memhandles of each Input/Output Port
 * @plane_offset:  Offsets of planes
@@ -120,7 +120,7 @@ struct ope_io_buf_info {
	__u32 direction;
	__u32 resource_type;
	__u32 num_planes;
	__u32 reserved;
	__u32 pix_pattern;
	__u32 num_stripes[OPE_MAX_PLANES];
	__u32 mem_handle[OPE_MAX_PLANES];
	__u32 plane_offset[OPE_MAX_PLANES];