From patchwork Tue Jan 3 07:15:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Qian X-Patchwork-Id: 38301 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp4483496wrt; Mon, 2 Jan 2023 23:21:31 -0800 (PST) X-Google-Smtp-Source: AMrXdXuwz+74H+uvmFKr/mLWGJptFjne1mxNAfCrFk+M9S0PuWyWhyVILZ+8auL9Q2b9hqZv7oRD X-Received: by 2002:a17:90a:bb18:b0:226:140a:ba8e with SMTP id u24-20020a17090abb1800b00226140aba8emr22291678pjr.39.1672730491521; Mon, 02 Jan 2023 23:21:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1672730491; cv=pass; d=google.com; s=arc-20160816; b=qBIVRR3sUWkj+uIkVSaFNKbrsyD3/0s2fjwvOiK1LSxTFFkS8qojEp2kfQuX4J4NCg QpB63AojO9UgqiShgcNw3lESHd/PfHLPLz46WypKZ4A9iGZ9KnBxHmGbH08BaXun+7ua uYAsnrPsLmNkrdiPJzG5YrNqR19c3ry4seOR1qwhcsWXZD/NsMQmJIRoB2Tx22RPAvLb xpMMnnjLqj80zPe2dPyGErmeK1C4hUimEdulYhJ0dIvdAEXqe2FzNMSUVRQx0Nd9qMbu 9BpiHq/7T8ashzOdDWIGM/6wcGn2MAm3eA/8eVi+FdNtlp2wiSXxqCLPwV11akmKggXC s4Sg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=y4ViUXDu71TtUvRlUjlCbWIl4cwHkkzal6U1X/tvOuY=; b=iY3zpxQk3O1LfuatD6VpbxFrx63YDJVSx/btYSD2P83PKwot/ZJyniGZphEJjCONpw 5WHY5Ez9tHiXWqj+aJAR4Q27js3QNV5eJYRebsm8b7E0HvE88Nj547EU/DwONsmFonnS YDdBEtadRzcnBoWNtfAVUKlRe25OWrkY+ZKjEhTEg1GsKmuNi6J6z20zuMuASWiMI610 iBF+6JCBV2BX0VPUqmowUVi4GpRKCIqNl05CklxfAkPimiZCSyg8gMjMsxEmAUqhXgpy WkIoDZNygJoALRP0f86xxBAInPIfGHgaINI8m0WdvrcgjLN3XSNJgqRehHNJ2LkMDOwC z5Kw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=obF3QVPI; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t11-20020a17090a4e4b00b00218b7ae4defsi33420084pjl.134.2023.01.02.23.21.17; Mon, 02 Jan 2023 23:21:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=obF3QVPI; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232845AbjACHQ2 (ORCPT + 99 others); Tue, 3 Jan 2023 02:16:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230124AbjACHQ0 (ORCPT ); Tue, 3 Jan 2023 02:16:26 -0500 Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on2082.outbound.protection.outlook.com [40.107.13.82]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F043565A0; Mon, 2 Jan 2023 23:16:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TmKK6XUvZU6fAF0TKhWzLtlxBvpx7b0wUeoBpHJAlwQykDX07ibWQcTeVZoh9HWOGIHHfh0OM3Rsd4Cqz+a+EDHZfxRufm7tqP0/JxJ2awJC+EWGzUFdT2kY0d6nger3AQMgFW5STbpRMLMo67CLJ6dtT50dX/aUAZNUp/7HCYbHUOlmt5x9oOU8cd8uIeFXDcHH1OtmDaMVuvTYcVHGAl6BkOrOGcjjkVKLU09EO8YeQiUwk2NN874yY8X1hek7z3yhu4RVpJ8xmRAvU2HuxjBuI1jma/R2RfFzhLKhgaAL4i1mScIO0WIJlBjnqDS7etP4FTjxRxXr/5Ncu/OLXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=y4ViUXDu71TtUvRlUjlCbWIl4cwHkkzal6U1X/tvOuY=; b=fd5ZwmOZp4W21CKjGL3qTw6hkueFZT+Lx9+/Q+o/lXBomMz735/CdN63HPQ0+JQ1c7yYW8jfcRMpx+m3SMBNvTJ4vbSqdMMgZ7ATlSahSGzQYOlTyUcpZZsjggpQlKfHoXlC4KU8mx0otRTx/fJ4Z2GVfbtVUGTSDVHCJbSP13gQent4bsCBcgDvfQMFwchyo+P8zS7tFi9x6C2Gf0g+dXOOaPi0yXNqaa5T6GlqhYCIELBfPpdrXMApwUM7i9oKWwN6D68zNdsYNMCdj/m/K1KXmnHszAWC9PCnhtMD3D6dymsM6PsMW/Zry/Ut1u0TPVEoX1AoOgXhtxIeG8/BzQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=y4ViUXDu71TtUvRlUjlCbWIl4cwHkkzal6U1X/tvOuY=; b=obF3QVPIM32PmXAUsDl3NnM7jV2Ll4yeUPcPTpUykDQTXkfp25htdRN3SHrcyp5B4XcmLa2u+awRFX4uSDDEHYtnd/Q4RBtydz3o3wY1kJbGYc+ZeQezb3qxo+LxcbeIbOr/nx07sKFepkbProW1J+j2btrcEyhd9+SQMYup0Y0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB6341.eurprd04.prod.outlook.com (2603:10a6:20b:d8::14) by PAXPR04MB9105.eurprd04.prod.outlook.com (2603:10a6:102:225::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.19; Tue, 3 Jan 2023 07:16:21 +0000 Received: from AM6PR04MB6341.eurprd04.prod.outlook.com ([fe80::3a82:42b3:f1ed:5c3d]) by AM6PR04MB6341.eurprd04.prod.outlook.com ([fe80::3a82:42b3:f1ed:5c3d%7]) with mapi id 15.20.5944.019; Tue, 3 Jan 2023 07:16:21 +0000 From: Ming Qian To: mchehab@kernel.org, hverkuil-cisco@xs4all.nl Cc: shawnguo@kernel.org, robh+dt@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, xiahong.bao@nxp.com, eagle.zhou@nxp.com, tao.jiang_2@nxp.com, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/3] media: venus: adapt headers only flag for V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE Date: Tue, 3 Jan 2023 15:15:49 +0800 Message-Id: <20230103071551.17775-1-ming.qian@nxp.com> X-Mailer: git-send-email 2.38.1 X-ClientProxiedBy: SG2PR01CA0190.apcprd01.prod.exchangelabs.com (2603:1096:4:189::11) To AM6PR04MB6341.eurprd04.prod.outlook.com (2603:10a6:20b:d8::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6PR04MB6341:EE_|PAXPR04MB9105:EE_ X-MS-Office365-Filtering-Correlation-Id: b39867a0-c389-4439-29fd-08daed5a6a2d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dOLw4xZwLmQIeYkc/uQfkfqVah7H6SCWJ3B5ss21Am5u05Pvi6kxYuUfbkC9Azd5whZQqja3DzqCqwl3A9A+wHWGzAGuuaViz4nv2YmZEkjjFPt0sKFzycJhRGsirbnsbe6Y+ycQ8FagnYcoFksd7sVypEj9KVo5XGxRfge+XaJMHaTJIWtHTDGydt1dM3WQUkgKnpsRDqFcw5WrP5uZ7s+5hAOTKdLvi7juXn9sqIWcLz2NTx8JrNKk545K86ehm9i+G4RJ5jRhYtkSVBcqswRwLuVL3pXzkHPvGsnoliQI1SAASBncWBAEmiJIfSfqX48j1UK3YKM1B5zEeqpf6ZlDvRN3PLhTPEHOtt0P3uBKmtaGDTjdTAJkXAsToKLhh2EKzR/5/aQBFK1JnoZ+yIBY9t5xxhFJBpGUidu2Q/GiC0JXMF2bUXHjKqZJPnA35vWyFw6WC3jwBT4lX6FStp2beCqbIyijeFUfpFDSaFS13expgC952CPOT388hHEFOdHK2nE6kMHFlR70blUCfLzSKUAYn075gNkDSDxlAG+HupamKto6XmkBr2Ibqb5mJh2ebhseQgMPUoqru1Nqk0g6ZHpiuTZVCzDRDeP5XMH6Me+HklDzBYL6/lNWQhuBxvLZUx9HzJlStkmQAa7rq16duQt2XB5HlEEBREnlPxPzChZPM7rAHamN9cxX70sngotVFk1pzM/B89uoCFr6OHdEWSWo5aCjXEMFujK/7z4= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR04MB6341.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(366004)(346002)(39860400002)(376002)(136003)(396003)(451199015)(6666004)(6512007)(26005)(52116002)(186003)(1076003)(2616005)(6486002)(6506007)(478600001)(66946007)(8676002)(4326008)(66556008)(8936002)(41300700001)(66476007)(4744005)(7416002)(5660300002)(2906002)(44832011)(38100700002)(38350700002)(86362001)(316002)(36756003)(22166006);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: WtfARzkzQpu/i/rsKUGEEKgTvgLq/kJ6RHHIx8minHrGbZMbWxtvpi/SR2gpwsiv6Ou8a4spvYlH87OeU9oQivB9hkhBwTantM+beH1xb0M0zo8svIN6RMfhOrUBCUCmO5QooeLq0uANPLNP4uym6D9I7+O7xU0rOxpX90973KazFm9xBU6CaHPkK0jQPikJ/JDLdk0R3STYKJ9/DqODn2mkbJAfLJxS/zLQhAkpZepr1e0t8XxmLf3stO/FTcjqvdnP7Mn3Bc6gxjqC6zt5DxVqAoRDEt1Cio5G6B5YkNi1TrdKUgAzVyIWy/DpKPYbLn20KFT+y59BgHDnw2BiyHCOpJtab1Ybb7uEmUNt6GbylEkOH+uh9kbGZGMgf3egrweoRIPPha9GAoLM5+eBiOlvhewUXWE9fbHQMMPdsGxf8ya8Z1HQYAAPuAuvhT7u4VZH7tgA8Kczwu9giXw75yp9jJIpoFWsB50aP7q9AJ8r+yLfMDaCTql0pt0r3MLGEb1vDpbcKoAg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OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b39867a0-c389-4439-29fd-08daed5a6a2d X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB6341.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jan 2023 07:16:21.3655 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: fy92XVw8WjS9fbz4CpZmDcJ8RzRJcFjyJIcuSLwFQJmxPHZ3e69XsizOq+FgxfvpkOOUmpuJuIsEcqS/RLGgzQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB9105 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753985047932653646?= X-GMAIL-MSGID: =?utf-8?q?1753985047932653646?= when V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE is chosen, the first buffer only contains stream header, so apply the flag V4L2_BUF_FLAG_HEADERS_ONLY Signed-off-by: Ming Qian --- drivers/media/platform/qcom/venus/venc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c index cdb12546c4fa..33c8e4329f6e 100644 --- a/drivers/media/platform/qcom/venus/venc.c +++ b/drivers/media/platform/qcom/venus/venc.c @@ -1260,6 +1260,9 @@ static void venc_buf_done(struct venus_inst *inst, unsigned int buf_type, vb->planes[0].data_offset = data_offset; vb->timestamp = timestamp_us * NSEC_PER_USEC; vbuf->sequence = inst->sequence_cap++; + if (inst->controls.enc.header_mode == V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE && + !vbuf->sequence) + vbuf->flags |= V4L2_BUF_FLAG_HEADERS_ONLY; } else { vbuf->sequence = inst->sequence_out++; }