|
@@ -4068,6 +4068,18 @@ hw_dump:
|
|
return rc;
|
|
return rc;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static int __cam_isp_ctx_flush_req_in_flushed_state(
|
|
|
|
+ struct cam_context *ctx,
|
|
|
|
+ struct cam_req_mgr_flush_request *flush_req)
|
|
|
|
+{
|
|
|
|
+ CAM_INFO(CAM_ISP, "Flush (type %d) in flushed state req id %lld ctx_id:%d",
|
|
|
|
+ flush_req->type, flush_req->req_id, ctx->ctx_id);
|
|
|
|
+ if (flush_req->req_id > ctx->last_flush_req)
|
|
|
|
+ ctx->last_flush_req = flush_req->req_id;
|
|
|
|
+
|
|
|
|
+ return 0;
|
|
|
|
+}
|
|
|
|
+
|
|
static int __cam_isp_ctx_flush_req(struct cam_context *ctx,
|
|
static int __cam_isp_ctx_flush_req(struct cam_context *ctx,
|
|
struct list_head *req_list, struct cam_req_mgr_flush_request *flush_req)
|
|
struct list_head *req_list, struct cam_req_mgr_flush_request *flush_req)
|
|
{
|
|
{
|
|
@@ -5171,6 +5183,14 @@ static int __cam_isp_ctx_config_dev_in_top_state(
|
|
packet->header.request_id);
|
|
packet->header.request_id);
|
|
rc = -EBADR;
|
|
rc = -EBADR;
|
|
goto free_req;
|
|
goto free_req;
|
|
|
|
+ } else if ((packet_opcode == CAM_ISP_PACKET_INIT_DEV)
|
|
|
|
+ && (packet->header.request_id <= ctx->last_flush_req)
|
|
|
|
+ && ctx->last_flush_req && packet->header.request_id) {
|
|
|
|
+ CAM_WARN(CAM_ISP,
|
|
|
|
+ "last flushed req is %lld, config dev(init) for req %lld",
|
|
|
|
+ ctx->last_flush_req, packet->header.request_id);
|
|
|
|
+ rc = -EBADR;
|
|
|
|
+ goto free_req;
|
|
}
|
|
}
|
|
|
|
|
|
cfg.packet = packet;
|
|
cfg.packet = packet;
|
|
@@ -6809,6 +6829,7 @@ static struct cam_ctx_ops
|
|
.crm_ops = {
|
|
.crm_ops = {
|
|
.unlink = __cam_isp_ctx_unlink_in_ready,
|
|
.unlink = __cam_isp_ctx_unlink_in_ready,
|
|
.process_evt = __cam_isp_ctx_process_evt,
|
|
.process_evt = __cam_isp_ctx_process_evt,
|
|
|
|
+ .flush_req = __cam_isp_ctx_flush_req_in_flushed_state,
|
|
},
|
|
},
|
|
.irq_ops = NULL,
|
|
.irq_ops = NULL,
|
|
.pagefault_ops = cam_isp_context_dump_requests,
|
|
.pagefault_ops = cam_isp_context_dump_requests,
|