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

Commit ba91a17f authored by Karthik Anantha Ram's avatar Karthik Anantha Ram Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: reqmgr: Change v4l2 notify error log type



In case userspace fails to dequeue a v4l2 event with a
valid request, kernel will dump that message as error and
rest will be rate limited.

CRs-Fixed: 2558548
Change-Id: I1c6769f47d0e1ca4a3ce5c6467f6c280104ae2b8
Signed-off-by: default avatarKarthik Anantha Ram <kartanan@codeaurora.org>
parent 2eeb1a0b
Loading
Loading
Loading
Loading
+25 −17
Original line number Diff line number Diff line
@@ -204,31 +204,39 @@ static void cam_v4l2_event_queue_notify_error(const struct v4l2_event *old,

	ev_header = CAM_REQ_MGR_GET_PAYLOAD_PTR((*old),
		struct cam_req_mgr_message);

	switch (old->id) {
	case V4L_EVENT_CAM_REQ_MGR_SOF:
		CAM_ERR(CAM_CRM, "Failed to notify SOF event");
		CAM_ERR(CAM_CRM, "Sess %X FrameId %lld ReqId %lld link %X",
	case V4L_EVENT_CAM_REQ_MGR_SOF_BOOT_TS:
		if (ev_header->u.frame_msg.request_id)
			CAM_ERR(CAM_CRM,
				"Failed to notify %s Sess %X FrameId %lld FrameMeta %d ReqId %lld link %X",
				((old->id == V4L_EVENT_CAM_REQ_MGR_SOF) ?
				"SOF_TS" : "BOOT_TS"),
				ev_header->session_hdl,
				ev_header->u.frame_msg.frame_id,
				ev_header->u.frame_msg.frame_id_meta,
				ev_header->u.frame_msg.request_id,
				ev_header->u.frame_msg.link_hdl);
		else
			CAM_WARN_RATE_LIMIT_CUSTOM(CAM_CRM, 5, 1,
				"Failed to notify %s Sess %X FrameId %lld FrameMeta %d ReqId %lld link %X",
				((old->id == V4L_EVENT_CAM_REQ_MGR_SOF) ?
				"SOF_TS" : "BOOT_TS"),
				ev_header->session_hdl,
				ev_header->u.frame_msg.frame_id,
				ev_header->u.frame_msg.frame_id_meta,
				ev_header->u.frame_msg.request_id,
				ev_header->u.frame_msg.link_hdl);
		break;
	case V4L_EVENT_CAM_REQ_MGR_ERROR:
		CAM_ERR(CAM_CRM, "Failed to notify ERROR");
		CAM_ERR(CAM_CRM, "Sess %X ReqId %d Link %X Type %d",
			ev_header->u.err_msg.error_type,
		CAM_ERR(CAM_CRM,
			"Failed to notify ERROR Sess %X ReqId %d Link %X Type %d",
			ev_header->session_hdl,
			ev_header->u.err_msg.request_id,
			ev_header->u.err_msg.link_hdl,
			ev_header->u.err_msg.error_type);
		break;
	case V4L_EVENT_CAM_REQ_MGR_SOF_BOOT_TS:
		CAM_ERR(CAM_CRM, "Failed to notify BOOT_TS event");
		CAM_ERR(CAM_CRM, "Sess %X FrameId %lld ReqId %lld link %X",
			ev_header->session_hdl,
			ev_header->u.frame_msg.frame_id,
			ev_header->u.frame_msg.request_id,
			ev_header->u.frame_msg.link_hdl);
		break;
	default:
		CAM_ERR(CAM_CRM, "Failed to notify crm event id %d",
			old->id);