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

Commit 326725ca authored by Jeyaprakash Soundrapandian's avatar Jeyaprakash Soundrapandian Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: cam: reqmgr: Allocate input queue table per link" into dev/msm-4.9-camx

parents 6bd5a44f d46e67d3
Loading
Loading
Loading
Loading
+11 −6
Original line number Diff line number Diff line
@@ -903,7 +903,13 @@ static struct cam_req_mgr_core_link *__cam_req_mgr_reserve_link(
		CAM_ERR(CAM_CRM, "failed to create link, no mem");
		return NULL;
	}
	in_q = &session->in_q;
	in_q = (struct cam_req_mgr_req_queue *)
		kzalloc(sizeof(struct cam_req_mgr_req_queue), GFP_KERNEL);
	if (!in_q) {
		CAM_ERR(CAM_CRM, "failed to create input queue, no mem");
		kfree(link);
		return NULL;
	}
	mutex_init(&link->lock);

	mutex_lock(&link->lock);
@@ -929,7 +935,7 @@ static struct cam_req_mgr_core_link *__cam_req_mgr_reserve_link(
}

/**
 * __cam_req_mgr_reserve_link()
 * __cam_req_mgr_unreserve_link()
 *
 * @brief  : Reserves one link data struct within session
 * @session: session identifier
@@ -961,6 +967,8 @@ static void __cam_req_mgr_unreserve_link(
		CAM_DBG(CAM_CRM, "Active session links (%d)",
			session->num_links);
	}
	kfree((*link)->req.in_q);
	(*link)->req.in_q = NULL;
	kfree(*link);
	*link = NULL;
	mutex_unlock(&session->lock);
@@ -1910,10 +1918,7 @@ int cam_req_mgr_link(struct cam_req_mgr_link_info *link_info)
	cam_destroy_device_hdl(link->link_hdl);
	link_info->link_hdl = 0;
link_hdl_fail:
	mutex_lock(&link->lock);
	link->state = CAM_CRM_LINK_STATE_AVAILABLE;
	mutex_unlock(&link->lock);

	__cam_req_mgr_unreserve_link(cam_session, &link);
	mutex_unlock(&g_crm_core_dev->crm_lock);
	return rc;
}
+0 −1
Original line number Diff line number Diff line
@@ -315,7 +315,6 @@ struct cam_req_mgr_core_session {
	int32_t                       session_hdl;
	uint32_t                      num_links;
	struct cam_req_mgr_core_link *links[MAX_LINKS_PER_SESSION];
	struct cam_req_mgr_req_queue  in_q;
	struct list_head              entry;
	struct mutex                  lock;
	int32_t                       force_err_recovery;