From patchwork Mon Oct 7 15:10:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benoit Parrot X-Patchwork-Id: 11177685 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 10B8115AB for ; Mon, 7 Oct 2019 15:07:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E400C21655 for ; Mon, 7 Oct 2019 15:07:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="CaHFc8SZ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728896AbfJGPHt (ORCPT ); Mon, 7 Oct 2019 11:07:49 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:35876 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728884AbfJGPHs (ORCPT ); Mon, 7 Oct 2019 11:07:48 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x97F7lPk047033; Mon, 7 Oct 2019 10:07:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1570460867; bh=iWcuSYGGxJQmWw1VXtt+kP/BQGmtHkntulM+0CTanrI=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=CaHFc8SZXjowM+I1Bs9d02TfZMeZzNdUdRz3R42P2CKHZCkjDvn6X5IM/DW/46U69 xZlzK2+Ce0J0OJE1hei4//oR+2r+7oZD51WkpuUB5lUxOQ6129lHQSCdptzPeVLsTG +Re+7Vm7jVfwDryQMukREtZ7Xgm9Wl+p/4qdtsjE= Received: from DFLE110.ent.ti.com (dfle110.ent.ti.com [10.64.6.31]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id x97F7lC0060706; Mon, 7 Oct 2019 10:07:47 -0500 Received: from DFLE102.ent.ti.com (10.64.6.23) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Mon, 7 Oct 2019 10:07:47 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE102.ent.ti.com (10.64.6.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Mon, 7 Oct 2019 10:07:47 -0500 Received: from uda0869644b.dal.design.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id x97F7aFI055156; Mon, 7 Oct 2019 10:07:47 -0500 From: Benoit Parrot To: Hans Verkuil CC: , , , Benoit Parrot Subject: [Patch v3 12/21] media: ti-vpe: vpe: fix a v4l2-compliance failure about frame sequence number Date: Mon, 7 Oct 2019 10:10:00 -0500 Message-ID: <20191007151009.22095-13-bparrot@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191007151009.22095-1-bparrot@ti.com> References: <20191007151009.22095-1-bparrot@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org v4l2-compliance fails with this message: fail: v4l2-test-buffers.cpp(294): \ (int)g_sequence() < seq.last_seq + 1 fail: v4l2-test-buffers.cpp(740): \ buf.check(m2m_q, last_m2m_seq) fail: v4l2-test-buffers.cpp(974): \ captureBufs(node, q, m2m_q, frame_count, true) test MMAP: FAIL The driver is failing to update the source frame sequence number in the vb2 buffer object. Only the destination frame sequence was being updated. This is only a reporting issue if the user space app actually cares about the frame sequence number. But it is fixed nonetheless. Signed-off-by: Benoit Parrot Reviewed-by: Tomi Valkeinen --- drivers/media/platform/ti-vpe/vpe.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/ti-vpe/vpe.c b/drivers/media/platform/ti-vpe/vpe.c index 0a7cf9c820c6..8ab1c3241b74 100644 --- a/drivers/media/platform/ti-vpe/vpe.c +++ b/drivers/media/platform/ti-vpe/vpe.c @@ -1440,6 +1440,7 @@ static irqreturn_t vpe_irq(int irq_vpe, void *data) d_vb->timecode = s_vb->timecode; d_vb->sequence = ctx->sequence; + s_vb->sequence = ctx->sequence; d_q_data = &ctx->q_data[Q_DATA_DST]; if (d_q_data->flags & Q_IS_INTERLACED) {