From patchwork Wed Oct 19 08:29:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 4766 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp214852wrs; Wed, 19 Oct 2022 02:13:57 -0700 (PDT) X-Google-Smtp-Source: AMsMyM45Jp5gaXGe3p00JDbxIkriUDsEmlzKtMHJg3UxPcPzdVRLZZ0OT7RnSoltQMb5fOG8kclj X-Received: by 2002:a17:906:6a0b:b0:78d:b81d:c2e4 with SMTP id qw11-20020a1709066a0b00b0078db81dc2e4mr5665136ejc.218.1666170837084; Wed, 19 Oct 2022 02:13:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666170837; cv=none; d=google.com; s=arc-20160816; b=cBiByaoFm50WQIDzl828ie5w/vbYYISxWvc4fsdFlmE/541MFsu0/ui+Y8kA8N2rUT FwZIAgqK4viuwzKNettu7RjO3xYOl1X8g614mmICl8mH4nYkQwjeR7LFn0w64w6Q7u5B abX5BhdBEGsEU1ho10wHk+bfrZDM1yXvrjrShINCefVbYL8AgjQQOYkWu4UX8jQP/DmR ln51g8sFbp1XWDhksOVCX6pSrnYU24281tTx2ecQmnOAHZEtPUY6cfaAx+zTRFgKmctC li/eKo+nd9SYA6vID8qbAulRgo8L2b9nsABWqEhaRscpW8bfS0vt0sOaBJhb+2XgBBan UO+A== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y11-20020a056402358b00b0045d22bc81a0si13806135edc.231.2022.10.19.02.13.32; Wed, 19 Oct 2022 02:13:57 -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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747106751937879945?= X-GMAIL-MSGID: =?utf-8?q?1747106751937879945?= 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;