From patchwork Thu Mar 15 19:13:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Seiderer X-Patchwork-Id: 10285651 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B8A7960386 for ; Thu, 15 Mar 2018 19:14:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD02828C1E for ; Thu, 15 Mar 2018 19:14:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 97C7F28C1F; Thu, 15 Mar 2018 19:14:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0B53928C1E for ; Thu, 15 Mar 2018 19:14:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752831AbeCOTNm (ORCPT ); Thu, 15 Mar 2018 15:13:42 -0400 Received: from mout.gmx.net ([212.227.15.19]:34675 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752898AbeCOTNi (ORCPT ); Thu, 15 Mar 2018 15:13:38 -0400 Received: from localhost.localdomain ([88.66.251.181]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LomJ1-1ePAV12szD-00gr2x; Thu, 15 Mar 2018 20:13:28 +0100 From: Peter Seiderer To: linux-media@vger.kernel.org Cc: Steve Longerbeam , Philipp Zabel , Mauro Carvalho Chehab , Greg Kroah-Hartman , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Peter Seiderer Subject: [PATCH v4 1/2] media: staging/imx: fill vb2_v4l2_buffer field entry Date: Thu, 15 Mar 2018 20:13:22 +0100 Message-Id: <20180315191323.6028-1-ps.report@gmx.net> X-Mailer: git-send-email 2.16.2 X-Provags-ID: V03:K0:WL6VJTwE2VWy5BcRYDOzt/PBVrNYwO2d/0fb3crjGUjOSMRrl/E tMJP++4fVyV2XU+Cq4rAf/8+lscc8CXOKQR64wJkajRjVam1MxMDeg8Qa9cwQdKsuH/pbFT w2m4PUzLnPB1qVJ91VXAyEb1dua69ChpCxCqSzztFsJRITV0VFQoQ8e7GvijGzCrSjA0WJk eY7M2qn083ULQdxI9L+9A== X-UI-Out-Filterresults: notjunk:1; V01:K0:scUx90wAK/w=:KpTl+FmlL5FLNaPV3dSiaU ahB3l8Yl/OFHGrzD0CkJiK4JsVzwNwXMn1rCg9Sn1MfKk8I/k6nvYwzVEn/j1ziQv/stbNRFD CY+8WDdonzqPIage4NCMZI2Fd19QZHVyP1ohzinFO6mwwx3hhBO+JL2yawhbnPG6r2EWzFaeX 1WJXixJ/0rv0STSKJ90NvZa+BJmZCOG47AV060Lfv/aUWj3ouNRzW7U2pmVpDxuRtrsyp6aq+ z9UokfaPq1WRfxW7gelTZ10igA1K87xstYafFs9q7LJw3bRFljQp6jDtbLsViZUuclwG0U9dO JYfyrZfmmFm+fRaUXj60b3JTajhekIUY9vvtvVLAtVjQXxst6HxBBlcFofhgRiXIoE8YCs2TR 5U9t/fiSFgo+4L5U139lSWmMNAMPGfmXTwH4UqvZfFdj5i6uHqtExLgifVy/1/zSw22oKLOQu Iy1U7hZvz0HkW42rNf1ktUVO+DIQRuDSzbM+/a7gIg4aNAomutEmv76bMb6Sxib2787OYM9HS /SvmPuPqFCLFnV16Ga7i9zI54c5TOp99y1SUjNOKHC//4BmEeAMNG32qlSoXjj2vm5Fqd/yp9 S6gGWK3MwKRabqDzEWUL6JtDvva2DyELcypr228bQBdZYqQItgYPxPukj6oH9EkN6GcdXTVmM /AZ1d1QRHaQ4/4TJcDrKdNIs9ovIWvnONPjcNn8ulhWuTHB7HBIZIyNabHxqHrcqMNJopSCs1 2GaH8ER8v+cSNU/hQvbRKpJR7pBFyhitAvls6XxuH0yKTPrGfOjXfoCyYq5ootHhi847TBhrS NKfYlqJ7gyFmokIBuudIXwNtWILwQ== Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP - fixes gstreamer v4l2src warning: 0:00:00.716640334 349 0x164f720 WARN v4l2bufferpool gstv4l2bufferpool.c:1195:gst_v4l2_buffer_pool_dqbuf: Driver should never set v4l2_buffer.field to ANY - fixes v4l2-compliance test failure: Streaming ioctls: test read/write: OK (Not Supported) Video Capture: Buffer: 0 Sequence: 0 Field: Any Timestamp: 58.383658s fail: v4l2-test-buffers.cpp(297): g_field() == V4L2_FIELD_ANY Signed-off-by: Peter Seiderer Reviewed-by: Steve Longerbeam --- Changes in v4: - new patch (put first because patch is needed to advance with the v4l2-compliance test), thanks to Philipp Zabel for suggested solution for the right field value source --- drivers/staging/media/imx/imx-ic-prpencvf.c | 1 + drivers/staging/media/imx/imx-media-csi.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/staging/media/imx/imx-ic-prpencvf.c b/drivers/staging/media/imx/imx-ic-prpencvf.c index ae453fd422f0..ffeb017c73b2 100644 --- a/drivers/staging/media/imx/imx-ic-prpencvf.c +++ b/drivers/staging/media/imx/imx-ic-prpencvf.c @@ -210,6 +210,7 @@ static void prp_vb2_buf_done(struct prp_priv *priv, struct ipuv3_channel *ch) done = priv->active_vb2_buf[priv->ipu_buf_num]; if (done) { + done->vbuf.field = vdev->fmt.fmt.pix.field; vb = &done->vbuf.vb2_buf; vb->timestamp = ktime_get_ns(); vb2_buffer_done(vb, priv->nfb4eof ? diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c index 5a195f80a24d..5f69117b5811 100644 --- a/drivers/staging/media/imx/imx-media-csi.c +++ b/drivers/staging/media/imx/imx-media-csi.c @@ -236,6 +236,7 @@ static void csi_vb2_buf_done(struct csi_priv *priv) done = priv->active_vb2_buf[priv->ipu_buf_num]; if (done) { + done->vbuf.field = vdev->fmt.fmt.pix.field; vb = &done->vbuf.vb2_buf; vb->timestamp = ktime_get_ns(); vb2_buffer_done(vb, priv->nfb4eof ?