Return-path: Received: from smtp-4.sys.kth.se ([130.237.48.193]:37413 "EHLO smtp-4.sys.kth.se" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751653AbdCNTGj (ORCPT ); Tue, 14 Mar 2017 15:06:39 -0400 From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= To: Laurent Pinchart , Hans Verkuil Cc: linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org, tomoharu.fukawa.eb@renesas.com, Sakari Ailus , Geert Uytterhoeven , =?UTF-8?q?Niklas=20S=C3=B6derlund?= Subject: [PATCH v3 13/27] rcar-vin: do not cut height in two for top, bottom or alternate fields Date: Tue, 14 Mar 2017 20:02:54 +0100 Message-Id: <20170314190308.25790-14-niklas.soderlund+renesas@ragnatech.se> In-Reply-To: <20170314190308.25790-1-niklas.soderlund+renesas@ragnatech.se> References: <20170314190308.25790-1-niklas.soderlund+renesas@ragnatech.se> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-media-owner@vger.kernel.org List-ID: 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 --- 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.0