The height should not be cut in half for the format for top, bottom or
alternate fields settings. This was a mistake and it was made
visible by the scaling refactoring.

Correct behavior is that the user should request a frame size that fits
the half height frame reflected in the field setting. If not the VIN
will do it's best to scale the top or bottom to the requested format and
cropping and scaling do not work as expected.

Signed-off-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se>
---
 drivers/media/platform/rcar-vin/rcar-v4l2.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/media/platform/rcar-vin/rcar-v4l2.c 
b/drivers/media/platform/rcar-vin/rcar-v4l2.c
index 80421421625e6f6f..28b62a514bbb93a9 100644
--- a/drivers/media/platform/rcar-vin/rcar-v4l2.c
+++ b/drivers/media/platform/rcar-vin/rcar-v4l2.c
@@ -142,8 +142,6 @@ static int rvin_reset_format(struct rvin_dev *vin)
        case V4L2_FIELD_TOP:
        case V4L2_FIELD_BOTTOM:
        case V4L2_FIELD_ALTERNATE:
-               vin->format.height /= 2;
-               break;
        case V4L2_FIELD_NONE:
        case V4L2_FIELD_INTERLACED_TB:
        case V4L2_FIELD_INTERLACED_BT:
@@ -245,8 +243,6 @@ static int __rvin_try_format(struct rvin_dev *vin,
        case V4L2_FIELD_TOP:
        case V4L2_FIELD_BOTTOM:
        case V4L2_FIELD_ALTERNATE:
-               pix->height /= 2;
-               break;
        case V4L2_FIELD_NONE:
        case V4L2_FIELD_INTERLACED_TB:
        case V4L2_FIELD_INTERLACED_BT:
-- 
2.12.2

Reply via email to