]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
media: rcar-vin: Select correct interrupt mode for V4L2_FIELD_ALTERNATE
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Sat, 11 Feb 2023 20:55:34 +0000 (21:55 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Mon, 8 May 2023 11:11:25 +0000 (12:11 +0100)
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>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/platform/renesas/rcar-vin/rcar-dma.c

index 23598e22adc7295f05313de6a229cac831bed0cf..2a77353f10b59262e9f7ed3640dea07104fe7584 100644 (file)
@@ -728,11 +728,9 @@ static int rvin_setup(struct rvin_dev *vin)
        case V4L2_FIELD_SEQ_TB:
        case V4L2_FIELD_SEQ_BT:
        case V4L2_FIELD_NONE:
-               vnmc = VNMC_IM_ODD_EVEN;
-               progressive = true;
-               break;
        case V4L2_FIELD_ALTERNATE:
                vnmc = VNMC_IM_ODD_EVEN;
+               progressive = true;
                break;
        default:
                vnmc = VNMC_IM_ODD;