Skip to contentSkip to conversation

ARM: davinci: misc. VPIF cleanups

PATCH New Kevin Hilman 3 participants 6 messages Jun 9, 2017 – Jun 15, 2017

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

v2 cover ARM: davinci: misc. VPIF cleanups

This are the platforms-specific cleanups needed to go along with the VPIF cleanups for raw capture support[1], which is now merged in the media tree.

[1] https://marc.info/?l=linux-arm-kernel&m=149643932427173

Changes since v1:
- fix additional warning in board-dm646x-evm.c
- add DT maintiners in CC for patch 2

Kevin Hilman (2):
ARM: davinci: pdata-quirks: fix const warnings
ARM: dts: da850-evm: drop VPIF endpoints

 arch/arm/boot/dts/da850-evm.dts          | 21 ---------------------
 arch/arm/mach-davinci/board-dm646x-evm.c |  4 ++--
 arch/arm/mach-davinci/pdata-quirks.c     |  4 ++--
 3 files changed, 4 insertions(+), 25 deletions(-)
Signature · 1 line
2.9.3
#1 lore raw

PATCH v2 1/2 ARM: davinci: pdata-quirks: fix const warnings

After VPIF was converted to enable getting subdevs from DT, the pdata is no longer const, so remove these to avoid compiler warnings.

---
 arch/arm/mach-davinci/board-dm646x-evm.c | 4 ++--
 arch/arm/mach-davinci/pdata-quirks.c     | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
arch/arm/mach-davinci/board-dm646x-evm.c +2 -2
index cb176826d1cb..055e947a6a39 100644
@@ -641,7 +641,7 @@ static struct vpif_subdev_info vpif_capture_sdev_info[] = {
 	},
 };
 
-static const struct vpif_input dm6467_ch0_inputs[] = {
+static struct vpif_input dm6467_ch0_inputs[] = {
 	{
 		.input = {
 			.index = 0,
@@ -656,7 +656,7 @@ static const struct vpif_input dm6467_ch0_inputs[] = {
 	},
 };
 
-static const struct vpif_input dm6467_ch1_inputs[] = {
+static struct vpif_input dm6467_ch1_inputs[] = {
        {
 		.input = {
 			.index = 0,
arch/arm/mach-davinci/pdata-quirks.c +2 -2
index 329f5402ad1d..4858b1cdf31b 100644
@@ -33,7 +33,7 @@ static struct tvp514x_platform_data tvp5146_pdata = {
 
 #define TVP514X_STD_ALL (V4L2_STD_NTSC | V4L2_STD_PAL)
 
-static const struct vpif_input da850_ch0_inputs[] = {
+static struct vpif_input da850_ch0_inputs[] = {
 	{
 		.input = {
 			.index = 0,
@@ -48,7 +48,7 @@ static const struct vpif_input da850_ch0_inputs[] = {
 	},
 };
 
-static const struct vpif_input da850_ch1_inputs[] = {
+static struct vpif_input da850_ch1_inputs[] = {
 	{
 		.input = {
 			.index = 0,
Signature · 1 line
2.9.3
#3 lore raw

PATCH v2 2/2 ARM: dts: da850-evm: drop VPIF endpoints

In reply to Kevin Hilman

Drop the unused endpoints. They should only be used when there is an actual remote-endpoint connected.

---
 arch/arm/boot/dts/da850-evm.dts | 21 ---------------------
 1 file changed, 21 deletions(-)
arch/arm/boot/dts/da850-evm.dts +0 -21
index a423e8ebfb37..67e72bc72e80 100644
@@ -301,25 +301,4 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&vpif_capture_pins>, <&vpif_display_pins>;
 	status = "okay";
-
-	/* VPIF capture port */
-	port at 0 {
-		vpif_input_ch0: endpoint at 0 {
-			reg = <0>;
-			bus-width = <8>;
-		};
-
-		vpif_input_ch1: endpoint at 1 {
-			reg = <1>;
-			bus-width = <8>;
-			data-shift = <8>;
-		};
-	};
-
-	/* VPIF display port */
-	port at 1 {
-		vpif_output_ch0: endpoint {
-			bus-width = <8>;
-		};
-	};
 };
Signature · 1 line
2.9.3
#4 lore raw

PATCH v2 2/2 ARM: dts: da850-evm: drop VPIF endpoints

Quoted 3 lines · Kevin Hilman

Drop the unused endpoints. They should only be used when there is an actual remote-endpoint connected.

Would it make sense to implement the status property here instead of removing the nodes completely? If other property values are the same for all users, then it seems like making all users have to dig up the docs and copy/paste is not as nice as just overriding the status property. But, if users have to change other values as well, then it makes sense to just delete these.

arch/arm/boot/dts/da850-evm.dts line 306

Quoted 2 lines
arch/arm/boot/dts/da850-evm.dts +0 -2
-	/* VPIF capture port */
-	port at 0 {

--> status = "disabled";

Quoted 4 lines
arch/arm/boot/dts/da850-evm.dts +0 -4
-		vpif_input_ch0: endpoint at 0 {
-			reg = <0>;
-			bus-width = <8>;
-		};

arch/arm/boot/dts/da850-evm.dts line 320

Quoted 10 lines
arch/arm/boot/dts/da850-evm.dts +0 -10
-
-		vpif_input_ch1: endpoint at 1 {
-			reg = <1>;
-			bus-width = <8>;
-			data-shift = <8>;
-		};
-	};
-
-	/* VPIF display port */
-	port at 1 {

--> status = "disabled";

Quoted 41 lines
arch/arm/boot/dts/da850-evm.dts +0 -4
-		vpif_output_ch0: endpoint {
-			bus-width = <8>;
-		};
-	};
---
  arch/arm/boot/dts/da850-evm.dts | 21 ---------------------
  1 file changed, 21 deletions(-)
arch/arm/boot/dts/da850-evm.dts +0 -21
index a423e8ebfb37..67e72bc72e80 100644
@@ -301,25 +301,4 @@
  	pinctrl-names = "default";
  	pinctrl-0 = <&vpif_capture_pins>, <&vpif_display_pins>;
  	status = "okay";
-
-	/* VPIF capture port */
-	port at 0 {
-		vpif_input_ch0: endpoint at 0 {
-			reg = <0>;
-			bus-width = <8>;
-		};
-
-		vpif_input_ch1: endpoint at 1 {
-			reg = <1>;
-			bus-width = <8>;
-			data-shift = <8>;
-		};
-	};
-
-	/* VPIF display port */
-	port at 1 {
-		vpif_output_ch0: endpoint {
-			bus-width = <8>;
-		};
-	};
  };
#5 lore raw

PATCH v2 2/2 ARM: dts: da850-evm: drop VPIF endpoints

Hi David,

Quoted 6 lines · David Lechner
Quoted 4 lines · Kevin Hilman

Drop the unused endpoints. They should only be used when there is an actual remote-endpoint connected.

Quoted 6 lines

Would it make sense to implement the status property here instead of removing the nodes completely? If other property values are the same for all users, then it seems like making all users have to dig up the docs and copy/paste is not as nice as just overriding the status property. But, if users have to change other values as well, then it makes sense to just delete these.

I considered that, but in reality, when adding an endpoint for VPIF input, you'll not only need to add the remote-endpoint, but the bus_width will depend on the remote-endpoint as well (e.g. tvp514x for composite only uses 8-bit bus, but for raw-camera capture, it can use 10 or 12.)

Therefore, I think it best to delete them entirely.

Thanks for the review,

Kevin

Applied
#2 lore raw

PATCH v2 1/2 ARM: davinci: pdata-quirks: fix const warnings

In reply to Kevin Hilman
Quoted 4 lines · Kevin Hilman

After VPIF was converted to enable getting subdevs from DT, the pdata is no longer const, so remove these to avoid compiler warnings.

Applied to v4.13/soc. I dropped the "pdata-quirks" prefix in subject line since the patch is fixing more that that.

Thanks,
Sekhar