Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1265751rwl; Wed, 12 Apr 2023 10:14:31 -0700 (PDT) X-Google-Smtp-Source: AKy350ZFvEjfBWFLLksqsjZ6bh7AsjjUEASuU31TYJEJmM4hxwargECJcG2w8lVzdgPjQ6kdbIc4 X-Received: by 2002:aa7:8f30:0:b0:63a:33d5:9224 with SMTP id y16-20020aa78f30000000b0063a33d59224mr4042420pfr.18.1681319670630; Wed, 12 Apr 2023 10:14:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681319670; cv=none; d=google.com; s=arc-20160816; b=RacsxYHIpm4FXMmEiOjNcsak208WyxdjjIJz80ao2HLYgb0l90rk18IsQI3M+5dAgh 6GTbn24u/fRBaIwOKZ+VZb9NHd4OkVqYe4SAYH7xPOEJsTWmMUKtK6ZJq5wjexALyfch iDzt3FDBaGnqjV9+ZfnPFKHZoR2TB4q4do049XKw+UZ84ybYcymIht4NR62nFaiIYkPb M/invdEJCiELK8Ei4vBE8bkpQXmvxuqVwpmaB8mXnXQ+SkXRDsR+RP1NNWhriNFjh5Zz c2LoZpJKjRwDqwKF6cqllSCKpwaTVb3cDIx/6gOjk+TsHzMEZ0hVQfyySepZoSA3lcuF mhgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:cms-type:content-transfer-encoding :in-reply-to:from:cc:to:content-language:subject:user-agent :mime-version:date:message-id:dkim-signature:dkim-filter; bh=wZO6Dqp5dPJCNRWb5bvNZmABWpcQ9lZ9Lbxzm7Lw6Mg=; b=EJgbOTVEWHfpNh73Ou78bHcaD54RYgfNlrb5Y55QXv1qDm14epnTpa2egj2tNbfq+B WwVRSDoc5+QZRNKy7MH3wDL52+TkxubpvQPbkgIWUrAluT2uvf46B3RFv4but1L8XJRH wNdl7JmlMs+gciRK363BU1lofiW+XBu/AA4mFh4iHyZdz6kPkkLcuPnMsL9jwrsZRmqo MZE2/125nB1ODLJmVF0QVXzKE87S/YQLnRPXsgvFP1lJsZcoRSEiSPk5PAtn2yJeXNmK 150g3MCp4HXjYJXvBnR64lhju3Ff36IEs5Zhg5ldK+zMb1SMSo/Hvs9dkB/qRjAbVH8E YTOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="C30NP/i6"; 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=samsung.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o18-20020aa79792000000b006359be68abdsi10531543pfp.278.2023.04.12.10.14.17; Wed, 12 Apr 2023 10:14:30 -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=@samsung.com header.s=mail20170921 header.b="C30NP/i6"; 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=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230201AbjDLRMS (ORCPT + 99 others); Wed, 12 Apr 2023 13:12:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229732AbjDLRMR (ORCPT ); Wed, 12 Apr 2023 13:12:17 -0400 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CF34E76 for ; Wed, 12 Apr 2023 10:12:14 -0700 (PDT) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20230412165334euoutp022969579b75bcdfd547ae22124a9c034e~VPjCoPdBe2181021810euoutp02f for ; Wed, 12 Apr 2023 16:53:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20230412165334euoutp022969579b75bcdfd547ae22124a9c034e~VPjCoPdBe2181021810euoutp02f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1681318414; bh=wZO6Dqp5dPJCNRWb5bvNZmABWpcQ9lZ9Lbxzm7Lw6Mg=; h=Date:Subject:To:Cc:From:In-Reply-To:References:From; b=C30NP/i6B4LSCFFElxa+dbjEeCx+ulslG4eLWi9JLlJ512e9VrLvLxt/wC2IBKkvR 6FXdbDk1IZ9gNhnNqLWxO405Ah+PTSqAJ+QiTpWpqbnYOsUUpj42ZdtoY64am4CgTA sqleo+koxJGBXWjcNcCQvC/8cIWD7KjSqS886iMQ= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20230412165334eucas1p2774826fb6fff814016a2b94defb89e2a~VPjCQVe5w1111611116eucas1p2w; Wed, 12 Apr 2023 16:53:34 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 60.2D.09966.E02E6346; Wed, 12 Apr 2023 17:53:34 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20230412165333eucas1p2109ca0d5e10efd132a04bbbe1b5c3d94~VPjB7uv-B1360113601eucas1p2E; Wed, 12 Apr 2023 16:53:33 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20230412165333eusmtrp2aca1d1ee844ff8e9932214de51f21860~VPjB7DZCG0393003930eusmtrp2O; Wed, 12 Apr 2023 16:53:33 +0000 (GMT) X-AuditID: cbfec7f4-d39ff700000026ee-23-6436e20e22f4 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 3F.0E.22108.D02E6346; Wed, 12 Apr 2023 17:53:33 +0100 (BST) Received: from [106.210.134.192] (unknown [106.210.134.192]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20230412165332eusmtip20d390bf7742454c6e312aefbc76f6966~VPjBDW_Wq0161001610eusmtip2e; Wed, 12 Apr 2023 16:53:32 +0000 (GMT) Message-ID: <69a90fd7-e76a-4257-8263-57d333b60dad@samsung.com> Date: Wed, 12 Apr 2023 18:53:32 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH v9 1/6] media: verisilicon: Do not set context src/dst formats in reset functions Content-Language: en-US To: Benjamin Gaignard , ezequiel@vanguardiasur.com.ar, p.zabel@pengutronix.de, mchehab@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, hverkuil-cisco@xs4all.nl, nicolas.dufresne@collabora.co.uk, robert.mader@collabora.com Cc: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@collabora.com From: Marek Szyprowski In-Reply-To: Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrKKsWRmVeSWpSXmKPExsWy7djP87p8j8xSDCZeZLfYcmU2s8XGF59Z LB5e9be4OPMui8Xmcz2sFqum7mSx2PT4GqtF16+VzBaXd81hs+jZsJXV4tOD/8wWyzb9YbLo XDGRzeLuvRMsFt/eLGa0+Lt9E4vFiy3iDoIef59fZ/HYcXcJo8fOWXfZPTat6mTz2Lyk3mPj ux1MHv1/DTy6jlxn8/i8Sc7j1NfP7AFcU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inOSDTUYi4qTgQA dnKUTIoDAAA= X-CMS-MailID: 20230412165333eucas1p2109ca0d5e10efd132a04bbbe1b5c3d94 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20230412161415eucas1p1536b537c3f866e9820d3bea8bb9ea2d9 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20230412161415eucas1p1536b537c3f866e9820d3bea8bb9ea2d9 References: <20230220104849.398203-1-benjamin.gaignard@collabora.com> <20230220104849.398203-2-benjamin.gaignard@collabora.com> <5fda9b2f-a339-8a23-dc7b-f1bac2c385b6@samsung.com> X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_HI,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 Hi, On 12.04.2023 18:40, Benjamin Gaignard wrote: > > Le 12/04/2023 à 18:14, Marek Szyprowski a écrit : >> Hi, >> >> On 20.02.2023 11:48, Benjamin Gaignard wrote: >>> Setting context source and destination formats should only be done >>> in hantro_set_fmt_out() and hantro_set_fmt_cap() after check that >>> the targeted queue is not busy. >>> Remove these calls from hantro_reset_encoded_fmt() and >>> hantro_reset_raw_fmt() to clean the driver. >>> >>> Signed-off-by: Benjamin Gaignard >> This patch landed recently in linux-next as commit db6f68b51e5c ("media: >> verisilicon: Do not set context src/dst formats in reset functions"). > > Hi, > > I do not have this board up and running with Hantro encoder but > I think the attached patch may solve the issue. > Could you tell me if it works ? Yep, it fixes the issue. Tested-by: Marek Szyprowski It looks that the code could be a bit more cleaned up, as with the attached patch, there is such construction:         if (coded) {                 pix_mp->num_planes = 1;                 vpu_fmt = fmt;         } else if (ctx->is_encoder) {                 vpu_fmt = fmt;         } else {                 vpu_fmt = fmt;                 /*                  * Width/height on the CAPTURE end of a decoder are ignored and                  * replaced by the OUTPUT ones.                  */                 pix_mp->width = ctx->src_fmt.width;                 pix_mp->height = ctx->src_fmt.height;         } Common 'vpu_fmt = fmt' can be moved out of the above if-else block. Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland