Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp810612rwi; Wed, 19 Oct 2022 03:18:49 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4ltSM1C5GmR1tm89Um7MJZnxnUFdtLPJx0mv2PnG56FOE69Xun6kAtIttPriDXzb0AQXCG X-Received: by 2002:a17:906:8a6a:b0:78d:f18e:5d6f with SMTP id hy10-20020a1709068a6a00b0078df18e5d6fmr6127493ejc.489.1666174728818; Wed, 19 Oct 2022 03:18:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666174728; cv=none; d=google.com; s=arc-20160816; b=RsPjf/+hpE8cn9hpnpzCFa+5RnQW7edQPRMZLEhu+opSgey+ZmmqL0Tc6YR/A5YjDH o9POuygkGNo2APk1goHt7Qb4jENGJwLO/seFbw92PFSxiy+xHeDrOvBjkkaru5inPyOh tnd/omkwswUnSBVB7HQLYXj5C7+wZkcGz1lrabdd3UiHO/w87CbV16a9aXGCr46ReFk2 dONyWyjaU+YbMoS49lgVRD8j/6x6tFIdZguVUX/3Y6gEGSYxkI0EDOh7Oi67x72PCl5w iMKFhjzVO1zl0U2hQmeOEmsuV46vMZyAwXC4/g3tzoymDx0LgnY1a7GUqnkiLhLUJbij eBQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=f6Zcl8MD7r0pWX89egirs7qT6+kZRndZUD6gSOEmGFI=; b=uZ8nqHJGD1yWKRk/slUvmPrcu5fvDbRFMXy+8zNrMEdAHeg0MKX/vHxatBwR7GJGKM zCJXWPD2VHTbVzxFBYJEshr3/daCW97yW0swUpRmZvP0/L/1r1bdm7hhbV0LxOPIwJW2 nVJk+EpeoU+rYRVbolIMuIC7qh23XBD3pwIpGU/myHAoRghIwc+CDtCFcdWjPKTzPxvu twZQn1n4KjR8cKTKaGd0puZ8Dw7zxXiXkZKiIwbmBgDFWFTW/rxrY5NugFBzr/B5wbYC KrvB4Awx+SWpAFF7bQwd/20/NYHBK4PQW5zVayO420aaV1LNCvf7CpkXze5JKFv30vhr yZwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jQXSI8i9; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id go10-20020a1709070d8a00b0078d4c9d77adsi17130588ejc.94.2022.10.19.03.18.22; Wed, 19 Oct 2022 03:18:48 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b=jQXSI8i9; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232880AbiJSJMC (ORCPT + 99 others); Wed, 19 Oct 2022 05:12:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232821AbiJSJJW (ORCPT ); Wed, 19 Oct 2022 05:09:22 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A908C72947; Wed, 19 Oct 2022 02:00:26 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 00CCC6183C; Wed, 19 Oct 2022 09:00:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 00A9BC433D6; Wed, 19 Oct 2022 09:00:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666170001; bh=Y9P6m1PbPCOui9z0QKgPu7ldnlI2rzx7ssJipzwrzGI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jQXSI8i9GY2F6EQxD1EsodiBqKX9jyT9hs8m7Jg5NN4m17QRp4LZV1FSdzSVrfYSB EMq8U1BSiaxIhafSog7RdrQ6WkzAzgIQJ4vpbQ36ov9g9yoBU/luRZbjRWdqMqJbPS lhEsye/wPspenfwRTlA27M5+VraPkiTi07YzMSo0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ming Qian , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 6.0 490/862] media: amphion: insert picture startcode after seek for vc1g format Date: Wed, 19 Oct 2022 10:29:37 +0200 Message-Id: <20221019083311.640131293@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,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 From: Ming Qian [ Upstream commit f7fd6c318c8a5d06bf3fe611f30763d62eaaf7f0 ] For format vc1, the amphion vpu requires driver to help insert some custom startcode before sequence and frame. the startcode is different for vc1l and vc1g format. But the sequence startcode is only needed at the beginning, and it's not expected after seek. driver need to treat the codec header and the first frame after seek as a normal frame, and insert picture startcode for it. In previous patch, I just fix it for vc1l format, and should fix the similar issue for vc1g too. Fixes: e670f5d672ef (media: amphion: only insert the first sequence startcode for vc1l format) Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/platform/amphion/vpu_malone.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/amphion/vpu_malone.c b/drivers/media/platform/amphion/vpu_malone.c index f4a488bf9880..51e0702f9ae1 100644 --- a/drivers/media/platform/amphion/vpu_malone.c +++ b/drivers/media/platform/amphion/vpu_malone.c @@ -1293,7 +1293,7 @@ static int vpu_malone_insert_scode_vc1_g_pic(struct malone_scode_t *scode) vbuf = to_vb2_v4l2_buffer(scode->vb); data = vb2_plane_vaddr(scode->vb, 0); - if (vbuf->sequence == 0 || vpu_vb_is_codecconfig(vbuf)) + if (scode->inst->total_input_count == 0 || vpu_vb_is_codecconfig(vbuf)) return 0; if (MALONE_VC1_CONTAIN_NAL(*data)) return 0; -- 2.35.1