* [PATCH] media: rcar-vin: Select correct interrupt mode for V4L2_FIELD_ALTERNATE
@ 2023-02-11 20:55 Niklas Söderlund
2023-03-30 14:49 ` Niklas Söderlund
0 siblings, 1 reply; 2+ messages in thread
From: Niklas Söderlund @ 2023-02-11 20:55 UTC (permalink / raw)
To: Hans Verkuil, linux-media; +Cc: linux-renesas-soc, Niklas Söderlund
When adding proper support for V4L2_FIELD_ALTERNATE it was missed that
this field format should trigger an interrupt for each field, not just
for the whole frame. Fix this by marking it as progressive in the
capture setup, which will then select the correct interrupt mode.
Tested on both Gen2 and Gen3 with the result of a doubling of the frame
rate for V4L2_FIELD_ALTERNATE. From a PAL video source the frame rate is
now 50, which is expected for alternate field capture.
Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
---
drivers/media/platform/renesas/rcar-vin/rcar-dma.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/media/platform/renesas/rcar-vin/rcar-dma.c b/drivers/media/platform/renesas/rcar-vin/rcar-dma.c
index 23598e22adc7..2a77353f10b5 100644
--- a/drivers/media/platform/renesas/rcar-vin/rcar-dma.c
+++ b/drivers/media/platform/renesas/rcar-vin/rcar-dma.c
@@ -728,12 +728,10 @@ static int rvin_setup(struct rvin_dev *vin)
case V4L2_FIELD_SEQ_TB:
case V4L2_FIELD_SEQ_BT:
case V4L2_FIELD_NONE:
+ case V4L2_FIELD_ALTERNATE:
vnmc = VNMC_IM_ODD_EVEN;
progressive = true;
break;
- case V4L2_FIELD_ALTERNATE:
- vnmc = VNMC_IM_ODD_EVEN;
- break;
default:
vnmc = VNMC_IM_ODD;
break;
--
2.39.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] media: rcar-vin: Select correct interrupt mode for V4L2_FIELD_ALTERNATE
2023-02-11 20:55 [PATCH] media: rcar-vin: Select correct interrupt mode for V4L2_FIELD_ALTERNATE Niklas Söderlund
@ 2023-03-30 14:49 ` Niklas Söderlund
0 siblings, 0 replies; 2+ messages in thread
From: Niklas Söderlund @ 2023-03-30 14:49 UTC (permalink / raw)
To: Hans Verkuil, linux-media; +Cc: linux-renesas-soc
Hi Hans,
Gentle ping on this patch.
On 2023-02-11 21:55:34 +0100, Niklas Söderlund wrote:
> When adding proper support for V4L2_FIELD_ALTERNATE it was missed that
> this field format should trigger an interrupt for each field, not just
> for the whole frame. Fix this by marking it as progressive in the
> capture setup, which will then select the correct interrupt mode.
>
> Tested on both Gen2 and Gen3 with the result of a doubling of the frame
> rate for V4L2_FIELD_ALTERNATE. From a PAL video source the frame rate is
> now 50, which is expected for alternate field capture.
>
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> ---
> drivers/media/platform/renesas/rcar-vin/rcar-dma.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/media/platform/renesas/rcar-vin/rcar-dma.c b/drivers/media/platform/renesas/rcar-vin/rcar-dma.c
> index 23598e22adc7..2a77353f10b5 100644
> --- a/drivers/media/platform/renesas/rcar-vin/rcar-dma.c
> +++ b/drivers/media/platform/renesas/rcar-vin/rcar-dma.c
> @@ -728,12 +728,10 @@ static int rvin_setup(struct rvin_dev *vin)
> case V4L2_FIELD_SEQ_TB:
> case V4L2_FIELD_SEQ_BT:
> case V4L2_FIELD_NONE:
> + case V4L2_FIELD_ALTERNATE:
> vnmc = VNMC_IM_ODD_EVEN;
> progressive = true;
> break;
> - case V4L2_FIELD_ALTERNATE:
> - vnmc = VNMC_IM_ODD_EVEN;
> - break;
> default:
> vnmc = VNMC_IM_ODD;
> break;
> --
> 2.39.1
>
--
Kind Regards,
Niklas Söderlund
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-30 14:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-11 20:55 [PATCH] media: rcar-vin: Select correct interrupt mode for V4L2_FIELD_ALTERNATE Niklas Söderlund
2023-03-30 14:49 ` Niklas Söderlund
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox