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

Commit eb1148a1 authored by Camera Software Integration's avatar Camera Software Integration Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: utils: Adding device type to track device handles" into camera-kernel.lnx.3.1

parents 2dd56a01 de18f795
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -571,7 +571,7 @@ int32_t cam_context_acquire_dev_to_hw(struct cam_context *ctx,
	req_hdl_param.media_entity_flag = 0;
	req_hdl_param.priv = ctx;
	req_hdl_param.ops = ctx->crm_ctx_intf;

	req_hdl_param.dev_id = ctx->dev_id;
	ctx->dev_hdl = cam_create_device_hdl(&req_hdl_param);
	if (ctx->dev_hdl <= 0) {
		rc = -EFAULT;
+3 −3
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
 */

#include <linux/debugfs.h>
@@ -796,14 +796,14 @@ int cam_node_handle_ioctl(struct cam_node *node, struct cam_control *cmd)
			rc = __cam_node_handle_acquire_hw_v1(node, acquire_ptr);
			if (rc) {
				CAM_ERR(CAM_CORE,
					"acquire device failed(rc = %d)", rc);
					"acquire hw failed(rc = %d)", rc);
				goto acquire_kfree;
			}
		} else if (api_version == 2) {
			rc = __cam_node_handle_acquire_hw_v2(node, acquire_ptr);
			if (rc) {
				CAM_ERR(CAM_CORE,
					"acquire device failed(rc = %d)", rc);
					"acquire hw failed(rc = %d)", rc);
				goto acquire_kfree;
			}
		}
+1 −1
Original line number Diff line number Diff line
@@ -3835,7 +3835,7 @@ static int __cam_isp_ctx_acquire_dev_in_available(struct cam_context *ctx,
	req_hdl_param.media_entity_flag = 0;
	req_hdl_param.ops = ctx->crm_ctx_intf;
	req_hdl_param.priv = ctx;

	req_hdl_param.dev_id = CAM_ISP;
	CAM_DBG(CAM_ISP, "get device handle form bridge");
	ctx->dev_hdl = cam_create_device_hdl(&req_hdl_param);
	if (ctx->dev_hdl <= 0) {
+4 −2
Original line number Diff line number Diff line
@@ -3168,7 +3168,8 @@ int cam_req_mgr_create_session(
	ses_info->session_hdl = session_hdl;

	mutex_init(&cam_session->lock);
	CAM_DBG(CAM_CRM, "LOCK_DBG session lock %pK", &cam_session->lock);
	CAM_DBG(CAM_CRM, "LOCK_DBG session lock %pK hdl 0x%x",
		&cam_session->lock, session_hdl);

	mutex_lock(&cam_session->lock);
	cam_session->session_hdl = session_hdl;
@@ -3328,7 +3329,7 @@ int cam_req_mgr_link(struct cam_req_mgr_ver_info *link_info)
	memset(&root_dev, 0, sizeof(struct cam_create_dev_hdl));
	root_dev.session_hdl = link_info->u.link_info_v1.session_hdl;
	root_dev.priv = (void *)link;

	root_dev.dev_id = CAM_CRM;
	mutex_lock(&link->lock);
	/* Create unique dev handle for link */
	link->link_hdl = cam_create_device_hdl(&root_dev);
@@ -3437,6 +3438,7 @@ int cam_req_mgr_link_v2(struct cam_req_mgr_ver_info *link_info)
	memset(&root_dev, 0, sizeof(struct cam_create_dev_hdl));
	root_dev.session_hdl = link_info->u.link_info_v2.session_hdl;
	root_dev.priv = (void *)link;
	root_dev.dev_id = CAM_CRM;

	mutex_lock(&link->lock);
	/* Create unique dev handle for link */
+2 −1
Original line number Diff line number Diff line
@@ -156,7 +156,8 @@ static int cam_req_mgr_close(struct file *filep)
	struct v4l2_subdev_fh *subdev_fh = to_v4l2_subdev_fh(vfh);

	CAM_WARN(CAM_CRM,
		"release invoked associated userspace process has died");
		"release invoked associated userspace process has died, open_cnt: %d",
		g_dev.open_cnt);
	mutex_lock(&g_dev.cam_lock);

	if (g_dev.open_cnt <= 0) {
Loading