diff mbox series

[v2,5/5] media: rcar-csi2: Remove hack to detect NTSC content

Message ID 20250122165353.1273739-6-niklas.soderlund+renesas@ragnatech.se (mailing list archive)
State New
Headers show
Series media: rcar-vin: Remove emulated SEQ_{TB,BT} | expand

Commit Message

Niklas Söderlund Jan. 22, 2025, 4:53 p.m. UTC
In an effort to emulate support for SEQ_{TB,BT} in the R-Car VIN driver
on data captured from a CVBS input a hack was added to detect NTSC vs
PAL. This is ugly and as support for emulated SEQ_{TB,BT} have been
removed from the VIN driver remove the ugly hack.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
---
 drivers/media/platform/renesas/rcar-csi2.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

Comments

Tomi Valkeinen Jan. 23, 2025, 7:34 a.m. UTC | #1
Hi,

On 22/01/2025 18:53, Niklas Söderlund wrote:
> In an effort to emulate support for SEQ_{TB,BT} in the R-Car VIN driver
> on data captured from a CVBS input a hack was added to detect NTSC vs
> PAL. This is ugly and as support for emulated SEQ_{TB,BT} have been
> removed from the VIN driver remove the ugly hack.
> 
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> ---
>   drivers/media/platform/renesas/rcar-csi2.c | 8 +-------
>   1 file changed, 1 insertion(+), 7 deletions(-)
> 

Reviewed-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>

  Tomi

> diff --git a/drivers/media/platform/renesas/rcar-csi2.c b/drivers/media/platform/renesas/rcar-csi2.c
> index 0a53dd47d7bf..7dfa2729209d 100644
> --- a/drivers/media/platform/renesas/rcar-csi2.c
> +++ b/drivers/media/platform/renesas/rcar-csi2.c
> @@ -1045,16 +1045,10 @@ static int rcsi2_start_receiver_gen3(struct rcar_csi2 *priv,
>   			vcdt2 |= vcdt_part << ((i % 2) * 16);
>   	}
>   
> -	if (fmt->field == V4L2_FIELD_ALTERNATE) {
> +	if (fmt->field == V4L2_FIELD_ALTERNATE)
>   		fld = FLD_DET_SEL(1) | FLD_FLD_EN4 | FLD_FLD_EN3 | FLD_FLD_EN2
>   			| FLD_FLD_EN;
>   
> -		if (fmt->height == 240)
> -			fld |= FLD_FLD_NUM(0);
> -		else
> -			fld |= FLD_FLD_NUM(1);
> -	}
> -
>   	/*
>   	 * Get the number of active data lanes inspecting the remote mbus
>   	 * configuration.
diff mbox series

Patch

diff --git a/drivers/media/platform/renesas/rcar-csi2.c b/drivers/media/platform/renesas/rcar-csi2.c
index 0a53dd47d7bf..7dfa2729209d 100644
--- a/drivers/media/platform/renesas/rcar-csi2.c
+++ b/drivers/media/platform/renesas/rcar-csi2.c
@@ -1045,16 +1045,10 @@  static int rcsi2_start_receiver_gen3(struct rcar_csi2 *priv,
 			vcdt2 |= vcdt_part << ((i % 2) * 16);
 	}
 
-	if (fmt->field == V4L2_FIELD_ALTERNATE) {
+	if (fmt->field == V4L2_FIELD_ALTERNATE)
 		fld = FLD_DET_SEL(1) | FLD_FLD_EN4 | FLD_FLD_EN3 | FLD_FLD_EN2
 			| FLD_FLD_EN;
 
-		if (fmt->height == 240)
-			fld |= FLD_FLD_NUM(0);
-		else
-			fld |= FLD_FLD_NUM(1);
-	}
-
 	/*
 	 * Get the number of active data lanes inspecting the remote mbus
 	 * configuration.