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

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

msm: camera: reqmgr: Create workq based on driver requirement



Currently all workqueues are created as high priority and unbounded,
this change allows the driver to set the necessary flags while
creating workq.

Change-Id: I8bcc4c29419f19c326ca34a6927af9a04480ae40
Signed-off-by: default avatarKarthik Anantha Ram <kartanan@codeaurora.org>
parent a304a254
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1884,7 +1884,7 @@ int cam_fd_hw_mgr_init(struct device_node *of_node,
	}

	rc = cam_req_mgr_workq_create("cam_fd_worker", CAM_FD_WORKQ_NUM_TASK,
		&g_fd_hw_mgr.work, CRM_WORKQ_USAGE_IRQ);
		&g_fd_hw_mgr.work, CRM_WORKQ_USAGE_IRQ, 0);
	if (rc) {
		CAM_ERR(CAM_FD, "Unable to create a worker, rc=%d", rc);
		goto detach_smmu;
+4 −3
Original line number Diff line number Diff line
@@ -4241,21 +4241,22 @@ static int cam_icp_mgr_create_wq(void)
	int i;

	rc = cam_req_mgr_workq_create("icp_command_queue", ICP_WORKQ_NUM_TASK,
		&icp_hw_mgr.cmd_work, CRM_WORKQ_USAGE_NON_IRQ);
		&icp_hw_mgr.cmd_work, CRM_WORKQ_USAGE_NON_IRQ,
		0);
	if (rc) {
		CAM_ERR(CAM_ICP, "unable to create a command worker");
		goto cmd_work_failed;
	}

	rc = cam_req_mgr_workq_create("icp_message_queue", ICP_WORKQ_NUM_TASK,
		&icp_hw_mgr.msg_work, CRM_WORKQ_USAGE_IRQ);
		&icp_hw_mgr.msg_work, CRM_WORKQ_USAGE_IRQ, 0);
	if (rc) {
		CAM_ERR(CAM_ICP, "unable to create a message worker");
		goto msg_work_failed;
	}

	rc = cam_req_mgr_workq_create("icp_timer_queue", ICP_WORKQ_NUM_TASK,
		&icp_hw_mgr.timer_work, CRM_WORKQ_USAGE_IRQ);
		&icp_hw_mgr.timer_work, CRM_WORKQ_USAGE_IRQ, 0);
	if (rc) {
		CAM_ERR(CAM_ICP, "unable to create a timer worker");
		goto timer_work_failed;
+1 −1
Original line number Diff line number Diff line
@@ -4506,7 +4506,7 @@ int cam_ife_hw_mgr_init(struct cam_hw_mgr_intf *hw_mgr_intf)

	/* Create Worker for ife_hw_mgr with 10 tasks */
	rc = cam_req_mgr_workq_create("cam_ife_worker", 10,
			&g_ife_hw_mgr.workq, CRM_WORKQ_USAGE_NON_IRQ);
			&g_ife_hw_mgr.workq, CRM_WORKQ_USAGE_NON_IRQ, 0);
	if (rc < 0) {
		CAM_ERR(CAM_ISP, "Unable to create worker");
		goto end;
+2 −2
Original line number Diff line number Diff line
@@ -1172,7 +1172,7 @@ static int cam_jpeg_setup_workqs(void)
		"jpeg_command_queue",
		CAM_JPEG_WORKQ_NUM_TASK,
		&g_jpeg_hw_mgr.work_process_frame,
		CRM_WORKQ_USAGE_NON_IRQ);
		CRM_WORKQ_USAGE_NON_IRQ, 0);
	if (rc) {
		CAM_ERR(CAM_JPEG, "unable to create a worker %d", rc);
		goto work_process_frame_failed;
@@ -1182,7 +1182,7 @@ static int cam_jpeg_setup_workqs(void)
		"jpeg_message_queue",
		CAM_JPEG_WORKQ_NUM_TASK,
		&g_jpeg_hw_mgr.work_process_irq_cb,
		CRM_WORKQ_USAGE_IRQ);
		CRM_WORKQ_USAGE_IRQ, 0);
	if (rc) {
		CAM_ERR(CAM_JPEG, "unable to create a worker %d", rc);
		goto work_process_irq_cb_failed;
+2 −1
Original line number Diff line number Diff line
@@ -989,7 +989,8 @@ int cam_lrme_mgr_register_device(
	CAM_DBG(CAM_LRME, "Create submit workq for %s", buf);
	rc = cam_req_mgr_workq_create(buf,
		CAM_LRME_WORKQ_NUM_TASK,
		&hw_device->work, CRM_WORKQ_USAGE_NON_IRQ);
		&hw_device->work, CRM_WORKQ_USAGE_NON_IRQ,
		0);
	if (rc) {
		CAM_ERR(CAM_LRME,
			"Unable to create a worker, rc=%d", rc);
Loading