From patchwork Wed Apr 19 07:07:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 13216458 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B00D7C6FD18 for ; Wed, 19 Apr 2023 07:08:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UhozDasYFZEc5B8kfrQl48X4wauXVEwv78no63CAdHk=; b=xPLs7FPn8huBWw CCsvX38e0gMgTO9tuOMOXI7W5rKhbhj6Y7i+NnJ5KGoIaUWHLhDZv0CKmFSNKHaFT3MT38d8cRgQl h4XgPbwDLsVfrNl53bnrgZzWFNU3eCq3F0sdWEf2KZ3rrf3wvj80TMg5ySeMp/QAR/NqK0uZimYn0 Z5yJJzwxrAkJ5K/tR9zJYnrSfWpzgZhP/sG1/tCeyq4k5HOSi1CmLB1BpS3ZrXuLWwAkZKwfz2C2c 963DqGu5xyP8ui0usWWIz6PZVy3XsW2BP4XJujFr5ag9w7NbNS1ikra3UX3mO2bTsbqCWl4oePzz+ A5hh8zb7X8ipeu9RZk7A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pp1uZ-004MEI-24; Wed, 19 Apr 2023 07:07:27 +0000 Received: from mx1.tq-group.com ([93.104.207.81]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pp1uS-004MAf-38 for linux-arm-kernel@lists.infradead.org; Wed, 19 Apr 2023 07:07:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1681888041; x=1713424041; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dmsT6bzUJE5AO5KsR1Jym8hUjW8jCA6HQen9rKtepnU=; b=qdhXXSagp2Tq/CFVXcM3PkhekwjC+hOJPKYTzXf9KmbKsRXs8mBTECRD rFslbGboJ/Vui3/6WQL/ayZ+qg112g/brKbFOmqdqMBgd4Lbuj+DMF0FU u7IRYmjG9C913l3jBVQBiRDbDwqsjluPdmvs9h1ae4DBso/0xq6LD8gPu Nb7+dBDhYhoFL+ydU0NzVd7LuBQlh2W3vfAkN6bmQdysIj5+De6Gi7e6E 5iJ+xA1ssV3mdi7bxB19UDZuFDRPLejd0JMnEOUpN3kzHzQSs/d/EVeG0 6plW7Kz0YR69xR682os9/o0ljPUHYcqHOGofOzR2PAMIJz/v/h1VqFUtz w==; X-IronPort-AV: E=Sophos;i="5.99,208,1677538800"; d="scan'208";a="30415569" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 19 Apr 2023 09:07:16 +0200 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Wed, 19 Apr 2023 09:07:16 +0200 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Wed, 19 Apr 2023 09:07:16 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1681888036; x=1713424036; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dmsT6bzUJE5AO5KsR1Jym8hUjW8jCA6HQen9rKtepnU=; b=mMldpGvRGt+jV4WJwoTY7w/e0KMsK6EIEoDWquK0xKFJNoACmFczBXOA QrFZME4GsaQQ38vadNk8WGIiCuhPfVRr/67/2FlK5EPNkn1ibUPV+hVs3 BX+w7d9gJWc/sROLuiIRKhlwJ5CJ6Rx9TjGvVY5GDDRs3uGo7wbGdP+F+ WFmx8+uP2kPH6yj0SBFvFclwtSghqdBbROPgWQhwieJAlwsPhaDNmUjDD QHkRN5uHhQPuIMyyZHwRLgOgbnAmpI3pnQ0/9nHLvJrpI1UWTcTOm3vt9 ewftTi6pyVcCAhEfxJjJeVA4YjxF8ZmFDCr5BiwrQU6zsWNGX8E1KQOVI g==; X-IronPort-AV: E=Sophos;i="5.99,208,1677538800"; d="scan'208";a="30415568" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 19 Apr 2023 09:07:16 +0200 Received: from steina-w.tq-net.de (unknown [10.123.53.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by vtuxmail01.tq-net.de (Postfix) with ESMTPSA id 32603280056; Wed, 19 Apr 2023 09:07:16 +0200 (CEST) From: Alexander Stein To: Rui Miguel Silva , Laurent Pinchart , Mauro Carvalho Chehab , Shawn Guo , Sascha Hauer , Fabio Estevam Cc: Alexander Stein , Pengutronix Kernel Team , NXP Linux Team , linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v4 2/4] media: imx: imx7-media-csi: Remove incorrect interlacing support Date: Wed, 19 Apr 2023 09:07:10 +0200 Message-Id: <20230419070712.1422335-3-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230419070712.1422335-1-alexander.stein@ew.tq-group.com> References: <20230419070712.1422335-1-alexander.stein@ew.tq-group.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230419_000721_313035_8E54E36D X-CRM114-Status: GOOD ( 13.61 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The driver doesn't currently support interlacing, but due to legacy leftovers, it accepts values for the pixel format "field" field other than V4L2_FIELD_NONE. Fix it by hardcoding V4L2_FIELD_NONE. Proper interlacing support can be implemented later if desired. Signed-off-by: Alexander Stein Reviewed-by: Laurent Pinchart --- Changes in v4: * Improve commit message * Added Laurent's r-b drivers/media/platform/nxp/imx7-media-csi.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/drivers/media/platform/nxp/imx7-media-csi.c b/drivers/media/platform/nxp/imx7-media-csi.c index b149374b07ee1..1315f5743b76f 100644 --- a/drivers/media/platform/nxp/imx7-media-csi.c +++ b/drivers/media/platform/nxp/imx7-media-csi.c @@ -1162,20 +1162,6 @@ __imx7_csi_video_try_fmt(struct v4l2_pix_format *pixfmt, cc = imx7_csi_find_pixel_format(pixfmt->pixelformat); } - /* Allow IDMAC interweave but enforce field order from source. */ - if (V4L2_FIELD_IS_INTERLACED(pixfmt->field)) { - switch (pixfmt->field) { - case V4L2_FIELD_SEQ_TB: - pixfmt->field = V4L2_FIELD_INTERLACED_TB; - break; - case V4L2_FIELD_SEQ_BT: - pixfmt->field = V4L2_FIELD_INTERLACED_BT; - break; - default: - break; - } - } - /* * Round up width for minimum burst size. * @@ -1187,6 +1173,7 @@ __imx7_csi_video_try_fmt(struct v4l2_pix_format *pixfmt, pixfmt->bytesperline = pixfmt->width * cc->bpp / 8; pixfmt->sizeimage = pixfmt->bytesperline * pixfmt->height; + pixfmt->field = V4L2_FIELD_NONE; return cc; }