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

Commit b190ea97 authored by Ramesh V's avatar Ramesh V Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: Fix compilation issues for 32 bit



fix compilation errors in case of 32 bit for 8937.

Change-Id: I064cf5429d529eac5904feb668034c088ec2d7e6
Signed-off-by: default avatarRamesh V <ramev@codeaurora.org>
parent bda8711c
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
#include <linux/dma-attrs.h>
#include <linux/of_platform.h>
#include <linux/iommu.h>
#include <linux/slab.h>
#include <linux/qcom_iommu.h>
#include <linux/dma-mapping.h>
#include <linux/msm_dma_iommu_mapping.h>
@@ -611,13 +612,14 @@ static struct cam_dma_buff_info *cam_smmu_find_mapping_by_virt_address(int idx,
	list_for_each_entry(mapping, &iommu_cb_set.cb_info[idx].smmu_buf_list,
			list) {
		if (mapping->paddr == virt_addr) {
			CDBG("Found virtual address %llx\n", virt_addr);
			CDBG("Found virtual address %lx\n",
				 (unsigned long)virt_addr);
			return mapping;
		}
	}

	pr_err("Error: Cannot find virtual address %llx by index %d\n",
		virt_addr, idx);
	pr_err("Error: Cannot find virtual address %lx by index %d\n",
		(unsigned long)virt_addr, idx);
	return NULL;
}

@@ -662,8 +664,8 @@ static void cam_smmu_clean_buffer_list(int idx)

		if (ret < 0) {
			pr_err("Buffer delete failed: idx = %d\n", idx);
			pr_err("Buffer delete failed: addr = %llx, fd = %d\n",
					mapping_info->paddr,
			pr_err("Buffer delete failed: addr = %lx, fd = %d\n",
					(unsigned long)mapping_info->paddr,
					mapping_info->ion_fd);
			/*
			 * Ignore this error and continue to delete other
@@ -998,7 +1000,8 @@ static int cam_smmu_alloc_scratch_buffer_add_to_list(int idx,

	*virt_addr = (dma_addr_t)iova;

	CDBG("%s: mapped virtual address = %llX\n", __func__, *virt_addr);
	CDBG("%s: mapped virtual address = %lx\n", __func__,
		(unsigned long)*virt_addr);
	return 0;

err_mapping_info:
+1 −1
Original line number Diff line number Diff line
@@ -98,7 +98,7 @@ struct msm_fd_mem_pool {
struct msm_fd_buf_handle {
	int fd;
	struct msm_fd_mem_pool *pool;
	unsigned long size;
	size_t size;
	ion_phys_addr_t addr;
};

+1 −1
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ enum msm_isp_buf_mgr_state {
};

struct msm_isp_buffer_mapped_info {
	unsigned long len;
	size_t len;
	dma_addr_t paddr;
	int buf_fd;
};
+1 −1
Original line number Diff line number Diff line
@@ -1465,7 +1465,7 @@ int msm_isp_print_ping_pong_address(struct vfe_device *vfe_dev,
					pr_err("%s: buf NULL\n", __func__);
					continue;
				}
				pr_debug("%s: stream_id %x ping-pong %d	plane %d start_addr %lu	addr_offset %x len %lx stride %d scanline %d\n"
				pr_debug("%s: stream_id %x ping-pong %d	plane %d start_addr %lu	addr_offset %x len %zx stride %d scanline %d\n"
					, __func__, stream_info->stream_id,
					pingpong_bit, i, (unsigned long)
					buf->mapped_info[i].paddr,
+2 −2
Original line number Diff line number Diff line
@@ -213,12 +213,12 @@ uint32_t msm_jpeg_platform_v2p(struct msm_jpeg_device *pgmn_dev, int fd,
	uint32_t len, int iommu_hdl)
{
	dma_addr_t paddr;
	unsigned long size;
	size_t size;
	int rc;

	rc = cam_smmu_get_phy_addr(pgmn_dev->iommu_hdl, fd, CAM_SMMU_MAP_RW,
			&paddr, &size);
	JPEG_DBG("%s:%d] addr 0x%x size %ld", __func__, __LINE__,
	JPEG_DBG("%s:%d] addr 0x%x size %zu", __func__, __LINE__,
		(uint32_t)paddr, size);

	if (rc < 0) {
Loading