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: Rishabh Jain <risjai@codeaurora.org>
This commit is contained in:
Rishabh Jain
2020-11-05 16:20:35 +05:30
committed by Gerrit - the friendly Code Review server
parent 641fd73444
commit 01249ea8d9
4 changed files with 12 additions and 3 deletions

View File

@@ -1977,6 +1977,14 @@ static int cam_ope_mgr_process_cmd_io_buf_req(struct cam_ope_hw_mgr *hw_mgr,
alignment = in_res->alignment; alignment = in_res->alignment;
unpack_format = in_res->unpacker_format; unpack_format = in_res->unpacker_format;
pack_format = 0; 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) { } else if (in_io_buf->direction == CAM_BUF_OUTPUT) {
out_res = out_res =
&ctx_data->ope_acquire.out_res[rsc_idx]; &ctx_data->ope_acquire.out_res[rsc_idx];

View File

@@ -363,6 +363,7 @@ struct ope_io_buf {
uint32_t format; uint32_t format;
uint32_t fence; uint32_t fence;
uint32_t num_planes; uint32_t num_planes;
uint32_t pix_pattern;
uint32_t num_stripes[OPE_MAX_PLANES]; uint32_t num_stripes[OPE_MAX_PLANES];
struct ope_stripe_io s_io[OPE_MAX_PLANES][OPE_MAX_STRIPES]; struct ope_stripe_io s_io[OPE_MAX_PLANES][OPE_MAX_STRIPES];
}; };

View File

@@ -244,7 +244,7 @@ static uint32_t *cam_ope_bus_rd_update(struct ope_hw *ope_hw_info,
temp = 0; temp = 0;
temp |= stripe_io->s_location & temp |= stripe_io->s_location &
rd_res_val_client->stripe_location_mask; 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_mask) <<
rd_res_val_client->pix_pattern_shift; rd_res_val_client->pix_pattern_shift;
temp_reg[count++] = temp; temp_reg[count++] = temp;

View File

@@ -104,7 +104,7 @@ struct ope_stripe_info {
* @direction: Direction of a buffer of a port(Input/Output) * @direction: Direction of a buffer of a port(Input/Output)
* @resource_type: Port type * @resource_type: Port type
* @num_planes: Number of planes for a port * @num_planes: Number of planes for a port
* @reserved: Reserved * @pix_pattern: Pixel pattern for raw input
* @num_stripes: Stripes per plane * @num_stripes: Stripes per plane
* @mem_handle: Memhandles of each Input/Output Port * @mem_handle: Memhandles of each Input/Output Port
* @plane_offset: Offsets of planes * @plane_offset: Offsets of planes
@@ -120,7 +120,7 @@ struct ope_io_buf_info {
__u32 direction; __u32 direction;
__u32 resource_type; __u32 resource_type;
__u32 num_planes; __u32 num_planes;
__u32 reserved; __u32 pix_pattern;
__u32 num_stripes[OPE_MAX_PLANES]; __u32 num_stripes[OPE_MAX_PLANES];
__u32 mem_handle[OPE_MAX_PLANES]; __u32 mem_handle[OPE_MAX_PLANES];
__u32 plane_offset[OPE_MAX_PLANES]; __u32 plane_offset[OPE_MAX_PLANES];