summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBhushan Rayrikar <brayrikar@nvidia.com>2018-05-04 18:24:48 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-05-17 18:23:27 -0400
commitbd96812cdd6d9e290e9d7507cf40f6c6db539034 (patch)
tree02a6fc0b3db1b4e70240f02fb4f72d80bfa911ab /include
parent186a3c7bd74276af1336af26613752a8f4f3f2ec (diff)
camera: kernel cleanup
* Cleanup unneeded ioctls and related code. * Add a call to set latency allowance for VI. * Allow ISO cleints to set their own platform specific memory latency allowance. * Split a long number in two to fix issues flagged by static code analysis. Bug 2069761 Bug 1815173 Bug 200408168 Change-Id: If66ab6f604c2bfa369d7466d2cb1f5e42a6c6a41 Signed-off-by: Bhushan Rayrikar <brayrikar@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1708678 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/nvhost_isp_ioctl.h6
-rw-r--r--include/linux/nvhost_nvcsi_ioctl.h1
-rw-r--r--include/linux/nvhost_vi_ioctl.h7
-rw-r--r--include/media/tegra_camera_platform.h2
-rw-r--r--include/media/vi.h7
-rw-r--r--include/video/vi4.h4
6 files changed, 6 insertions, 21 deletions
diff --git a/include/linux/nvhost_isp_ioctl.h b/include/linux/nvhost_isp_ioctl.h
index b5d00811b..09652b489 100644
--- a/include/linux/nvhost_isp_ioctl.h
+++ b/include/linux/nvhost_isp_ioctl.h
@@ -3,7 +3,7 @@
3 * 3 *
4 * Tegra ISP Driver 4 * Tegra ISP Driver
5 * 5 *
6 * Copyright (c) 2013-2015, NVIDIA CORPORATION. All rights reserved. 6 * Copyright (c) 2013-2018, NVIDIA CORPORATION. All rights reserved.
7 * 7 *
8 * This program is free software; you can redistribute it and/or modify it 8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms and conditions of the GNU General Public License, 9 * under the terms and conditions of the GNU General Public License,
@@ -59,10 +59,6 @@ struct isp_la_bw {
59 * isp device. 59 * isp device.
60 */ 60 */
61 61
62#define NVHOST_ISP_IOCTL_SET_EMC \
63 _IOW(NVHOST_ISP_IOCTL_MAGIC, 1, struct isp_emc)
64#define NVHOST_ISP_IOCTL_SET_ISP_CLK _IOW(NVHOST_ISP_IOCTL_MAGIC, 2, long)
65#define NVHOST_ISP_IOCTL_GET_ISP_CLK _IOW(NVHOST_ISP_IOCTL_MAGIC, 3, u64)
66#define NVHOST_ISP_IOCTL_SET_ISP_LA_BW \ 62#define NVHOST_ISP_IOCTL_SET_ISP_LA_BW \
67 _IOW(NVHOST_ISP_IOCTL_MAGIC, 4, struct isp_la_bw) 63 _IOW(NVHOST_ISP_IOCTL_MAGIC, 4, struct isp_la_bw)
68#endif 64#endif
diff --git a/include/linux/nvhost_nvcsi_ioctl.h b/include/linux/nvhost_nvcsi_ioctl.h
index 213aae78a..91918d128 100644
--- a/include/linux/nvhost_nvcsi_ioctl.h
+++ b/include/linux/nvhost_nvcsi_ioctl.h
@@ -79,7 +79,6 @@
79#define NVCSI_PHY_NUM_BRICKS 4 79#define NVCSI_PHY_NUM_BRICKS 4
80#define NVHOST_NVCSI_IOCTL_MAGIC 'N' 80#define NVHOST_NVCSI_IOCTL_MAGIC 'N'
81 81
82#define NVHOST_NVCSI_IOCTL_SET_NVCSI_CLK _IOW(NVHOST_NVCSI_IOCTL_MAGIC, 0, long)
83#define NVHOST_NVCSI_IOCTL_DESKEW_SETUP _IOW(NVHOST_NVCSI_IOCTL_MAGIC, 1, long) 82#define NVHOST_NVCSI_IOCTL_DESKEW_SETUP _IOW(NVHOST_NVCSI_IOCTL_MAGIC, 1, long)
84#define NVHOST_NVCSI_IOCTL_DESKEW_APPLY _IOW(NVHOST_NVCSI_IOCTL_MAGIC, 2, long) 83#define NVHOST_NVCSI_IOCTL_DESKEW_APPLY _IOW(NVHOST_NVCSI_IOCTL_MAGIC, 2, long)
85 84
diff --git a/include/linux/nvhost_vi_ioctl.h b/include/linux/nvhost_vi_ioctl.h
index 7a363368b..277856e84 100644
--- a/include/linux/nvhost_vi_ioctl.h
+++ b/include/linux/nvhost_vi_ioctl.h
@@ -3,7 +3,7 @@
3 * 3 *
4 * Tegra VI Driver 4 * Tegra VI Driver
5 * 5 *
6 * Copyright (c) 2013-2015, NVIDIA CORPORATION. All rights reserved. 6 * Copyright (c) 2013-2018, NVIDIA CORPORATION. All rights reserved.
7 * 7 *
8 * This program is free software; you can redistribute it and/or modify it 8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms and conditions of the GNU General Public License, 9 * under the terms and conditions of the GNU General Public License,
@@ -44,9 +44,4 @@
44 44
45#define NVHOST_VI_IOCTL_ENABLE_TPG _IOW(NVHOST_VI_IOCTL_MAGIC, 1, uint) 45#define NVHOST_VI_IOCTL_ENABLE_TPG _IOW(NVHOST_VI_IOCTL_MAGIC, 1, uint)
46 46
47#define NVHOST_VI_IOCTL_SET_EMC_INFO _IOW(NVHOST_VI_IOCTL_MAGIC, 2, uint)
48#define NVHOST_VI_IOCTL_SET_VI_CLK _IOW(NVHOST_VI_IOCTL_MAGIC, 3, long)
49#define NVHOST_VI_IOCTL_GET_VI_CLK _IOW(NVHOST_VI_IOCTL_MAGIC, 4, u64)
50#define NVHOST_VI_IOCTL_SET_VI_LA_BW _IOW(NVHOST_VI_IOCTL_MAGIC, 5, u32)
51
52#endif 47#endif
diff --git a/include/media/tegra_camera_platform.h b/include/media/tegra_camera_platform.h
index e64536a5e..c7ee95155 100644
--- a/include/media/tegra_camera_platform.h
+++ b/include/media/tegra_camera_platform.h
@@ -67,6 +67,7 @@ enum tegra_camera_sensor_type {
67 * @actual_clk_rate: clk rate set by nvhost 67 * @actual_clk_rate: clk rate set by nvhost
68 * @bw: calculated bw for this node 68 * @bw: calculated bw for this node
69 * @use_max: populated by hw engine to decide it's clocking policy 69 * @use_max: populated by hw engine to decide it's clocking policy
70 * @memory_latency: latency allowed for memory freq scaling
70 * @pdev: pointer to platform_data 71 * @pdev: pointer to platform_data
71 * @sensor_type: type of sensor as defined by the enum above 72 * @sensor_type: type of sensor as defined by the enum above
72 * @pixel_rate: pixel rate coming out of the sensor 73 * @pixel_rate: pixel rate coming out of the sensor
@@ -88,6 +89,7 @@ struct tegra_camera_dev_info {
88 unsigned long actual_clk_rate; 89 unsigned long actual_clk_rate;
89 u64 bw; 90 u64 bw;
90 bool use_max; 91 bool use_max;
92 u32 memory_latency;
91 struct platform_device *pdev; 93 struct platform_device *pdev;
92 u32 sensor_type; 94 u32 sensor_type;
93 u64 pixel_rate; 95 u64 pixel_rate;
diff --git a/include/media/vi.h b/include/media/vi.h
index 7e149a10c..29165d249 100644
--- a/include/media/vi.h
+++ b/include/media/vi.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Tegra Graphics Host VI 2 * Tegra Graphics Host VI
3 * 3 *
4 * Copyright (c) 2012-2017, NVIDIA CORPORATION. All rights reserved. 4 * Copyright (c) 2012-2018, NVIDIA CORPORATION. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify it 6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License, 7 * under the terms and conditions of the GNU General Public License,
@@ -19,7 +19,6 @@
19#ifndef __NVHOST_VI_H__ 19#ifndef __NVHOST_VI_H__
20#define __NVHOST_VI_H__ 20#define __NVHOST_VI_H__
21 21
22#include <linux/platform/tegra/isomgr.h>
23#include <linux/tegra-powergate.h> 22#include <linux/tegra-powergate.h>
24#include <linux/clk/tegra.h> 23#include <linux/clk/tegra.h>
25 24
@@ -95,13 +94,9 @@ struct vi {
95 struct tegra_vi_stats vi_out; 94 struct tegra_vi_stats vi_out;
96 struct work_struct stats_work; 95 struct work_struct stats_work;
97 struct tegra_vi_mfi_ctx *mfi_ctx; 96 struct tegra_vi_mfi_ctx *mfi_ctx;
98#if defined(CONFIG_TEGRA_ISOMGR)
99 tegra_isomgr_handle isomgr_handle;
100#endif
101 int vi_irq; 97 int vi_irq;
102 uint vi_bypass_bw; 98 uint vi_bypass_bw;
103 uint max_bw; 99 uint max_bw;
104 struct mutex update_la_lock;
105 bool master_deinitialized; 100 bool master_deinitialized;
106 bool tpg_opened; 101 bool tpg_opened;
107 bool sensor_opened; 102 bool sensor_opened;
diff --git a/include/video/vi4.h b/include/video/vi4.h
index f51ea714d..11ae95583 100644
--- a/include/video/vi4.h
+++ b/include/video/vi4.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Tegra Graphics Host VI 2 * Tegra Graphics Host VI
3 * 3 *
4 * Copyright (c) 2015-2017 NVIDIA Corporation. All rights reserved. 4 * Copyright (c) 2015-2018, NVIDIA Corporation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify it 6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License, 7 * under the terms and conditions of the GNU General Public License,
@@ -37,7 +37,6 @@ struct nvhost_vi_dev {
37 atomic_t notify_overflow; 37 atomic_t notify_overflow;
38 atomic_t fmlite_overflow; 38 atomic_t fmlite_overflow;
39 struct tegra_mc_vi mc_vi; 39 struct tegra_mc_vi mc_vi;
40 struct mutex update_la_lock;
41 unsigned int vi_bypass_bw; 40 unsigned int vi_bypass_bw;
42}; 41};
43 42
@@ -46,7 +45,6 @@ int nvhost_vi4_finalize_poweron(struct platform_device *);
46void nvhost_vi4_idle(struct platform_device *); 45void nvhost_vi4_idle(struct platform_device *);
47void nvhost_vi4_busy(struct platform_device *); 46void nvhost_vi4_busy(struct platform_device *);
48void nvhost_vi4_reset(struct platform_device *); 47void nvhost_vi4_reset(struct platform_device *);
49extern const struct file_operations nvhost_vi4_ctrl_ops;
50int nvhost_vi4_aggregate_constraints(struct platform_device *dev, 48int nvhost_vi4_aggregate_constraints(struct platform_device *dev,
51 int clk_index, 49 int clk_index,
52 unsigned long floor_rate, 50 unsigned long floor_rate,