Skip to contentSkip to conversation

media: tegra: Tegra video driver follow-up patches

RFC PATCH In review Sowjanya Komatineni 3 participants 17 messages Apr 28, 2020 – Apr 30, 2020

Subsystems (4)
lore
Share & tools
lore

Sowjanya Komatineni

author maintainer
#0 lore raw

cover media: tegra: Tegra video driver follow-up patches

This is a fllow-up to some last feedback received for Tegra VI driver RFC v10 patches.
https://patchwork.linuxtv.org/cover/63334/

Sowjanya Komatineni (5):
MAINTAINERS: Rename Tegra Video driver path
media: tegra: Rename driver path to tegra-video
media: tegra-video: Move PM runtime handle to streaming
media: tegra-video: Rearrange SoC specific to Tegra210 and cleanup
files
media: tegra-video: Remove module macros for vi and csi driver

 MAINTAINERS                                  |    2 +-
 drivers/staging/media/Kconfig                |    2 +-
 drivers/staging/media/Makefile               |    2 +-
 drivers/staging/media/tegra-video/Kconfig    |   12 +
 drivers/staging/media/tegra-video/Makefile   |    8 +
 drivers/staging/media/tegra-video/TODO       |   10 +
 drivers/staging/media/tegra-video/csi.c      |  536 ++++++++++++
 drivers/staging/media/tegra-video/csi.h      |  146 ++++
 drivers/staging/media/tegra-video/tegra210.c | 1080 ++++++++++++++++++++++++
 drivers/staging/media/tegra-video/vi.c       | 1082 +++++++++++++++++++++++++
 drivers/staging/media/tegra-video/vi.h       |  258 ++++++
 drivers/staging/media/tegra-video/video.c    |  155 ++++
 drivers/staging/media/tegra-video/video.h    |   29 +
 drivers/staging/media/tegra/Kconfig          |   12 -
 drivers/staging/media/tegra/Makefile         |    8 -
 drivers/staging/media/tegra/TODO             |   10 -
 drivers/staging/media/tegra/common.h         |  259 ------
 drivers/staging/media/tegra/csi.c            |  604 --------------
 drivers/staging/media/tegra/csi.h            |  144 ----
 drivers/staging/media/tegra/tegra210.c       |  708 ----------------
 drivers/staging/media/tegra/tegra210.h       |  190 -----
 drivers/staging/media/tegra/vi.c             | 1127 --------------------------
 drivers/staging/media/tegra/vi.h             |   72 --
 drivers/staging/media/tegra/video.c          |  153 ----
 drivers/staging/media/tegra/video.h          |   29 -
 25 files changed, 3319 insertions(+), 3319 deletions(-)
 create mode 100644 drivers/staging/media/tegra-video/Kconfig
 create mode 100644 drivers/staging/media/tegra-video/Makefile
 create mode 100644 drivers/staging/media/tegra-video/TODO
 create mode 100644 drivers/staging/media/tegra-video/csi.c
 create mode 100644 drivers/staging/media/tegra-video/csi.h
 create mode 100644 drivers/staging/media/tegra-video/tegra210.c
 create mode 100644 drivers/staging/media/tegra-video/vi.c
 create mode 100644 drivers/staging/media/tegra-video/vi.h
 create mode 100644 drivers/staging/media/tegra-video/video.c
 create mode 100644 drivers/staging/media/tegra-video/video.h
 delete mode 100644 drivers/staging/media/tegra/Kconfig
 delete mode 100644 drivers/staging/media/tegra/Makefile
 delete mode 100644 drivers/staging/media/tegra/TODO
 delete mode 100644 drivers/staging/media/tegra/common.h
 delete mode 100644 drivers/staging/media/tegra/csi.c
 delete mode 100644 drivers/staging/media/tegra/csi.h
 delete mode 100644 drivers/staging/media/tegra/tegra210.c
 delete mode 100644 drivers/staging/media/tegra/tegra210.h
 delete mode 100644 drivers/staging/media/tegra/vi.c
 delete mode 100644 drivers/staging/media/tegra/vi.h
 delete mode 100644 drivers/staging/media/tegra/video.c
 delete mode 100644 drivers/staging/media/tegra/video.h
Signature · 1 line
2.7.4
author maintainer
#1 lore raw

RFC PATCH 1/5 MAINTAINERS: Rename Tegra Video driver path

This patch renames Tegra video driver path from media/tegra to media/tegra-video as media/tegra is more generic.

---
 MAINTAINERS | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
MAINTAINERS +1 -1
index 795b201..47cd448 100644
@@ -16652,7 +16652,7 @@ L:	[email protected]
 L:	[email protected]
 S:	Maintained
 F:	Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-host1x.txt
-F:	drivers/staging/media/tegra/
+F:	drivers/staging/media/tegra-video/
 
 TEGRA XUSB PADCTL DRIVER
 M:	JC Kuo <[email protected]>
Signature · 1 line
2.7.4
author maintainer
#2 lore raw

RFC PATCH 2/5 media: tegra: Rename driver path to tegra-video

In reply to Sowjanya Komatineni

This patch changes media/tegra to media/tegra-video as tegra seems more generic.

---
 drivers/staging/media/Kconfig                |    2 +-
 drivers/staging/media/Makefile               |    2 +-
 drivers/staging/media/tegra-video/Kconfig    |   12 +
 drivers/staging/media/tegra-video/Makefile   |    8 +
 drivers/staging/media/tegra-video/TODO       |   10 +
 drivers/staging/media/tegra-video/common.h   |  259 ++++++
 drivers/staging/media/tegra-video/csi.c      |  604 ++++++++++++++
 drivers/staging/media/tegra-video/csi.h      |  144 ++++
 drivers/staging/media/tegra-video/tegra210.c |  708 ++++++++++++++++
 drivers/staging/media/tegra-video/tegra210.h |  190 +++++
 drivers/staging/media/tegra-video/vi.c       | 1127 ++++++++++++++++++++++++++
 drivers/staging/media/tegra-video/vi.h       |   72 ++
 drivers/staging/media/tegra-video/video.c    |  153 ++++
 drivers/staging/media/tegra-video/video.h    |   29 +
 drivers/staging/media/tegra/Kconfig          |   12 -
 drivers/staging/media/tegra/Makefile         |    8 -
 drivers/staging/media/tegra/TODO             |   10 -
 drivers/staging/media/tegra/common.h         |  259 ------
 drivers/staging/media/tegra/csi.c            |  604 --------------
 drivers/staging/media/tegra/csi.h            |  144 ----
 drivers/staging/media/tegra/tegra210.c       |  708 ----------------
 drivers/staging/media/tegra/tegra210.h       |  190 -----
 drivers/staging/media/tegra/vi.c             | 1127 --------------------------
 drivers/staging/media/tegra/vi.h             |   72 --
 drivers/staging/media/tegra/video.c          |  153 ----
 drivers/staging/media/tegra/video.h          |   29 -
 26 files changed, 3318 insertions(+), 3318 deletions(-)
 create mode 100644 drivers/staging/media/tegra-video/Kconfig
 create mode 100644 drivers/staging/media/tegra-video/Makefile
 create mode 100644 drivers/staging/media/tegra-video/TODO
 create mode 100644 drivers/staging/media/tegra-video/common.h
 create mode 100644 drivers/staging/media/tegra-video/csi.c
 create mode 100644 drivers/staging/media/tegra-video/csi.h
 create mode 100644 drivers/staging/media/tegra-video/tegra210.c
 create mode 100644 drivers/staging/media/tegra-video/tegra210.h
 create mode 100644 drivers/staging/media/tegra-video/vi.c
 create mode 100644 drivers/staging/media/tegra-video/vi.h
 create mode 100644 drivers/staging/media/tegra-video/video.c
 create mode 100644 drivers/staging/media/tegra-video/video.h
 delete mode 100644 drivers/staging/media/tegra/Kconfig
 delete mode 100644 drivers/staging/media/tegra/Makefile
 delete mode 100644 drivers/staging/media/tegra/TODO
 delete mode 100644 drivers/staging/media/tegra/common.h
 delete mode 100644 drivers/staging/media/tegra/csi.c
 delete mode 100644 drivers/staging/media/tegra/csi.h
 delete mode 100644 drivers/staging/media/tegra/tegra210.c
 delete mode 100644 drivers/staging/media/tegra/tegra210.h
 delete mode 100644 drivers/staging/media/tegra/vi.c
 delete mode 100644 drivers/staging/media/tegra/vi.h
 delete mode 100644 drivers/staging/media/tegra/video.c
 delete mode 100644 drivers/staging/media/tegra/video.h
drivers/staging/media/Kconfig +1 -1
index adf3e52..a291737 100644
@@ -34,7 +34,7 @@ source "drivers/staging/media/rkvdec/Kconfig"
 
 source "drivers/staging/media/sunxi/Kconfig"
 
-source "drivers/staging/media/tegra/Kconfig"
+source "drivers/staging/media/tegra-video/Kconfig"
 
 source "drivers/staging/media/tegra-vde/Kconfig"
 
drivers/staging/media/Makefile +1 -1
index 5c368ab..c38b83b 100644
@@ -5,7 +5,7 @@ obj-$(CONFIG_VIDEO_MESON_VDEC)	+= meson/vdec/
 obj-$(CONFIG_VIDEO_OMAP4)	+= omap4iss/
 obj-$(CONFIG_VIDEO_ROCKCHIP_VDEC)	+= rkvdec/
 obj-$(CONFIG_VIDEO_SUNXI)	+= sunxi/
-obj-$(CONFIG_VIDEO_TEGRA)	+= tegra/
+obj-$(CONFIG_VIDEO_TEGRA)	+= tegra-video/
 obj-$(CONFIG_TEGRA_VDE)		+= tegra-vde/
 obj-$(CONFIG_VIDEO_HANTRO)	+= hantro/
 obj-$(CONFIG_VIDEO_IPU3_IMGU)	+= ipu3/
drivers/staging/media/tegra-video/Kconfig new file +12 -0
new file mode 100644
index 0000000..6cee329
@@ -0,0 +1,12 @@
+# SPDX-License-Identifier: GPL-2.0-only
+config VIDEO_TEGRA
+	tristate "NVIDIA Tegra VI driver"
+	depends on TEGRA_HOST1X || COMPILE_TEST
+	select VIDEO_V4L2
+	select MEDIA_CONTROLLER
+	select VIDEOBUF2_DMA_CONTIG
+	help
+	  Choose this option if you have an NVIDIA Tegra SoC.
+
+	  To compile this driver as a module, choose M here: the module
+	  will be called tegra-video.
drivers/staging/media/tegra-video/Makefile new file +8 -0
new file mode 100644
index 0000000..c0e24b5
@@ -0,0 +1,8 @@
+# SPDX-License-Identifier: GPL-2.0
+tegra-video-objs := \
+		video.o \
+		vi.o \
+		csi.o \
+		tegra210.o
+
+obj-$(CONFIG_VIDEO_TEGRA) += tegra-video.o
drivers/staging/media/tegra-video/TODO new file +10 -0
new file mode 100644
index 0000000..5dcb7a8
@@ -0,0 +1,10 @@
+TODO list
+* Currently driver supports Tegra build-in TPG only with direct media links
+  from CSI to VI. Update the driver to do TPG Vs Sensor media links based on
+  the kernel config CONFIG_VIDEO_TEGRA_TPG.
+* Add real camera sensor capture support
+* Add RAW10 packed video format support to Tegra210 video formats
+* Add Tegra CSI MIPI pads calibration
+* Add MIPI clock Settle time computation based on the data rate
+* Add support for Ganged mode
+* Make sure v4l2-compliance tests pass with all of the above implementations.
drivers/staging/media/tegra-video/common.h new file +259 -0

259 lines not on this page · raw message

drivers/staging/media/tegra-video/csi.c new file +604 -0

604 lines not on this page · raw message

drivers/staging/media/tegra-video/csi.h new file +144 -0

144 lines not on this page · raw message

drivers/staging/media/tegra-video/tegra210.c new file +708 -0

708 lines not on this page · raw message

drivers/staging/media/tegra-video/tegra210.h new file +190 -0

190 lines not on this page · raw message

drivers/staging/media/tegra-video/vi.c new file +1127 -0

1,049 lines not on this page · raw message

drivers/staging/media/tegra-video/vi.h new file +72 -0

72 lines not on this page · raw message

drivers/staging/media/tegra-video/video.c new file +153 -0

153 lines not on this page · raw message

drivers/staging/media/tegra-video/video.h new file +29 -0
new file mode 100644
index 0000000..fadaf21

Lines of this file are not shown. View the raw message.

drivers/staging/media/tegra/Kconfig deleted +0 -12
deleted file mode 100644
index 6cee329..0000000

Lines of this file are not shown. View the raw message.

drivers/staging/media/tegra/Makefile deleted +0 -8
deleted file mode 100644
index c0e24b5..0000000

Lines of this file are not shown. View the raw message.

drivers/staging/media/tegra/TODO deleted +0 -10
deleted file mode 100644
index 5dcb7a8..0000000

Lines of this file are not shown. View the raw message.

drivers/staging/media/tegra/common.h deleted +0 -259

259 lines not on this page · raw message

drivers/staging/media/tegra/csi.c deleted +0 -604

604 lines not on this page · raw message

drivers/staging/media/tegra/csi.h deleted +0 -144

144 lines not on this page · raw message

drivers/staging/media/tegra/tegra210.c deleted +0 -708

708 lines not on this page · raw message

drivers/staging/media/tegra/tegra210.h deleted +0 -190

190 lines not on this page · raw message

drivers/staging/media/tegra/vi.c deleted +0 -1127

1,127 lines not on this page · raw message

drivers/staging/media/tegra/vi.h deleted +0 -72

72 lines not on this page · raw message

drivers/staging/media/tegra/video.c deleted +0 -153

153 lines not on this page · raw message

drivers/staging/media/tegra/video.h deleted +0 -29
deleted file mode 100644
index fadaf21..0000000

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.7.4

Part of the diff is not shown here. View the raw message.

author maintainer
#3 lore raw

RFC PATCH 3/5 media: tegra-video: Move PM runtime handle to streaming

In reply to Sowjanya Komatineni

PM runtime resume and suspend should happen during streaming start and stop so only when there is any active streaming from any of the video devices, power and clocks gets enabled otherwise they will be disabled.

This patch moves pm_runtime_get_sync and pm_runtime_put_sync to streaming start and stop for both Tegra VI and CSI.

---
 drivers/staging/media/tegra-video/csi.c | 27 +++++++++++++++++---------
 drivers/staging/media/tegra-video/csi.h |  2 ++
 drivers/staging/media/tegra-video/vi.c  | 34 ++++++++++++++++++++-------------
 drivers/staging/media/tegra-video/vi.h  |  2 ++
 4 files changed, 43 insertions(+), 22 deletions(-)
drivers/staging/media/tegra-video/csi.c +18 -9
index b3dd0c3..29ccdae 100644
@@ -272,8 +272,25 @@ static int tegra_csi_s_stream(struct v4l2_subdev *subdev, int enable)
 	struct tegra_vi_channel *chan = v4l2_get_subdev_hostdata(subdev);
 	struct tegra_csi_channel *csi_chan = to_csi_chan(subdev);
 	struct tegra_csi *csi = csi_chan->csi;
+	int ret;
+
+	if (enable && atomic_add_return(1, &csi->clk_refcnt) == 1) {
+		ret = pm_runtime_get_sync(csi->dev);
+		if (ret < 0) {
+			dev_err(csi->dev,
+				"failed to get runtime PM: %d\n", ret);
+			pm_runtime_put_noidle(csi->dev);
+			atomic_dec(&csi->clk_refcnt);
+			return ret;
+		}
+	}
+
+	ret = csi->ops->csi_streaming(csi_chan, chan->pg_mode, enable);
 
-	return csi->ops->csi_streaming(csi_chan, chan->pg_mode, enable);
+	if ((ret < 0 || !enable) && atomic_dec_and_test(&csi->clk_refcnt))
+		pm_runtime_put_sync(csi->dev);
+
+	return ret;
 }
 
 /*
@@ -437,13 +454,6 @@ static int tegra_csi_init(struct host1x_client *client)
 
 	INIT_LIST_HEAD(&csi->csi_chans);
 
-	ret = pm_runtime_get_sync(csi->dev);
-	if (ret < 0) {
-		dev_err(csi->dev, "failed to get runtime PM: %d\n", ret);
-		pm_runtime_put_noidle(csi->dev);
-		return ret;
-	}
-
 	ret = tegra_csi_tpg_channels_alloc(csi);
 	if (ret < 0) {
 		dev_err(csi->dev,
@@ -470,7 +480,6 @@ static int tegra_csi_exit(struct host1x_client *client)
 	struct tegra_csi *csi = host1x_client_to_csi(client);
 
 	tegra_csi_channels_cleanup(csi);
-	pm_runtime_put_sync(csi->dev);
 
 	return 0;
 }
drivers/staging/media/tegra-video/csi.h +2 -0
index 217d5d3..4781b83 100644
@@ -125,6 +125,7 @@ struct tegra_csi_soc {
  * @soc: pointer to SoC data structure
  * @ops: csi operations
  * @channels: list head for CSI channels
+ * @clk_refcnt: reference counter for clock enable/disable
  */
 struct tegra_csi {
 	struct device *dev;
@@ -134,6 +135,7 @@ struct tegra_csi {
 	const struct tegra_csi_soc *soc;
 	const struct tegra_csi_ops *ops;
 	struct list_head csi_chans;
+	atomic_t clk_refcnt;
 };
 
 void tegra_csi_error_recover(struct v4l2_subdev *subdev);
drivers/staging/media/tegra-video/vi.c +21 -13
index 61ecc2b..cd4c08d 100644
@@ -200,8 +200,25 @@ void tegra_channel_release_buffers(struct tegra_vi_channel *chan,
 static int tegra_channel_start_streaming(struct vb2_queue *vq, u32 count)
 {
 	struct tegra_vi_channel *chan = vb2_get_drv_priv(vq);
+	int ret;
 
-	return chan->vi->ops->vi_start_streaming(vq, count);
+	if (atomic_add_return(1, &chan->vi->power_on_refcnt) == 1) {
+		ret = pm_runtime_get_sync(chan->vi->dev);
+		if (ret < 0) {
+			dev_err(chan->vi->dev,
+				"failed to get runtime PM: %d\n", ret);
+			pm_runtime_put_noidle(chan->vi->dev);
+			atomic_dec(&chan->vi->power_on_refcnt);
+			return ret;
+		}
+	}
+
+	ret = chan->vi->ops->vi_start_streaming(vq, count);
+
+	if (ret < 0 && atomic_dec_and_test(&chan->vi->power_on_refcnt))
+		pm_runtime_put_sync(chan->vi->dev);
+
+	return ret;
 }
 
 static void tegra_channel_stop_streaming(struct vb2_queue *vq)
@@ -209,6 +226,9 @@ static void tegra_channel_stop_streaming(struct vb2_queue *vq)
 	struct tegra_vi_channel *chan = vb2_get_drv_priv(vq);
 
 	chan->vi->ops->vi_stop_streaming(vq);
+
+	if (atomic_dec_and_test(&chan->vi->power_on_refcnt))
+		pm_runtime_put_sync(chan->vi->dev);
 }
 
 static const struct vb2_ops tegra_channel_queue_qops = {
@@ -920,13 +940,6 @@ static int tegra_vi_init(struct host1x_client *client)
 
 	INIT_LIST_HEAD(&vi->vi_chans);
 
-	ret = pm_runtime_get_sync(vi->dev);
-	if (ret < 0) {
-		dev_err(vi->dev, "failed to get runtime PM: %d\n", ret);
-		pm_runtime_put_noidle(vi->dev);
-		return ret;
-	}
-
 	ret = tegra_vi_tpg_channels_alloc(vi);
 	if (ret < 0) {
 		dev_err(vi->dev, "failed to allocate tpg channels: %d\n", ret);
@@ -947,14 +960,11 @@ static int tegra_vi_init(struct host1x_client *client)
 		kfree(chan);
 	}
 
-	pm_runtime_put_sync(vi->dev);
 	return ret;
 }
 
 static int tegra_vi_exit(struct host1x_client *client)
 {
-	struct tegra_vi *vi = host1x_client_to_vi(client);
-
 	/*
 	 * Do not cleanup the channels here as application might still be
 	 * holding video device nodes. Channels cleanup will happen during
@@ -962,8 +972,6 @@ static int tegra_vi_exit(struct host1x_client *client)
 	 * device nodes are released.
 	 */
 
-	pm_runtime_put_sync(vi->dev);
-
 	return 0;
 }
 
drivers/staging/media/tegra-video/vi.h +2 -0
index bf0ed1a..b7a5439 100644
@@ -54,6 +54,7 @@ struct tegra_vi_soc {
  * @soc: pointer to SoC data structure
  * @ops: vi operations
  * @vi_chans: list head for VI channels
+ * @power_on_refcnt: reference counter for power and clocks on/off
  */
 struct tegra_vi {
 	struct device *dev;
@@ -64,6 +65,7 @@ struct tegra_vi {
 	const struct tegra_vi_soc *soc;
 	const struct tegra_vi_ops *ops;
 	struct list_head vi_chans;
+	atomic_t power_on_refcnt;
 };
 
 void tegra_channels_cleanup(struct tegra_vi *vi);
Signature · 1 line
2.7.4
#4 lore raw

Re: [RFC PATCH v1 3/5] media: tegra-video: Move PM runtime handle to streaming

28.04.2020 07:20, Sowjanya Komatineni пишет:

Quoted 16 lines
drivers/staging/media/tegra-video/csi.c +8 -0
index b3dd0c3..29ccdae 100644
@@ -272,8 +272,25 @@ static int tegra_csi_s_stream(struct v4l2_subdev *subdev, int enable)
 	struct tegra_vi_channel *chan = v4l2_get_subdev_hostdata(subdev);
 	struct tegra_csi_channel *csi_chan = to_csi_chan(subdev);
 	struct tegra_csi *csi = csi_chan->csi;
+	int ret;
+
+	if (enable && atomic_add_return(1, &csi->clk_refcnt) == 1) {
+		ret = pm_runtime_get_sync(csi->dev);
+		if (ret < 0) {
+			dev_err(csi->dev,
+				"failed to get runtime PM: %d\n", ret);
+			pm_runtime_put_noidle(csi->dev);

drivers/staging/media/tegra-video/csi.c static int tegra_csi_s_stream(struct v4l2_subdev *subdev, int enable) · line 291

Quoted 10 lines
drivers/staging/media/tegra-video/csi.c +8 -1
+			atomic_dec(&csi->clk_refcnt);
+			return ret;
+		}
+	}
+
+	ret = csi->ops->csi_streaming(csi_chan, chan->pg_mode, enable);
 
-	return csi->ops->csi_streaming(csi_chan, chan->pg_mode, enable);
+	if ((ret < 0 || !enable) && atomic_dec_and_test(&csi->clk_refcnt))
+		pm_runtime_put_sync(csi->dev);

Runtime PM maintains its own refcount, why these
clk_refcnt/power_on_refcnt are needed?

author maintainer
#5 lore raw

Re: [RFC PATCH v1 3/5] media: tegra-video: Move PM runtime handle to streaming

Quoted 27 lines · Dmitry Osipenko

External email: Use caution opening links or attachments

28.04.2020 07:20, Sowjanya Komatineni пишет:

Quoted 23 lines
drivers/staging/media/tegra-video/csi.c +14 -0
index b3dd0c3..29ccdae 100644
@@ -272,8 +272,25 @@ static int tegra_csi_s_stream(struct v4l2_subdev *subdev, int enable)
       struct tegra_vi_channel *chan = v4l2_get_subdev_hostdata(subdev);
       struct tegra_csi_channel *csi_chan = to_csi_chan(subdev);
       struct tegra_csi *csi = csi_chan->csi;
+     int ret;
+
+     if (enable && atomic_add_return(1, &csi->clk_refcnt) == 1) {
+             ret = pm_runtime_get_sync(csi->dev);
+             if (ret < 0) {
+                     dev_err(csi->dev,
+                             "failed to get runtime PM: %d\n", ret);
+                     pm_runtime_put_noidle(csi->dev);
+                     atomic_dec(&csi->clk_refcnt);
+                     return ret;
+             }
+     }
+
+     ret = csi->ops->csi_streaming(csi_chan, chan->pg_mode, enable);
 
Quoted 5 lines

drivers/staging/media/tegra-video/csi.c static int tegra_csi_s_stream(struct v4l2_subdev *subdev, int enable) · line 291

Quoted 3 lines
drivers/staging/media/tegra-video/csi.c +2 -1
-     return csi->ops->csi_streaming(csi_chan, chan->pg_mode, enable);
+     if ((ret < 0 || !enable) && atomic_dec_and_test(&csi->clk_refcnt))
+             pm_runtime_put_sync(csi->dev);

Runtime PM maintains its own refcount, why these
clk_refcnt/power_on_refcnt are needed?

Streaming is per channel and we can't turn power/clocks off while other channels may still be running.

#6 lore raw

Re: [RFC PATCH v1 3/5] media: tegra-video: Move PM runtime handle to streaming

28.04.2020 17:51, Sowjanya Komatineni пишет:

Quoted 31 lines · Dmitry Osipenko
Quoted 29 lines

External email: Use caution opening links or attachments

28.04.2020 07:20, Sowjanya Komatineni пишет:

Quoted 25 lines
drivers/staging/media/tegra-video/csi.c +14 -0
index b3dd0c3..29ccdae 100644
@@ -272,8 +272,25 @@ static int tegra_csi_s_stream(struct v4l2_subdev
 *subdev, int enable)
        struct tegra_vi_channel *chan = v4l2_get_subdev_hostdata(subdev);
        struct tegra_csi_channel *csi_chan = to_csi_chan(subdev);
        struct tegra_csi *csi = csi_chan->csi;
+     int ret;
+
+     if (enable && atomic_add_return(1, &csi->clk_refcnt) == 1) {
+             ret = pm_runtime_get_sync(csi->dev);
+             if (ret < 0) {
+                     dev_err(csi->dev,
+                             "failed to get runtime PM: %d\n", ret);
+                     pm_runtime_put_noidle(csi->dev);
+                     atomic_dec(&csi->clk_refcnt);
+                     return ret;
+             }
+     }
+
+     ret = csi->ops->csi_streaming(csi_chan, chan->pg_mode, enable);
 
Quoted 9 lines
Quoted 5 lines

drivers/staging/media/tegra-video/csi.c static int tegra_csi_s_stream(struct v4l2_subdev *subdev, int enable) · line 291

Quoted 3 lines
drivers/staging/media/tegra-video/csi.c +2 -1
-     return csi->ops->csi_streaming(csi_chan, chan->pg_mode, enable);
+     if ((ret < 0 || !enable) && atomic_dec_and_test(&csi->clk_refcnt))
+             pm_runtime_put_sync(csi->dev);

Runtime PM maintains its own refcount, why these
clk_refcnt/power_on_refcnt are needed?

Streaming is per channel and we can't turn power/clocks off while other channels may still be running.

All channels use the same CSI device. You should remove the custom refcounting.

BTW, next time you'll really need to do refcounting, use the generic kref.

author maintainer
#7 lore raw

Re: [RFC PATCH v1 3/5] media: tegra-video: Move PM runtime handle to streaming

Quoted 39 lines · Dmitry Osipenko

External email: Use caution opening links or attachments

28.04.2020 17:51, Sowjanya Komatineni пишет:

Quoted 35 lines · Dmitry Osipenko
Quoted 34 lines

External email: Use caution opening links or attachments

28.04.2020 07:20, Sowjanya Komatineni пишет:

Quoted 18 lines
drivers/staging/media/tegra-video/csi.c +8 -0
index b3dd0c3..29ccdae 100644
@@ -272,8 +272,25 @@ static int tegra_csi_s_stream(struct v4l2_subdev
 *subdev, int enable)
        struct tegra_vi_channel *chan = v4l2_get_subdev_hostdata(subdev);
        struct tegra_csi_channel *csi_chan = to_csi_chan(subdev);
        struct tegra_csi *csi = csi_chan->csi;
+     int ret;
+
+     if (enable && atomic_add_return(1, &csi->clk_refcnt) == 1) {
+             ret = pm_runtime_get_sync(csi->dev);
+             if (ret < 0) {
+                     dev_err(csi->dev,
+                             "failed to get runtime PM: %d\n", ret);
+                     pm_runtime_put_noidle(csi->dev);

drivers/staging/media/tegra-video/csi.c static int tegra_csi_s_stream(struct v4l2_subdev · line 292

Quoted 10 lines
drivers/staging/media/tegra-video/csi.c +8 -1
+                     atomic_dec(&csi->clk_refcnt);
+                     return ret;
+             }
+     }
+
+     ret = csi->ops->csi_streaming(csi_chan, chan->pg_mode, enable);
 
-     return csi->ops->csi_streaming(csi_chan, chan->pg_mode, enable);
+     if ((ret < 0 || !enable) && atomic_dec_and_test(&csi->clk_refcnt))
+             pm_runtime_put_sync(csi->dev);

Runtime PM maintains its own refcount, why these
clk_refcnt/power_on_refcnt are needed?

Quoted 7 lines
Quoted 3 lines

Streaming is per channel and we can't turn power/clocks off while other channels may still be running.

All channels use the same CSI device. You should remove the custom refcounting.

BTW, next time you'll really need to do refcounting, use the generic kref.

Before channel stream we enable power/clocks and after streaming we stop.

So without refcount, on stream stop of any of the channel RPM put turns power/clock but other channels will still be streaming.

#8 lore raw

Re: [RFC PATCH v1 3/5] media: tegra-video: Move PM runtime handle to streaming

28.04.2020 18:08, Sowjanya Komatineni пишет:

Quoted 22 lines · Dmitry Osipenko
Quoted 20 lines

External email: Use caution opening links or attachments

28.04.2020 17:51, Sowjanya Komatineni пишет:

Quoted 16 lines · Dmitry Osipenko
Quoted 15 lines

External email: Use caution opening links or attachments

28.04.2020 07:20, Sowjanya Komatineni пишет:

Quoted 11 lines
drivers/staging/media/tegra-video/csi.c +0 -0
index b3dd0c3..29ccdae 100644
@@ -272,8 +272,25 @@ static int tegra_csi_s_stream(struct v4l2_subdev
 *subdev, int enable)

        struct tegra_vi_channel *chan = v4l2_get_subdev_hostdata(subdev);
        struct tegra_csi_channel *csi_chan = to_csi_chan(subdev); struct tegra_csi *csi = csi_chan->csi;

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

+     int ret;
+
+     if (enable && atomic_add_return(1, &csi->clk_refcnt) == 1) { +             ret = pm_runtime_get_sync(csi->dev);
+             if (ret < 0) {
+                     dev_err(csi->dev,
+                             "failed to get runtime PM: %d\n", ret); +                     pm_runtime_put_noidle(csi->dev);

Why this pm_runtime_put_noidle() is needed? This should be wrong, please remove it.

Quoted 19 lines
Quoted 19 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

+                     atomic_dec(&csi->clk_refcnt);
+                     return ret;
+             }
+     }
+
+     ret = csi->ops->csi_streaming(csi_chan, chan->pg_mode, enable);

Quoted 9 lines
Quoted 6 lines
Quoted 4 lines

-     return csi->ops->csi_streaming(csi_chan, chan->pg_mode, enable); +     if ((ret < 0 || !enable) && atomic_dec_and_test(&csi->clk_refcnt))
+             pm_runtime_put_sync(csi->dev);

Runtime PM maintains its own refcount, why these
clk_refcnt/power_on_refcnt are needed?

Streaming is per channel and we can't turn power/clocks off while other channels may still be running.

All channels use the same CSI device. You should remove the custom refcounting.

Quoted 8 lines
Quoted 2 lines

BTW, next time you'll really need to do refcounting, use the generic kref.

Before channel stream we enable power/clocks and after streaming we stop.

So without refcount, on stream stop of any of the channel RPM put turns power/clock but other channels will still be streaming.

Runtime PM uses its own refcounting. Please consult the RPM code and documentation.

https://elixir.bootlin.com/linux/v5.7-rc3/source/include/linux/pm_runtime.h#L78
https://elixir.bootlin.com/linux/v5.7-rc3/source/drivers/base/power/runtime.c#L1079

author maintainer
#9 lore raw

Re: [RFC PATCH v1 3/5] media: tegra-video: Move PM runtime handle to streaming

Quoted 27 lines · Dmitry Osipenko

External email: Use caution opening links or attachments

28.04.2020 18:08, Sowjanya Komatineni пишет:

Quoted 23 lines · Dmitry Osipenko
Quoted 22 lines

External email: Use caution opening links or attachments

28.04.2020 17:51, Sowjanya Komatineni пишет:

Quoted 18 lines · Dmitry Osipenko
Quoted 17 lines

External email: Use caution opening links or attachments

28.04.2020 07:20, Sowjanya Komatineni пишет:

Quoted 13 lines
drivers/staging/media/tegra-video/csi.c +2 -0
index b3dd0c3..29ccdae 100644
@@ -272,8 +272,25 @@ static int tegra_csi_s_stream(struct v4l2_subdev
 *subdev, int enable)
         struct tegra_vi_channel *chan =
 v4l2_get_subdev_hostdata(subdev);
         struct tegra_csi_channel *csi_chan = to_csi_chan(subdev);
         struct tegra_csi *csi = csi_chan->csi;
+     int ret;
+
Quoted 8 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

drivers/staging/media/tegra-video/csi.c static int tegra_csi_s_stream(struct v4l2_subdev *subdev, int enable) · line 282

Quoted 6 lines
drivers/staging/media/tegra-video/csi.c +6 -0
+     if (enable && atomic_add_return(1, &csi->clk_refcnt) == 1) {
+             ret = pm_runtime_get_sync(csi->dev);
+             if (ret < 0) {
+                     dev_err(csi->dev,
+                             "failed to get runtime PM: %d\n", ret);
+                     pm_runtime_put_noidle(csi->dev);

Why this pm_runtime_put_noidle() is needed? This should be wrong, please remove it.

pm_runtime_get_sync() increments power.usage_count prior to rpm_resume

if rpm_resume fails it does not decrement usage_count.

So to balance count on failure, calling pm_runtime_put_noidle()

Quoted 24 lines
Quoted 24 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines

drivers/staging/media/tegra-video/csi.c static int tegra_csi_s_stream(struct v4l2_subdev *subdev, int enable) · line 291

Quoted 12 lines
drivers/staging/media/tegra-video/csi.c +8 -1
+                     atomic_dec(&csi->clk_refcnt);
+                     return ret;
+             }
+     }
+
+     ret = csi->ops->csi_streaming(csi_chan, chan->pg_mode, enable);
 
-     return csi->ops->csi_streaming(csi_chan, chan->pg_mode, enable);
+     if ((ret < 0 || !enable) &&
 atomic_dec_and_test(&csi->clk_refcnt))
+             pm_runtime_put_sync(csi->dev);

Runtime PM maintains its own refcount, why these
clk_refcnt/power_on_refcnt are needed?

Quoted 8 lines
Quoted 3 lines

Streaming is per channel and we can't turn power/clocks off while other channels may still be running.

All channels use the same CSI device. You should remove the custom refcounting.

BTW, next time you'll really need to do refcounting, use the generic kref.

Before channel stream we enable power/clocks and after streaming we stop.

Quoted 8 lines
Quoted 3 lines

So without refcount, on stream stop of any of the channel RPM put turns power/clock but other channels will still be streaming.

Runtime PM uses its own refcounting. Please consult the RPM code and documentation.

https://elixir.bootlin.com/linux/v5.7-rc3/source/include/linux/pm_runtime.h#L78
https://elixir.bootlin.com/linux/v5.7-rc3/source/drivers/base/power/runtime.c#L1079

Got it. Will remove refcount for RPM put/get

#10 lore raw

Re: [RFC PATCH v1 3/5] media: tegra-video: Move PM runtime handle to streaming

28.04.2020 18:22, Sowjanya Komatineni пишет:

Quoted 13 lines · Dmitry Osipenko
Quoted 11 lines

External email: Use caution opening links or attachments

28.04.2020 18:08, Sowjanya Komatineni пишет:

Quoted 7 lines · Dmitry Osipenko
Quoted 6 lines

External email: Use caution opening links or attachments

28.04.2020 17:51, Sowjanya Komatineni пишет:

Quoted 2 lines · Dmitry Osipenko
Quoted 1 line

External email: Use caution opening links or attachments

Is it possible to disable this corporate-email message?

Quoted 27 lines
Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
Quoted 18 lines

28.04.2020 07:20, Sowjanya Komatineni пишет:

Quoted 15 lines
drivers/staging/media/tegra-video/csi.c +0 -0
index b3dd0c3..29ccdae 100644
@@ -272,8 +272,25 @@ static int tegra_csi_s_stream(struct

v4l2_subdev
*subdev, int enable)
         struct tegra_vi_channel *chan = v4l2_get_subdev_hostdata(subdev);
         struct tegra_csi_channel *csi_chan = to_csi_chan(subdev); struct tegra_csi *csi = csi_chan->csi;
+     int ret;
+
+     if (enable && atomic_add_return(1, &csi->clk_refcnt) == 1) {

Quoted 8 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

+             ret = pm_runtime_get_sync(csi->dev);
+             if (ret < 0) {
+                     dev_err(csi->dev,
+                             "failed to get runtime PM: %d\n", ret);
+                     pm_runtime_put_noidle(csi->dev);

Why this pm_runtime_put_noidle() is needed? This should be wrong, please remove it.

Quoted 5 lines

pm_runtime_get_sync() increments power.usage_count prior to rpm_resume

if rpm_resume fails it does not decrement usage_count.

So to balance count on failure, calling pm_runtime_put_noidle()

Hmm.. maybe you're right. I'll need to take a more detailed look.

#11 lore raw

Re: [RFC PATCH v1 3/5] media: tegra-video: Move PM runtime handle to streaming

28.04.2020 19:04, Dmitry Osipenko пишет:
...

Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

+             ret = pm_runtime_get_sync(csi->dev);
+             if (ret < 0) {
+                     dev_err(csi->dev,
+                             "failed to get runtime PM: %d\n", ret);
+                     pm_runtime_put_noidle(csi->dev);

Why this pm_runtime_put_noidle() is needed? This should be wrong, please remove it.

Quoted 8 lines
Quoted 5 lines

pm_runtime_get_sync() increments power.usage_count prior to rpm_resume

if rpm_resume fails it does not decrement usage_count.

So to balance count on failure, calling pm_runtime_put_noidle()

Hmm.. maybe you're right. I'll need to take a more detailed look.

I checked the RPM's use-count after error condition and yours variant is correct. Perhaps we should start correcting all other Tegra drivers that do not handle the RPM error properly.

#12 lore raw

Re: [RFC PATCH v1 3/5] media: tegra-video: Move PM runtime handle to streaming

In reply to Sowjanya Komatineni

28.04.2020 07:20, Sowjanya Komatineni пишет:

drivers/staging/media/tegra-video/csi.c static int tegra_csi_s_stream(struct v4l2_subdev *subdev, int enable) · line 291

Quoted 5 lines
drivers/staging/media/tegra-video/csi.c +3 -1
+	ret = csi->ops->csi_streaming(csi_chan, chan->pg_mode, enable);
 
-	return csi->ops->csi_streaming(csi_chan, chan->pg_mode, enable);
+	if ((ret < 0 || !enable) && atomic_dec_and_test(&csi->clk_refcnt))
+		pm_runtime_put_sync(csi->dev);

There shouldn't be a need to sync the RPM here, hence just pm_runtime_put(csi->dev). Same for the VI.

author maintainer
#13 lore raw

RFC PATCH 4/5 media: tegra-video: Rearrange SoC specific to Tegra210 and cleanup files

In reply to Sowjanya Komatineni

Tegra supported video format enums are SoC specific. So, this patch moves video format enums, supported video format list, SoC data and register defines into Tegra210 file and removes common.h and tegra210.h

---
 drivers/staging/media/tegra-video/Makefile   |   4 +-
 drivers/staging/media/tegra-video/common.h   | 259 -----------------
 drivers/staging/media/tegra-video/csi.c      |  76 +----
 drivers/staging/media/tegra-video/csi.h      |   8 +-
 drivers/staging/media/tegra-video/tegra210.c | 402 ++++++++++++++++++++++++++-
 drivers/staging/media/tegra-video/tegra210.h | 190 -------------
 drivers/staging/media/tegra-video/vi.c       |  52 +---
 drivers/staging/media/tegra-video/vi.h       | 190 ++++++++++++-
 drivers/staging/media/tegra-video/video.c    |   2 +
 9 files changed, 586 insertions(+), 597 deletions(-)
 delete mode 100644 drivers/staging/media/tegra-video/common.h
 delete mode 100644 drivers/staging/media/tegra-video/tegra210.h
drivers/staging/media/tegra-video/Makefile +2 -2
index c0e24b5..dfa2ef8 100644
@@ -2,7 +2,7 @@
 tegra-video-objs := \
 		video.o \
 		vi.o \
-		csi.o \
-		tegra210.o
+		csi.o
 
+tegra-video-$(CONFIG_ARCH_TEGRA_210_SOC) += tegra210.o
 obj-$(CONFIG_VIDEO_TEGRA) += tegra-video.o
drivers/staging/media/tegra-video/common.h deleted +0 -259

259 lines not on this page · raw message

drivers/staging/media/tegra-video/csi.c +2 -74

96 lines not on this page · raw message

drivers/staging/media/tegra-video/csi.h +4 -4
index 4781b83..8fc4c12 100644
@@ -138,9 +138,9 @@ struct tegra_csi {
 	atomic_t clk_refcnt;
 };
 
-void tegra_csi_error_recover(struct v4l2_subdev *subdev);
+#if defined(CONFIG_ARCH_TEGRA_210_SOC)
+extern const struct tegra_csi_soc tegra210_csi_soc;
+#endif
 
-void tegra210_csi_error_recover(struct tegra_csi_channel *csi_chan);
-int tegra210_csi_streaming(struct tegra_csi_channel *csi_chan, u8 pg_mode,
-			   int enable);
+void tegra_csi_error_recover(struct v4l2_subdev *subdev);
 #endif
drivers/staging/media/tegra-video/tegra210.c +387 -15

451 lines not on this page · raw message

drivers/staging/media/tegra-video/tegra210.h deleted +0 -190

190 lines not on this page · raw message

drivers/staging/media/tegra-video/vi.c +2 -50

72 lines not on this page · raw message

drivers/staging/media/tegra-video/vi.h +187 -3

201 lines not on this page · raw message

drivers/staging/media/tegra-video/video.c +2 -0
index bd88aec..30816aa 100644
@@ -102,8 +102,10 @@ static int host1x_video_remove(struct host1x_device *dev)
 }
 
 static const struct of_device_id host1x_video_subdevs[] = {
+#if defined(CONFIG_ARCH_TEGRA_210_SOC)
 	{ .compatible = "nvidia,tegra210-csi", },
 	{ .compatible = "nvidia,tegra210-vi", },
+#endif
 	{ }
 };
 
Signature · 1 line
2.7.4
author maintainer
#14 lore raw

RFC PATCH 5/5 media: tegra-video: Remove module macros for vi and csi driver

In reply to Sowjanya Komatineni

tegra-video driver is a single module and module license macros are in tegra-video driver and are not required in vi and csi driver.

So, this patch removes them.

---
 drivers/staging/media/tegra-video/csi.c | 5 -----
 drivers/staging/media/tegra-video/vi.c  | 5 -----
 2 files changed, 10 deletions(-)
drivers/staging/media/tegra-video/csi.c +0 -5
index eda6a42..2536ff5 100644
@@ -7,7 +7,6 @@
 #include <linux/clk/tegra.h>
 #include <linux/device.h>
 #include <linux/host1x.h>
-#include <linux/module.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
 #include <linux/platform_device.h>
@@ -535,7 +534,3 @@ struct platform_driver tegra_csi_driver = {
 	.probe			= tegra_csi_probe,
 	.remove			= tegra_csi_remove,
 };
-
-MODULE_AUTHOR("Sowjanya Komatineni <[email protected]>");
-MODULE_DESCRIPTION("NVIDIA Tegra CSI Device Driver");
-MODULE_LICENSE("GPL v2");
drivers/staging/media/tegra-video/vi.c +0 -5
index bdf2560..397b6bc 100644
@@ -9,7 +9,6 @@
 #include <linux/host1x.h>
 #include <linux/lcm.h>
 #include <linux/list.h>
-#include <linux/module.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
 #include <linux/platform_device.h>
@@ -1081,7 +1080,3 @@ struct platform_driver tegra_vi_driver = {
 	.probe = tegra_vi_probe,
 	.remove = tegra_vi_remove,
 };
-
-MODULE_AUTHOR("Sowjanya Komatineni <[email protected]>");
-MODULE_DESCRIPTION("NVIDIA Tegra Video Input Device Driver");
-MODULE_LICENSE("GPL v2");
Signature · 1 line
2.7.4
#15 lore raw
In reply to Sowjanya Komatineni
Quoted 31 lines · Sowjanya Komatineni

This is a fllow-up to some last feedback received for Tegra VI driver RFC v10 patches.
https://patchwork.linuxtv.org/cover/63334/

Sowjanya Komatineni (5):
MAINTAINERS: Rename Tegra Video driver path
media: tegra: Rename driver path to tegra-video
media: tegra-video: Move PM runtime handle to streaming
media: tegra-video: Rearrange SoC specific to Tegra210 and cleanup
files
media: tegra-video: Remove module macros for vi and csi driver

 MAINTAINERS                                  |    2 +-
 drivers/staging/media/Kconfig                |    2 +-
 drivers/staging/media/Makefile               |    2 +-
 drivers/staging/media/tegra-video/Kconfig    |   12 +
 drivers/staging/media/tegra-video/Makefile   |    8 +
 drivers/staging/media/tegra-video/TODO       |   10 +
 drivers/staging/media/tegra-video/csi.c      |  536 ++++++++++++
 drivers/staging/media/tegra-video/csi.h      |  146 ++++
 drivers/staging/media/tegra-video/tegra210.c | 1080 ++++++++++++++++++++++++
 drivers/staging/media/tegra-video/vi.c       | 1082 +++++++++++++++++++++++++
 drivers/staging/media/tegra-video/vi.h       |  258 ++++++
 drivers/staging/media/tegra-video/video.c    |  155 ++++
 drivers/staging/media/tegra-video/video.h    |   29 +
 drivers/staging/media/tegra/Kconfig          |   12 -
 drivers/staging/media/tegra/Makefile         |    8 -
 drivers/staging/media/tegra/TODO             |   10 -
 drivers/staging/media/tegra/common.h         |  259 ------
 drivers/staging/media/tegra/csi.c            |  604 --------------
Quoted 8 lines
 drivers/staging/media/tegra/csi.h            |  144 ----
 drivers/staging/media/tegra/tegra210.c       |  708 ----------------
 drivers/staging/media/tegra/tegra210.h       |  190 -----
 drivers/staging/media/tegra/vi.c             | 1127 --------------------------
 drivers/staging/media/tegra/vi.h             |   72 --
 drivers/staging/media/tegra/video.c          |  153 ----
 drivers/staging/media/tegra/video.h          |   29 -
 25 files changed, 3319 insertions(+), 3319 deletions(-)

I thought that the follow-up series was just a rename of a directory and perhaps one or two smaller changes, but this is too much change. I prefer to have a v11 instead with all these changes incorporated.

Sorry about that,

Hans

Quoted 23 lines
 create mode 100644 drivers/staging/media/tegra-video/Kconfig
 create mode 100644 drivers/staging/media/tegra-video/Makefile
 create mode 100644 drivers/staging/media/tegra-video/TODO
 create mode 100644 drivers/staging/media/tegra-video/csi.c
 create mode 100644 drivers/staging/media/tegra-video/csi.h
 create mode 100644 drivers/staging/media/tegra-video/tegra210.c
 create mode 100644 drivers/staging/media/tegra-video/vi.c
 create mode 100644 drivers/staging/media/tegra-video/vi.h
 create mode 100644 drivers/staging/media/tegra-video/video.c
 create mode 100644 drivers/staging/media/tegra-video/video.h
 delete mode 100644 drivers/staging/media/tegra/Kconfig
 delete mode 100644 drivers/staging/media/tegra/Makefile
 delete mode 100644 drivers/staging/media/tegra/TODO
 delete mode 100644 drivers/staging/media/tegra/common.h
 delete mode 100644 drivers/staging/media/tegra/csi.c
 delete mode 100644 drivers/staging/media/tegra/csi.h
 delete mode 100644 drivers/staging/media/tegra/tegra210.c
 delete mode 100644 drivers/staging/media/tegra/tegra210.h
 delete mode 100644 drivers/staging/media/tegra/vi.c
 delete mode 100644 drivers/staging/media/tegra/vi.h
 delete mode 100644 drivers/staging/media/tegra/video.c
 delete mode 100644 drivers/staging/media/tegra/video.h
author maintainer
#16 lore raw
Quoted 43 lines · Hans Verkuil

External email: Use caution opening links or attachments

Quoted 31 lines · Sowjanya Komatineni

This is a fllow-up to some last feedback received for Tegra VI driver RFC v10 patches.
https://patchwork.linuxtv.org/cover/63334/

Sowjanya Komatineni (5):
MAINTAINERS: Rename Tegra Video driver path
media: tegra: Rename driver path to tegra-video
media: tegra-video: Move PM runtime handle to streaming
media: tegra-video: Rearrange SoC specific to Tegra210 and cleanup
files
media: tegra-video: Remove module macros for vi and csi driver

  MAINTAINERS                                  |    2 +-
  drivers/staging/media/Kconfig                |    2 +-
  drivers/staging/media/Makefile               |    2 +-
  drivers/staging/media/tegra-video/Kconfig    |   12 +
  drivers/staging/media/tegra-video/Makefile   |    8 +
  drivers/staging/media/tegra-video/TODO       |   10 +
  drivers/staging/media/tegra-video/csi.c      |  536 ++++++++++++
  drivers/staging/media/tegra-video/csi.h      |  146 ++++
  drivers/staging/media/tegra-video/tegra210.c | 1080 ++++++++++++++++++++++++
  drivers/staging/media/tegra-video/vi.c       | 1082 +++++++++++++++++++++++++
  drivers/staging/media/tegra-video/vi.h       |  258 ++++++
  drivers/staging/media/tegra-video/video.c    |  155 ++++
  drivers/staging/media/tegra-video/video.h    |   29 +
  drivers/staging/media/tegra/Kconfig          |   12 -
  drivers/staging/media/tegra/Makefile         |    8 -
  drivers/staging/media/tegra/TODO             |   10 -
  drivers/staging/media/tegra/common.h         |  259 ------
  drivers/staging/media/tegra/csi.c            |  604 --------------
Quoted 8 lines
  drivers/staging/media/tegra/csi.h            |  144 ----
  drivers/staging/media/tegra/tegra210.c       |  708 ----------------
  drivers/staging/media/tegra/tegra210.h       |  190 -----
  drivers/staging/media/tegra/vi.c             | 1127 --------------------------
  drivers/staging/media/tegra/vi.h             |   72 --
  drivers/staging/media/tegra/video.c          |  153 ----
  drivers/staging/media/tegra/video.h          |   29 -
  25 files changed, 3319 insertions(+), 3319 deletions(-)
Quoted 7 lines

I thought that the follow-up series was just a rename of a directory and perhaps one or two smaller changes, but this is too much change. I prefer to have a v11 instead with all these changes incorporated.

Sorry about that,

Hans

OK Will send v11. Thanks Hans

Quoted 24 lines
Quoted 24 lines

create mode 100644 drivers/staging/media/tegra-video/Kconfig create mode 100644 drivers/staging/media/tegra-video/Makefile create mode 100644 drivers/staging/media/tegra-video/TODO create mode 100644 drivers/staging/media/tegra-video/csi.c create mode 100644 drivers/staging/media/tegra-video/csi.h create mode 100644 drivers/staging/media/tegra-video/tegra210.c create mode 100644 drivers/staging/media/tegra-video/vi.c create mode 100644 drivers/staging/media/tegra-video/vi.h create mode 100644 drivers/staging/media/tegra-video/video.c create mode 100644 drivers/staging/media/tegra-video/video.h delete mode 100644 drivers/staging/media/tegra/Kconfig delete mode 100644 drivers/staging/media/tegra/Makefile delete mode 100644 drivers/staging/media/tegra/TODO delete mode 100644 drivers/staging/media/tegra/common.h delete mode 100644 drivers/staging/media/tegra/csi.c delete mode 100644 drivers/staging/media/tegra/csi.h delete mode 100644 drivers/staging/media/tegra/tegra210.c delete mode 100644 drivers/staging/media/tegra/tegra210.h delete mode 100644 drivers/staging/media/tegra/vi.c delete mode 100644 drivers/staging/media/tegra/vi.h delete mode 100644 drivers/staging/media/tegra/video.c delete mode 100644 drivers/staging/media/tegra/video.h