2018-08-01 19:16:13

by Steve Longerbeam

[permalink] [raw]
Subject: [PATCH v3 02/14] gpu: ipu-csi: Check for field type alternate

When the CSI is receiving from a bt.656 bus, include a check for
field type 'alternate' when determining whether to set CSI clock
mode to CCIR656_INTERLACED or CCIR656_PROGRESSIVE.

Signed-off-by: Steve Longerbeam <[email protected]>
---
drivers/gpu/ipu-v3/ipu-csi.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/ipu-v3/ipu-csi.c b/drivers/gpu/ipu-v3/ipu-csi.c
index caa05b0..5450a2d 100644
--- a/drivers/gpu/ipu-v3/ipu-csi.c
+++ b/drivers/gpu/ipu-v3/ipu-csi.c
@@ -339,7 +339,8 @@ static void fill_csi_bus_cfg(struct ipu_csi_bus_config *csicfg,
break;
case V4L2_MBUS_BT656:
csicfg->ext_vsync = 0;
- if (V4L2_FIELD_HAS_BOTH(mbus_fmt->field))
+ if (V4L2_FIELD_HAS_BOTH(mbus_fmt->field) ||
+ mbus_fmt->field == V4L2_FIELD_ALTERNATE)
csicfg->clk_mode = IPU_CSI_CLK_MODE_CCIR656_INTERLACED;
else
csicfg->clk_mode = IPU_CSI_CLK_MODE_CCIR656_PROGRESSIVE;
--
2.7.4



2018-08-02 09:44:37

by Philipp Zabel

[permalink] [raw]
Subject: Re: [PATCH v3 02/14] gpu: ipu-csi: Check for field type alternate

Hi Steve,

On Wed, 2018-08-01 at 12:12 -0700, Steve Longerbeam wrote:
> When the CSI is receiving from a bt.656 bus, include a check for
> field type 'alternate' when determining whether to set CSI clock
> mode to CCIR656_INTERLACED or CCIR656_PROGRESSIVE.
>
> Signed-off-by: Steve Longerbeam <[email protected]>
> ---
> drivers/gpu/ipu-v3/ipu-csi.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/ipu-v3/ipu-csi.c b/drivers/gpu/ipu-v3/ipu-csi.c
> index caa05b0..5450a2d 100644
> --- a/drivers/gpu/ipu-v3/ipu-csi.c
> +++ b/drivers/gpu/ipu-v3/ipu-csi.c
> @@ -339,7 +339,8 @@ static void fill_csi_bus_cfg(struct ipu_csi_bus_config *csicfg,
> break;
> case V4L2_MBUS_BT656:
> csicfg->ext_vsync = 0;
> - if (V4L2_FIELD_HAS_BOTH(mbus_fmt->field))
> + if (V4L2_FIELD_HAS_BOTH(mbus_fmt->field) ||
> + mbus_fmt->field == V4L2_FIELD_ALTERNATE)
> csicfg->clk_mode = IPU_CSI_CLK_MODE_CCIR656_INTERLACED;
> else
> csicfg->clk_mode = IPU_CSI_CLK_MODE_CCIR656_PROGRESSIVE;

this patch is already merged in v4.18-rc7.

regards
Philipp

2018-08-04 19:11:30

by Steve Longerbeam

[permalink] [raw]
Subject: Re: [PATCH v3 02/14] gpu: ipu-csi: Check for field type alternate

Hi Philipp,


On 08/02/2018 02:42 AM, Philipp Zabel wrote:
> Hi Steve,
>
> On Wed, 2018-08-01 at 12:12 -0700, Steve Longerbeam wrote:
>> When the CSI is receiving from a bt.656 bus, include a check for
>> field type 'alternate' when determining whether to set CSI clock
>> mode to CCIR656_INTERLACED or CCIR656_PROGRESSIVE.
>>
>> Signed-off-by: Steve Longerbeam <[email protected]>
>> ---
>> drivers/gpu/ipu-v3/ipu-csi.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/ipu-v3/ipu-csi.c b/drivers/gpu/ipu-v3/ipu-csi.c
>> index caa05b0..5450a2d 100644
>> --- a/drivers/gpu/ipu-v3/ipu-csi.c
>> +++ b/drivers/gpu/ipu-v3/ipu-csi.c
>> @@ -339,7 +339,8 @@ static void fill_csi_bus_cfg(struct ipu_csi_bus_config *csicfg,
>> break;
>> case V4L2_MBUS_BT656:
>> csicfg->ext_vsync = 0;
>> - if (V4L2_FIELD_HAS_BOTH(mbus_fmt->field))
>> + if (V4L2_FIELD_HAS_BOTH(mbus_fmt->field) ||
>> + mbus_fmt->field == V4L2_FIELD_ALTERNATE)
>> csicfg->clk_mode = IPU_CSI_CLK_MODE_CCIR656_INTERLACED;
>> else
>> csicfg->clk_mode = IPU_CSI_CLK_MODE_CCIR656_PROGRESSIVE;
> this patch is already merged in v4.18-rc7.

Ah, I just noticed that after a fetch from kernel.org, thanks.

Steve