Message ID | 20231206063045.97234-10-aakarsh.jain@samsung.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp3918748vqy; Tue, 5 Dec 2023 22:38:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IEDkXcQ1sZp0qvXscFcxPt4VoMgc5YUlFmdQH9uphw0FynvbMYkbPDcz1sXFqI7hn4J3HrB X-Received: by 2002:a05:6a20:3d8c:b0:18c:3ea9:b84d with SMTP id s12-20020a056a203d8c00b0018c3ea9b84dmr569980pzi.9.1701844700225; Tue, 05 Dec 2023 22:38:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701844700; cv=none; d=google.com; s=arc-20160816; b=Ac5hVEJvIsJ+iRH9yQSEyzGUtl8iYI9pomq5UWkPusMD7fYDXkE/JZvXPd99ws5pm9 94GZO6vX3qaOXyvt//LjIfWFp4kX7Qeaty2S7AtFMxN5e/XqZPCNfODo9vrnz2D7s7oS F7DiJeUXxdyyFQdsyTRHnabKrjpg85K5AnujLGUyRJIAUy6UPYfD8vKDTbGVi+dZeolF tl/3GSmWMPoSk2tdoOBRbLJKRo3N3PZNZMtUcLcglWNMOYmb7I+9PFADL+Gfotb5xJBC Edp8V/e8ojU/D+Axg+4tO6ZDZpDIzHT33XMsanqHi+msBuR4rGPoZQK/4nJ/nkbstRNB QPTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:dlp-filter:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=sUjpf4J6EPjRz39tJ2nYMQaPVuJGRvfjwr76yMwFWGI=; fh=jRZx2CGeeFZcE3BVWyyQfQMU6DACuExpX/LJhkP3QWU=; b=Mbr58ODiidDe01jEJpIdcT7EwXKK2guShwXd5o3+mXf/Y6tP6p8X+EQ/apxSuO+C2t 4hzDQhya8qROnfOw+kkI3El2EZ/KWpsmR5E5P+XkpnbfU5hfsWK6hbzIw8oFheleT7B6 PXmV3TQ3emj3AFRAy/0mlfin08cNNlu1gMPCDqBW/qcj/7eNfvDMfz8n4FG4Y63C8HoT EtMa1oNftTTtrzJHn+MAYLXsi7YWfztzPWJmQHlp3srvvWZTDcw3O1PUqv/Lmq9lxasZ AJcwd5eoPdkCsC6gCH1oJV/IHQa35mH3SyHJ4dpgd7NsJWJiAuOdm/8KSSaG2P0rpSMh zICg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="VAMGBs/F"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id z22-20020a656656000000b005c604ef1844si10822756pgv.3.2023.12.05.22.38.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 22:38:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="VAMGBs/F"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id EE8258069F07; Tue, 5 Dec 2023 22:38:18 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376832AbjLFGiF (ORCPT <rfc822;chrisfriedt@gmail.com> + 99 others); Wed, 6 Dec 2023 01:38:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376855AbjLFGh5 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 6 Dec 2023 01:37:57 -0500 Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B29EB1713 for <linux-kernel@vger.kernel.org>; Tue, 5 Dec 2023 22:37:25 -0800 (PST) Received: from epcas5p4.samsung.com (unknown [182.195.41.42]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20231206063723epoutp039b00d26df8a659de449a7e14c64a4be0~eKq_5f7Od1364213642epoutp036 for <linux-kernel@vger.kernel.org>; Wed, 6 Dec 2023 06:37:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20231206063723epoutp039b00d26df8a659de449a7e14c64a4be0~eKq_5f7Od1364213642epoutp036 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1701844643; bh=sUjpf4J6EPjRz39tJ2nYMQaPVuJGRvfjwr76yMwFWGI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VAMGBs/F33/VazQNUa9UOIkhF6JoK52SsRd1qhTcmg5XcxUo8h6eG3yF6BP9O0sbS E/ACpgGMy0rUEMM+KJvwLiBANFyRO0ZVLSjxOqouOhFRPo/Jjep9qjMxI2OY/DL++A Xw0x2DGirE8C8z4Q6Np6Qt5F1X2/Bo2JnQtdWJLg= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas5p1.samsung.com (KnoxPortal) with ESMTP id 20231206063722epcas5p1ce220689ab35a1c57f5b7243ef650006~eKq_ZceS31836918369epcas5p1K; Wed, 6 Dec 2023 06:37:22 +0000 (GMT) Received: from epsmges5p1new.samsung.com (unknown [182.195.38.178]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4SlSPX6BBZz4x9Q6; Wed, 6 Dec 2023 06:37:20 +0000 (GMT) Received: from epcas5p2.samsung.com ( [182.195.41.40]) by epsmges5p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 81.B6.09634.0A610756; Wed, 6 Dec 2023 15:37:20 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPA id 20231206063134epcas5p2b3b9ca0351cd9c1cb169d7a4a3a30b80~eKl6ChNmL0996309963epcas5p2X; Wed, 6 Dec 2023 06:31:34 +0000 (GMT) Received: from epsmgmc1p1new.samsung.com (unknown [182.195.42.40]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20231206063134epsmtrp206d7b59e78d1127279e4f601db0d9e56~eKl6Bculq1483414834epsmtrp2f; Wed, 6 Dec 2023 06:31:34 +0000 (GMT) X-AuditID: b6c32a49-159fd700000025a2-19-657016a0e7e1 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgmc1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id AF.96.07368.64510756; Wed, 6 Dec 2023 15:31:34 +0900 (KST) Received: from cheetah.sa.corp.samsungelectronics.net (unknown [107.109.115.53]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20231206063131epsmtip25bc57c9c9368a9261509f30882ede592~eKl3MGy250501105011epsmtip2z; Wed, 6 Dec 2023 06:31:31 +0000 (GMT) From: Aakarsh Jain <aakarsh.jain@samsung.com> To: linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: m.szyprowski@samsung.com, andrzej.hajda@intel.com, mchehab@kernel.org, hverkuil-cisco@xs4all.nl, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, conor+dt@kernel.org, linux-samsung-soc@vger.kernel.org, andi@etezian.org, gost.dev@samsung.com, alim.akhtar@samsung.com, aswani.reddy@samsung.com, pankaj.dubey@samsung.com, ajaykumar.rs@samsung.com, aakarsh.jain@samsung.com, linux-fsd@tesla.com, Smitha T Murthy <smithatmurthy@gmail.com> Subject: [Patch v5 09/11] media: s5p-mfc: Load firmware for each run in MFCv12. Date: Wed, 6 Dec 2023 12:00:43 +0530 Message-Id: <20231206063045.97234-10-aakarsh.jain@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231206063045.97234-1-aakarsh.jain@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WTbUxTZxTH89zb29421twU0WeEISlzipHaYlsfTHHozLy+ZLI4w9yW4ZXe AFLarrfgxhfASAY4GYaiwHgb4MaoiqtQK9ANC4sJokQhEAQGyHC8LA5hEBiia2nZvv3OP+f8 T845z0PikmZ+AJmoN7MmPaOT8kU8e1votrDKjUZWPjYtQ+OOYgK1/nWXh0bK7XxUvfgHhoar 53jIdatRgK45H2Koov0hgfpb72DoUfEQD+VNjOLINtZLoNGpGNTdVMpHX99sJFBR188Yut4+ JEDf215iqKrxbwHKcrYL0PnMGiLKn+6rmcXpOyVDArq6ZRKjbXU5fHqwt4VP36pJp/Ma6gD9 6lyZgJ6zBdEd83OCaNHHSZoEltGypmBWH2fQJurjI6VHjse+G6tSyxVhigi0WxqsZ5LZSOmB o9Fh7yXq3DNKg1MZXYpbimY4Trpzr8ZkSDGzwQkGzhwpZY1anVFplHFMMpeij5fpWfMehVwe rnInnkpK+NNajht/Ib+wLC3jGaBQkAuEJKSUsHO2kJ8LRKSEagawaKHbF8wC+Mx50RcsANhi ec5bKym7PUN4WEI5AayY2O3lLAza8z7JBSTJp8Lgg9s6j7yBygRwLNvs8cGpeziszC9e9fGj PoCDCz+tMo/aAkefWoCHxdRe2J9h9/XaDK03W3EPC9265Vol4TGCVA8Je7PyCU8zSB2AUxmU N98PTt1r8I0WAOeeO/lejoNjVZO4l3WwvsXi838HtvaU8jw2OBUK65t2euU3YW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lrFrCCLBASsJVY edJxAiPfAkaGVYySqQXFuem5yYYFhnmp5XrFibnFpXnpesn5uZsYwRGjpbGD8d78f3qHGJk4 GA8xSnAwK4nw5pzPTxXiTUmsrEotyo8vKs1JLT7EKM3BoiTOazhjdoqQQHpiSWp2ampBahFM lomDU6qBSX6ts/P7j+q7X0lln48pCVy/203QxErZUEh5r2xQ+4/1HNUBL+cfSvH4w3J1rxOj S/ehPeK9HqEm6zSuLNn8NuZUxa3A3OsNM+deDuta9eVQ966J0+JfJ3RlLtatTKl1E2Z2rxDz l71+2vafHLdRxtLKM3uVq9oD7dklJuUHvLtTWfaMt4pt0dmiaXEbJhVKaW26fMnduWe9Xu0v XY3JzxeaamdN0radMvtYeM5h+e1eRR+FlOzep4lIfr2ZprmxYFbb2l+/o+bb/Q9d9kDJrXK9 tpDIy/DLZ3UP+0Q9CJyVevf7gx0Kq8u0frn+ML/0+uvqzAl+mStWSC2XeCf1MOjkwadO378s f1p77/FyPiWW4oxEQy3mouJEAM3I4pEHAwAA X-CMS-MailID: 20231206063134epcas5p2b3b9ca0351cd9c1cb169d7a4a3a30b80 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20231206063134epcas5p2b3b9ca0351cd9c1cb169d7a4a3a30b80 References: <20231206063045.97234-1-aakarsh.jain@samsung.com> <CGME20231206063134epcas5p2b3b9ca0351cd9c1cb169d7a4a3a30b80@epcas5p2.samsung.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 05 Dec 2023 22:38:19 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784513508582066116 X-GMAIL-MSGID: 1784513508582066116 |
Series |
Add MFC V12 support
|
|
Commit Message
Aakarsh Jain
Dec. 6, 2023, 6:30 a.m. UTC
In MFCv12, some section of firmware gets updated at each MFC run. Hence we need to reload original firmware for each run at the start. Cc: linux-fsd@tesla.com Signed-off-by: Smitha T Murthy <smithatmurthy@gmail.com> Signed-off-by: Aakarsh Jain <aakarsh.jain@samsung.com> --- drivers/media/platform/samsung/s5p-mfc/s5p_mfc_ctrl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
Comments
> -----Original Message----- > From: Hans Verkuil <hverkuil-cisco@xs4all.nl> > Sent: 06 December 2023 18:28 > To: Aakarsh Jain <aakarsh.jain@samsung.com>; linux-arm- > kernel@lists.infradead.org; linux-media@vger.kernel.org; linux- > kernel@vger.kernel.org; devicetree@vger.kernel.org > Cc: m.szyprowski@samsung.com; andrzej.hajda@intel.com; > mchehab@kernel.org; krzysztof.kozlowski+dt@linaro.org; > robh+dt@kernel.org; conor+dt@kernel.org; linux-samsung- > soc@vger.kernel.org; andi@etezian.org; gost.dev@samsung.com; > alim.akhtar@samsung.com; aswani.reddy@samsung.com; > pankaj.dubey@samsung.com; ajaykumar.rs@samsung.com; linux- > fsd@tesla.com; Smitha T Murthy <smithatmurthy@gmail.com> > Subject: Re: [Patch v5 09/11] media: s5p-mfc: Load firmware for each run in > MFCv12. > > On 06/12/2023 07:30, Aakarsh Jain wrote: > > In MFCv12, some section of firmware gets updated at each MFC run. > > Hence we need to reload original firmware for each run at the start. > > > > Cc: linux-fsd@tesla.com > > Signed-off-by: Smitha T Murthy <smithatmurthy@gmail.com> > > Signed-off-by: Aakarsh Jain <aakarsh.jain@samsung.com> > > --- > > drivers/media/platform/samsung/s5p-mfc/s5p_mfc_ctrl.c | 6 ++++-- > > 1 file changed, 4 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_ctrl.c > > b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_ctrl.c > > index b49159142c53..24dd40ae71ec 100644 > > --- a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_ctrl.c > > +++ b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_ctrl.c > > @@ -51,8 +51,10 @@ int s5p_mfc_load_firmware(struct s5p_mfc_dev > *dev) > > * into kernel. */ > > mfc_debug_enter(); > > > > - if (dev->fw_get_done) > > - return 0; > > + /* Load MFC v12 firmware for each run when MFC runs sequentially > */ > > You had a much longer explanation in your reply to my original question. > > I think it is better if that longer explanation is added here. > okay sure. Will add that explanation here. > Things that are weird and unexpected need good comments, explaining why > it is done, and also what you know and do not know about this. > > E.g. you know through trial and error that it is needed (or perhaps you got > information on this some the fw team), but there might be open questions > that are not yet answered. > > This is all information that you can't get from the source code since it has to > do with the black box firmware. So putting all you know in a comment is the > best way of communicating this to future readers of the source code. > Thanks for the review! > Regards, > > Hans > > > + if (!IS_MFCV12(dev)) > > + if (dev->fw_get_done) > > + return 0; > > > > for (i = MFC_FW_MAX_VERSIONS - 1; i >= 0; i--) { > > if (!dev->variant->fw_name[i])
diff --git a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_ctrl.c b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_ctrl.c index b49159142c53..24dd40ae71ec 100644 --- a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_ctrl.c +++ b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_ctrl.c @@ -51,8 +51,10 @@ int s5p_mfc_load_firmware(struct s5p_mfc_dev *dev) * into kernel. */ mfc_debug_enter(); - if (dev->fw_get_done) - return 0; + /* Load MFC v12 firmware for each run when MFC runs sequentially */ + if (!IS_MFCV12(dev)) + if (dev->fw_get_done) + return 0; for (i = MFC_FW_MAX_VERSIONS - 1; i >= 0; i--) { if (!dev->variant->fw_name[i])