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

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

Merge "msm: camera: Changes to accommodate 32-bit Arch" into dev/msm-4.14-camx

parents f660c43e 2c0b2d6a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -195,11 +195,11 @@ struct cam_cdm_hw_intf_cmd_submit_bl {
	struct cam_cdm_bl_request *data;
};

/* struct cam_cdm_hw_mem - CDM hw memory.struct */
/* struct cam_cdm_hw_mem - CDM hw memory struct */
struct cam_cdm_hw_mem {
	int32_t handle;
	uint32_t vaddr;
	uint64_t kmdvaddr;
	uintptr_t kmdvaddr;
	size_t size;
};

+3 −3
Original line number Diff line number Diff line
@@ -105,7 +105,7 @@ struct cam_cdm_bl_cmd {
	union {
		int32_t mem_handle;
		uint32_t *hw_iova;
		void *kernel_iova;
		uintptr_t kernel_iova;
	} bl_addr;
	uint32_t offset;
	uint32_t len;
+2 −3
Original line number Diff line number Diff line
@@ -87,7 +87,7 @@ int cam_virtual_cdm_submit_bl(struct cam_hw_info *cdm_hw,

	mutex_lock(&client->lock);
	for (i = 0; i < req->data->cmd_arrary_count ; i++) {
		uint64_t vaddr_ptr = 0;
		uintptr_t vaddr_ptr = 0;
		size_t len = 0;

		if ((!cdm_cmd->cmd[i].len) &&
@@ -106,8 +106,7 @@ int cam_virtual_cdm_submit_bl(struct cam_hw_info *cdm_hw,
		} else if (req->data->type ==
			CAM_CDM_BL_CMD_TYPE_KERNEL_IOVA) {
			rc = 0;
			vaddr_ptr =
				(uint64_t)cdm_cmd->cmd[i].bl_addr.kernel_iova;
			vaddr_ptr = cdm_cmd->cmd[i].bl_addr.kernel_iova;
			len = cdm_cmd->cmd[i].offset + cdm_cmd->cmd[i].len;
		} else {
			CAM_ERR(CAM_CDM,
+4 −4
Original line number Diff line number Diff line
@@ -272,7 +272,7 @@ int32_t cam_context_prepare_dev_to_hw(struct cam_context *ctx,
	int rc = 0;
	struct cam_ctx_request *req = NULL;
	struct cam_hw_prepare_update_args cfg;
	uint64_t packet_addr;
	uintptr_t packet_addr;
	struct cam_packet *packet;
	size_t len = 0;
	int32_t i = 0, j = 0;
@@ -315,8 +315,7 @@ int32_t cam_context_prepare_dev_to_hw(struct cam_context *ctx,
	/* for config dev, only memory handle is supported */
	/* map packet from the memhandle */
	rc = cam_mem_get_cpu_buf((int32_t) cmd->packet_handle,
		(uint64_t *) &packet_addr,
		&len);
		&packet_addr, &len);
	if (rc != 0) {
		CAM_ERR(CAM_CTXT, "[%s][%d] Can not get packet address",
			ctx->dev_name, ctx->ctx_id);
@@ -324,7 +323,8 @@ int32_t cam_context_prepare_dev_to_hw(struct cam_context *ctx,
		goto free_req;
	}

	packet = (struct cam_packet *) (packet_addr + cmd->offset);
	packet = (struct cam_packet *) ((uint8_t *)packet_addr +
		(uint32_t)cmd->offset);

	if (packet->header.request_id <= ctx->last_flush_req) {
		CAM_DBG(CAM_CORE,
+5 −2
Original line number Diff line number Diff line
@@ -13,6 +13,9 @@
#ifndef _CAM_HW_MGR_INTF_H_
#define _CAM_HW_MGR_INTF_H_

#include <linux/time.h>
#include <linux/types.h>

/*
 * This file declares Constants, Enums, Structures and APIs to be used as
 * Interface between HW Manager and Context.
@@ -48,7 +51,7 @@ struct cam_hw_update_entry {
	uint32_t           offset;
	uint32_t           len;
	uint32_t           flags;
	uint64_t           addr;
	uintptr_t          addr;
};

/**
@@ -94,7 +97,7 @@ struct cam_hw_acquire_args {
	cam_hw_event_cb_func         event_cb;
	uint32_t                     num_acq;
	uint32_t                     acquire_info_size;
	uint64_t                     acquire_info;
	uintptr_t                    acquire_info;
	void                        *ctxt_to_hw_map;
};

Loading