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

Commit 84a9dcdd authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "camera_v2: jpeg_10: Fix debug prints for 64bit"

parents 7ea2faf2 18e25e2c
Loading
Loading
Loading
Loading
+14 −11
Original line number Diff line number Diff line
/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -70,8 +70,9 @@ static long msm_jpeg_compat_ioctl(struct file *filp, unsigned int cmd,
	int rc;
	struct msm_jpeg_device *pgmn_dev = filp->private_data;

	JPEG_DBG("%s:%d] cmd=%d pgmn_dev=0x%x arg=0x%x\n", __func__,
		__LINE__, _IOC_NR(cmd), (uint32_t)pgmn_dev, (uint32_t)arg);
	JPEG_DBG("%s:%d] cmd=%d pgmn_dev=0x%lx arg=0x%lx\n", __func__,
		__LINE__, _IOC_NR(cmd), (unsigned long)pgmn_dev,
	(unsigned long)arg);

	rc = __msm_jpeg_compat_ioctl(pgmn_dev, cmd, arg);

@@ -85,8 +86,9 @@ static long msm_jpeg_ioctl(struct file *filp, unsigned int cmd,
	int rc;
	struct msm_jpeg_device *pgmn_dev = filp->private_data;

	JPEG_DBG("%s:%d] cmd=%d pgmn_dev=0x%x arg=0x%x\n", __func__,
		__LINE__, _IOC_NR(cmd), (uint32_t)pgmn_dev, (uint32_t)arg);
	JPEG_DBG("%s:%d] cmd=%d pgmn_dev=0x%lx arg=0x%lx\n", __func__,
		__LINE__, _IOC_NR(cmd), (unsigned long)pgmn_dev,
	(unsigned long)arg);

	rc = __msm_jpeg_ioctl(pgmn_dev, cmd, arg);

@@ -111,8 +113,9 @@ int msm_jpeg_subdev_init(struct v4l2_subdev *jpeg_sd)
	struct msm_jpeg_device *pgmn_dev =
		(struct msm_jpeg_device *)jpeg_sd->host_priv;

	JPEG_DBG("%s:%d: jpeg_sd=0x%x pgmn_dev=0x%x\n",
		__func__, __LINE__, (uint32_t)jpeg_sd, (uint32_t)pgmn_dev);
	JPEG_DBG("%s:%d: jpeg_sd=0x%lx pgmn_dev=0x%lx\n",
		__func__, __LINE__, (unsigned long)jpeg_sd,
		(unsigned long)pgmn_dev);
	rc = __msm_jpeg_open(pgmn_dev);
	JPEG_DBG("%s:%d: rc=%d\n",
		__func__, __LINE__, rc);
@@ -128,7 +131,7 @@ static long msm_jpeg_subdev_ioctl(struct v4l2_subdev *sd,

	JPEG_DBG("%s: cmd=%d\n", __func__, cmd);

	JPEG_DBG("%s: pgmn_dev 0x%x", __func__, (uint32_t)pgmn_dev);
	JPEG_DBG("%s: pgmn_dev 0x%lx", __func__, (unsigned long)pgmn_dev);

	JPEG_DBG("%s: Calling __msm_jpeg_ioctl\n", __func__);

@@ -142,7 +145,7 @@ void msm_jpeg_subdev_release(struct v4l2_subdev *jpeg_sd)
	int rc;
	struct msm_jpeg_device *pgmn_dev =
		(struct msm_jpeg_device *)jpeg_sd->host_priv;
	JPEG_DBG("%s:pgmn_dev=0x%x", __func__, (uint32_t)pgmn_dev);
	JPEG_DBG("%s:pgmn_dev=0x%lx", __func__, (unsigned long)pgmn_dev);
	rc = __msm_jpeg_release(pgmn_dev);
	JPEG_DBG("%s:rc=%d", __func__, rc);
}
@@ -184,8 +187,8 @@ static int msm_jpeg_init_dev(struct platform_device *pdev)

	v4l2_subdev_init(&msm_jpeg_device_p->subdev, &msm_jpeg_subdev_ops);
	v4l2_set_subdev_hostdata(&msm_jpeg_device_p->subdev, msm_jpeg_device_p);
	JPEG_DBG("%s: msm_jpeg_device_p 0x%x", __func__,
			(uint32_t)msm_jpeg_device_p);
	JPEG_DBG("%s: msm_jpeg_device_p 0x%lx", __func__,
			(unsigned long)msm_jpeg_device_p);

	rc = alloc_chrdev_region(&msm_jpeg_device_p->msm_jpeg_devno, 0, 1,
				devname);
+4 −5
Original line number Diff line number Diff line
@@ -302,8 +302,8 @@ int msm_jpeg_platform_init(struct platform_device *pdev,
		return -ENODEV;
	}
	jpeg_irq = jpeg_irq_res->start;
	JPEG_DBG("%s base address: 0x%x, jpeg irq number: %d\n", __func__,
		jpeg_mem->start, jpeg_irq);
	JPEG_DBG("%s base address: 0x%lx, jpeg irq number: %d\n", __func__,
		(unsigned long)jpeg_mem->start, jpeg_irq);

	pgmn_dev->jpeg_bus_client =
		msm_bus_scale_register_client(&msm_jpeg_bus_client_pdata);
@@ -361,9 +361,8 @@ int msm_jpeg_platform_init(struct platform_device *pdev,
		JPEG_PR_ERR("%s: ioremap failed\n", __func__);
		goto fail_vbif;
	}

	JPEG_DBG("%s:%d] jpeg_vbif 0x%x", __func__, __LINE__,
		(uint32_t)pgmn_dev->jpeg_vbif);
	JPEG_DBG("%s:%d] jpeg_vbif 0x%lx", __func__, __LINE__,
		(unsigned long)pgmn_dev->jpeg_vbif);

	rc = msm_jpeg_attach_iommu(pgmn_dev);
	if (rc < 0)
+20 −19
Original line number Diff line number Diff line
@@ -314,8 +314,8 @@ int msm_jpeg_evt_get(struct msm_jpeg_device *pgmn_dev,
	ctrl_cmd.type = buf_p->vbuf.type;
	kfree(buf_p);

	JPEG_DBG("%s:%d] 0x%08x %d\n", __func__, __LINE__,
		(int) ctrl_cmd.value, ctrl_cmd.len);
	JPEG_DBG("%s:%d] 0x%08lx %d\n", __func__, __LINE__,
		(unsigned long) ctrl_cmd.value, ctrl_cmd.len);

	if (copy_to_user(to, &ctrl_cmd, sizeof(ctrl_cmd))) {
		JPEG_PR_ERR("%s:%d]\n", __func__, __LINE__);
@@ -416,8 +416,8 @@ int msm_jpeg_output_get(struct msm_jpeg_device *pgmn_dev, void __user *to)
		pgmn_dev->domain_num);
	kfree(buf_p);

	JPEG_DBG("%s:%d] 0x%08x %d\n", __func__, __LINE__,
		(int) buf_cmd.vaddr, buf_cmd.y_len);
	JPEG_DBG("%s:%d] 0x%08lx %d\n", __func__, __LINE__,
		(unsigned long) buf_cmd.vaddr, buf_cmd.y_len);

	if (copy_to_user(to, &buf_cmd, sizeof(buf_cmd))) {
		JPEG_PR_ERR("%s:%d]", __func__, __LINE__);
@@ -453,9 +453,9 @@ int msm_jpeg_output_buf_enqueue(struct msm_jpeg_device *pgmn_dev,
		return -EFAULT;
	}

	JPEG_DBG("%s:%d] vaddr = 0x%08x y_len = %d\n, fd = %d",
		__func__, __LINE__, (int) buf_cmd.vaddr, buf_cmd.y_len,
		buf_cmd.fd);
	JPEG_DBG("%s:%d] vaddr = 0x%08lx y_len = %d\n, fd = %d",
		__func__, __LINE__, (unsigned long) buf_cmd.vaddr,
		buf_cmd.y_len, buf_cmd.fd);

	buf_p->y_buffer_addr = msm_jpeg_platform_v2p(pgmn_dev, buf_cmd.fd,
		buf_cmd.y_len + buf_cmd.cbcr_len + buf_cmd.pln2_len,
@@ -551,8 +551,8 @@ int msm_jpeg_input_get(struct msm_jpeg_device *pgmn_dev, void __user *to)
		pgmn_dev->domain_num);
	kfree(buf_p);

	JPEG_DBG("%s:%d] 0x%08x %d\n", __func__, __LINE__,
		(int) buf_cmd.vaddr, buf_cmd.y_len);
	JPEG_DBG("%s:%d] 0x%08lx %d\n", __func__, __LINE__,
		(unsigned long) buf_cmd.vaddr, buf_cmd.y_len);

	if (copy_to_user(to, &buf_cmd, sizeof(buf_cmd))) {
		JPEG_PR_ERR("%s:%d]\n", __func__, __LINE__);
@@ -587,8 +587,8 @@ int msm_jpeg_input_buf_enqueue(struct msm_jpeg_device *pgmn_dev,
		return -EFAULT;
	}

	JPEG_DBG("%s:%d] 0x%08x %d\n", __func__, __LINE__,
		(int) buf_cmd.vaddr, buf_cmd.y_len);
	JPEG_DBG("%s:%d] 0x%08lx %d\n", __func__, __LINE__,
		(unsigned long) buf_cmd.vaddr, buf_cmd.y_len);

	buf_p->y_buffer_addr    = msm_jpeg_platform_v2p(pgmn_dev, buf_cmd.fd,
		buf_cmd.y_len + buf_cmd.cbcr_len +
@@ -748,9 +748,10 @@ int msm_jpeg_ioctl_hw_cmd(struct msm_jpeg_device *pgmn_dev,

	is_copy_to_user = msm_jpeg_hw_exec_cmds(&hw_cmd, 1,
		pgmn_dev->res_size, pgmn_dev->base);
	JPEG_DBG("%s:%d] type %d, n %d, offset %d, mask %x, data %x,pdata %x\n",
	JPEG_DBG(
	"%s:%d] type %d, n %d, offset %d, mask %x, data %x, pdata %lx\n",
		__func__, __LINE__, hw_cmd.type, hw_cmd.n, hw_cmd.offset,
		hw_cmd.mask, hw_cmd.data, (int) hw_cmd.pdata);
		hw_cmd.mask, hw_cmd.data, (unsigned long) hw_cmd.pdata);

	if (is_copy_to_user >= 0) {
		if (copy_to_user(arg, &hw_cmd, sizeof(hw_cmd))) {
@@ -1157,9 +1158,9 @@ int msm_jpeg_ioctl_hw_cmd32(struct msm_jpeg_device *pgmn_dev,

	is_copy_to_user = msm_jpeg_hw_exec_cmds(&hw_cmd, 1,
			pgmn_dev->res_size, pgmn_dev->base);
	JPEG_DBG("%s:%d] type %d, n %d, offset %d, mask %x, data %x pdata %x\n",
	JPEG_DBG("%s:%d] type %d, n %d, offst %d, mask %x, data %x pdata %lx\n",
		__func__, __LINE__, hw_cmd.type, hw_cmd.n, hw_cmd.offset,
		hw_cmd.mask, hw_cmd.data, (int) hw_cmd.pdata);
		hw_cmd.mask, hw_cmd.data, (unsigned long) hw_cmd.pdata);

	if (is_copy_to_user >= 0) {
		if (msm_jpeg_put_hw_cmd32(arg, &hw_cmd, 1)) {
@@ -1486,8 +1487,8 @@ int __msm_jpeg_init(struct msm_jpeg_device *pgmn_dev)
	for (i = 0; i < pgmn_dev->iommu_cnt; i++) {
		pgmn_dev->iommu_ctx_arr[i] = msm_iommu_get_ctx(iommu_name[j]);
		JPEG_DBG("%s:%d] name %s", __func__, __LINE__, iommu_name[j]);
		JPEG_DBG("%s:%d] ctx 0x%x", __func__, __LINE__,
			(uint32_t)pgmn_dev->iommu_ctx_arr[i]);
		JPEG_DBG("%s:%d] ctx 0x%lx", __func__, __LINE__,
			(unsigned long)pgmn_dev->iommu_ctx_arr[i]);
		if (!pgmn_dev->iommu_ctx_arr[i]) {
			JPEG_PR_ERR("%s: No iommu fw context found\n",
					__func__);
@@ -1503,8 +1504,8 @@ int __msm_jpeg_init(struct msm_jpeg_device *pgmn_dev)
		goto error;
	}
	pgmn_dev->domain = msm_get_iommu_domain(pgmn_dev->domain_num);
	JPEG_DBG("%s:%d] dom 0x%x", __func__, __LINE__,
					(uint32_t)pgmn_dev->domain);
	JPEG_DBG("%s:%d] dom 0x%lx", __func__, __LINE__,
					(unsigned long)pgmn_dev->domain);
	if (!pgmn_dev->domain) {
		JPEG_PR_ERR("%s: cannot find domain\n", __func__);
		goto error;