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

Commit 7eee5ea6 authored by Wyes Karny's avatar Wyes Karny
Browse files

msm: camera: reqmgr: Work queue names added



Added wrapper functions for each workq to enable workq names
in log.

CRs-Fixed: 2684378
Change-Id: If5b3671fbf20777cc891cba4b27cad6ed3a0d146
Signed-off-by: default avatarWyes Karny <wkarny@codeaurora.org>
parent 40afc2d6
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -1936,6 +1936,11 @@ int cam_fd_hw_mgr_deinit(struct device_node *of_node)
	return 0;
}

static void cam_req_mgr_process_workq_cam_fd_worker(struct work_struct *w)
{
	cam_req_mgr_process_workq(w);
}

int cam_fd_hw_mgr_init(struct device_node *of_node,
	struct cam_hw_mgr_intf *hw_mgr_intf)
{
@@ -2081,7 +2086,8 @@ 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, 0);
		&g_fd_hw_mgr.work, CRM_WORKQ_USAGE_IRQ, 0,
		cam_req_mgr_process_workq_cam_fd_worker);
	if (rc) {
		CAM_ERR(CAM_FD, "Unable to create a worker, rc=%d", rc);
		goto detach_smmu;
+21 −4
Original line number Diff line number Diff line
@@ -5974,28 +5974,45 @@ static int cam_icp_mgr_init_devs(struct device_node *of_node)
	return rc;
}

static void cam_req_mgr_process_workq_icp_command_queue(struct work_struct *w)
{
	cam_req_mgr_process_workq(w);
}

static void cam_req_mgr_process_workq_icp_message_queue(struct work_struct *w)
{
	cam_req_mgr_process_workq(w);
}

static void cam_req_mgr_process_workq_icp_timer_queue(struct work_struct *w)
{
	cam_req_mgr_process_workq(w);
}

static int cam_icp_mgr_create_wq(void)
{
	int rc;
	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,
		0);
		&icp_hw_mgr.cmd_work, CRM_WORKQ_USAGE_NON_IRQ, 0,
		cam_req_mgr_process_workq_icp_command_queue);
	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, 0);
		&icp_hw_mgr.msg_work, CRM_WORKQ_USAGE_IRQ, 0,
		cam_req_mgr_process_workq_icp_message_queue);
	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, 0);
		&icp_hw_mgr.timer_work, CRM_WORKQ_USAGE_IRQ, 0,
		cam_req_mgr_process_workq_icp_timer_queue);
	if (rc) {
		CAM_ERR(CAM_ICP, "unable to create a timer worker");
		goto timer_work_failed;
+7 −1
Original line number Diff line number Diff line
@@ -4223,6 +4223,11 @@ static int __cam_isp_ctx_acquire_hw_v1(struct cam_context *ctx,
	return rc;
}

static void cam_req_mgr_process_workq_offline_ife_worker(struct work_struct *w)
{
	cam_req_mgr_process_workq(w);
}

static int __cam_isp_ctx_acquire_hw_v2(struct cam_context *ctx,
	void *args)
{
@@ -4347,7 +4352,8 @@ static int __cam_isp_ctx_acquire_hw_v2(struct cam_context *ctx,
		ctx_isp->offline_context = true;

		rc = cam_req_mgr_workq_create("offline_ife", 20,
			&ctx_isp->workq, CRM_WORKQ_USAGE_IRQ, 0);
			&ctx_isp->workq, CRM_WORKQ_USAGE_IRQ, 0,
			cam_req_mgr_process_workq_offline_ife_worker);
		if (rc)
			CAM_ERR(CAM_ISP,
				"Failed to create workq for offline IFE rc:%d",
+7 −1
Original line number Diff line number Diff line
@@ -7405,6 +7405,11 @@ static int cam_ife_hw_mgr_debug_register(void)
	return -ENOMEM;
}

static void cam_req_mgr_process_workq_cam_ife_worker(struct work_struct *w)
{
	cam_req_mgr_process_workq(w);
}

int cam_ife_hw_mgr_init(struct cam_hw_mgr_intf *hw_mgr_intf, int *iommu_hdl)
{
	int rc = -EFAULT;
@@ -7553,7 +7558,8 @@ int cam_ife_hw_mgr_init(struct cam_hw_mgr_intf *hw_mgr_intf, int *iommu_hdl)

	/* 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, 0);
			&g_ife_hw_mgr.workq, CRM_WORKQ_USAGE_NON_IRQ, 0,
			cam_req_mgr_process_workq_cam_ife_worker);
	if (rc < 0) {
		CAM_ERR(CAM_ISP, "Unable to create worker");
		goto end;
+14 −2
Original line number Diff line number Diff line
@@ -1285,6 +1285,16 @@ static int cam_jpeg_mgr_get_hw_caps(void *hw_mgr_priv, void *hw_caps_args)
	return rc;
}

static void cam_req_mgr_process_workq_jpeg_command_queue(struct work_struct *w)
{
	cam_req_mgr_process_workq(w);
}

static void cam_req_mgr_process_workq_jpeg_message_queue(struct work_struct *w)
{
	cam_req_mgr_process_workq(w);
}

static int cam_jpeg_setup_workqs(void)
{
	int rc, i;
@@ -1293,7 +1303,8 @@ 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, 0);
		CRM_WORKQ_USAGE_NON_IRQ, 0,
		cam_req_mgr_process_workq_jpeg_command_queue);
	if (rc) {
		CAM_ERR(CAM_JPEG, "unable to create a worker %d", rc);
		goto work_process_frame_failed;
@@ -1303,7 +1314,8 @@ 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, 0);
		CRM_WORKQ_USAGE_IRQ, 0,
		cam_req_mgr_process_workq_jpeg_message_queue);
	if (rc) {
		CAM_ERR(CAM_JPEG, "unable to create a worker %d", rc);
		goto work_process_irq_cb_failed;
Loading