All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Longerbeam <slongerbeam@gmail.com>
To: "Philipp Zabel" <p.zabel@pengutronix.de>,
	"Krzysztof Hałasa" <khalasa@piap.pl>,
	"Mauro Carvalho Chehab" <mchehab@kernel.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Hans Verkuil" <hverkuil@xs4all.nl>
Cc: linux-media@vger.kernel.org,
	Steve Longerbeam <steve_longerbeam@mentor.com>
Subject: [PATCH 4/6] media: imx-csi: Enable interlaced scan for field type alternate
Date: Fri, 25 May 2018 16:53:34 -0700	[thread overview]
Message-ID: <1527292416-26187-5-git-send-email-steve_longerbeam@mentor.com> (raw)
In-Reply-To: <1527292416-26187-1-git-send-email-steve_longerbeam@mentor.com>

Interlaced scan, a.k.a. interweave, should be enabled at the CSI IDMAC
output pad if the input field type is 'alternate' (in addition to field
types 'seq-tb' and 'seq-bt').

Which brings up whether V4L2_FIELD_HAS_BOTH() macro should be used
to determine enabling interlaced/interweave scan. That macro
includes the 'interlaced' field types, and in those cases the data
is already interweaved with top/bottom field lines. A heads-up for
now that this if statement may need to call V4L2_FIELD_IS_SEQUENTIAL()
instead, I have no sensor hardware that sends 'interlaced' data, so can't
test.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
---
 drivers/staging/media/imx/imx-media-csi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c
index 9bc555c..eef3483 100644
--- a/drivers/staging/media/imx/imx-media-csi.c
+++ b/drivers/staging/media/imx/imx-media-csi.c
@@ -477,7 +477,8 @@ static int csi_idmac_setup_channel(struct csi_priv *priv)
 	ipu_smfc_set_burstsize(priv->smfc, burst_size);
 
 	if (image.pix.field == V4L2_FIELD_NONE &&
-	    V4L2_FIELD_HAS_BOTH(infmt->field))
+	    (V4L2_FIELD_HAS_BOTH(infmt->field) ||
+	     infmt->field == V4L2_FIELD_ALTERNATE))
 		ipu_cpmem_interlaced_scan(priv->idmac_ch,
 					  image.pix.bytesperline);
 
-- 
2.7.4

  parent reply	other threads:[~2018-05-25 23:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-25 23:53 [PATCH 0/6] imx-media: Fixes for bt.656 interlaced capture Steve Longerbeam
2018-05-25 23:53 ` [PATCH 1/6] media: imx-csi: Fix interlaced bt.656 Steve Longerbeam
2018-05-25 23:53 ` [PATCH 2/6] gpu: ipu-csi: Check for field type alternate Steve Longerbeam
2018-05-25 23:53 ` [PATCH 3/6] media: videodev2.h: Add macro V4L2_FIELD_IS_SEQUENTIAL Steve Longerbeam
2018-05-26  0:10   ` Nicolas Dufresne
2018-05-26  0:19     ` Steve Longerbeam
2018-05-26  1:14       ` Nicolas Dufresne
2018-05-26  1:21         ` Nicolas Dufresne
2018-05-26 17:00           ` Steve Longerbeam
2018-05-25 23:53 ` Steve Longerbeam [this message]
2018-05-28  7:00   ` [PATCH 4/6] media: imx-csi: Enable interlaced scan for field type alternate Philipp Zabel
2018-05-28  7:59     ` Ian Arkver
2018-05-28 16:38       ` Steve Longerbeam
2018-05-30 17:48         ` Philipp Zabel
2018-05-25 23:53 ` [PATCH 5/6] media: imx-csi: Allow skipping odd chroma rows for YVU420 Steve Longerbeam
2018-05-25 23:53 ` [PATCH 6/6] media: staging/imx: interweave and odd-chroma-row skip are incompatible Steve Longerbeam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1527292416-26187-5-git-send-email-steve_longerbeam@mentor.com \
    --to=slongerbeam@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hverkuil@xs4all.nl \
    --cc=khalasa@piap.pl \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=steve_longerbeam@mentor.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.