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

Commit a00f91f3 authored by Linux Build Service Account's avatar Linux Build Service Account
Browse files

Merge 55ad64a2 on remote branch

Change-Id: I3d4fbd9d60383a27a903813089d6832e729e313d
parents 2f785d35 55ad64a2
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1587,6 +1587,11 @@ int cam_hw_cdm_handle_error_info(
	set_bit(CAM_CDM_RESET_HW_STATUS, &cdm_core->cdm_status);
	set_bit(CAM_CDM_FLUSH_HW_STATUS, &cdm_core->cdm_status);

	if (cdm_hw->hw_state == CAM_HW_STATE_POWER_DOWN) {
		CAM_WARN(CAM_CDM, "CDM is in power down state");
		goto end;
	}

	/* First pause CDM, If it fails still proceed to dump debug info */
	cam_hw_cdm_pause_core(cdm_hw, true);

+24 −6
Original line number Diff line number Diff line
@@ -81,6 +81,11 @@ static int cam_ope_mgr_get_rsc_idx(struct cam_ope_ctx *ctx_data,
	return rsc_idx;
}

static bool cam_ope_is_pending_request(struct cam_ope_ctx *ctx_data)
{
	return !bitmap_empty(ctx_data->bitmap, CAM_CTX_REQ_MAX);
}

static int cam_ope_mgr_process_cmd(void *priv, void *data)
{
	int rc;
@@ -96,14 +101,16 @@ static int cam_ope_mgr_process_cmd(void *priv, void *data)

	ctx_data = priv;
	task_data = (struct ope_cmd_work_data *)data;

	mutex_lock(&hw_mgr->hw_mgr_mutex);
	cdm_cmd = task_data->data;

	if (!cdm_cmd) {
		CAM_ERR(CAM_OPE, "Invalid params%pK", cdm_cmd);
		mutex_unlock(&hw_mgr->hw_mgr_mutex);
		return -EINVAL;
	}

	mutex_lock(&hw_mgr->hw_mgr_mutex);
	if (ctx_data->ctx_state != OPE_CTX_STATE_ACQUIRED) {
		mutex_unlock(&hw_mgr->hw_mgr_mutex);
		CAM_ERR(CAM_OPE, "ctx id :%u is not in use",
@@ -119,6 +126,13 @@ static int cam_ope_mgr_process_cmd(void *priv, void *data)
		return -EINVAL;
	}

	if (!cam_ope_is_pending_request(ctx_data)) {
		CAM_WARN(CAM_OPE, "no pending req, req %lld last flush %lld",
			task_data->req_id, ctx_data->last_flush_req);
		mutex_unlock(&hw_mgr->hw_mgr_mutex);
		return -EINVAL;
	}

	CAM_DBG(CAM_OPE,
		"cam_cdm_submit_bls: handle 0x%x, ctx_id %d req %d cookie %d",
		ctx_data->ope_cdm.cdm_handle, ctx_data->ctx_id,
@@ -256,11 +270,6 @@ static int cam_ope_mgr_reapply_config(struct cam_ope_hw_mgr *hw_mgr,
	return rc;
}

static bool cam_ope_is_pending_request(struct cam_ope_ctx *ctx_data)
{
	return !bitmap_empty(ctx_data->bitmap, CAM_CTX_REQ_MAX);
}

static int cam_get_valid_ctx_id(void)
{
	struct cam_ope_hw_mgr *hw_mgr = ope_hw_mgr;
@@ -698,6 +707,7 @@ static int32_t cam_ope_process_request_timer(void *priv, void *data)
		task = cam_req_mgr_workq_get_task(ope_hw_mgr->msg_work);
		if (!task) {
			CAM_ERR(CAM_OPE, "no empty task");
			mutex_unlock(&ctx_data->ctx_mutex);
			return 0;
		}
		task_data = (struct ope_msg_work_data *)task->payload;
@@ -1947,6 +1957,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 {
	uint32_t direction;
	uint32_t resource_type;
	uint32_t num_planes;
	uint32_t reserved;
	uint32_t pix_pattern;
	uint32_t num_stripes[OPE_MAX_PLANES];
	uint32_t mem_handle[OPE_MAX_PLANES];
	uint32_t plane_offset[OPE_MAX_PLANES];