Message ID | 20231025102216.50480-10-aakarsh.jain@samsung.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Hans Verkuil |
Headers |
Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from <linux-media-owner@vger.kernel.org>) id 1qvbGT-006ueN-HB; Wed, 25 Oct 2023 10:37:29 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234977AbjJYKh2 (ORCPT <rfc822;mkrufky@linuxtv.org> + 1 other); Wed, 25 Oct 2023 06:37:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235010AbjJYKhN (ORCPT <rfc822;linux-media@vger.kernel.org>); Wed, 25 Oct 2023 06:37:13 -0400 Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3AD0E2694 for <linux-media@vger.kernel.org>; Wed, 25 Oct 2023 03:36:04 -0700 (PDT) Received: from epcas5p2.samsung.com (unknown [182.195.41.40]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20231025103602epoutp0308e47fc49c4337c8be742ed07ffbe804~RU1XcivBE0489704897epoutp033 for <linux-media@vger.kernel.org>; Wed, 25 Oct 2023 10:36:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20231025103602epoutp0308e47fc49c4337c8be742ed07ffbe804~RU1XcivBE0489704897epoutp033 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1698230162; bh=+x6yojYyzNKCsIaMP7898lID8CLuKYiuQY7ljeq0fqU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WoC82qUs0CI92ZZLOfFOrRkkpFKpf7CWRTx9XY98EMOQDwCimTE79M9l8TCxzwDnA pV1BUQLGhbsR++XhIm0BBu9inbZ3DOeyD2qedK2vG/tIEieV9HzEe0BfcyFLrUjwxy EEqkCCId7rDPnmTNox1IlSbsjk8Cz6vqC7zz6jZo= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas5p4.samsung.com (KnoxPortal) with ESMTP id 20231025103601epcas5p43587c89fb37bb4a22434c20415e4f899~RU1WwaTG72289122891epcas5p48; Wed, 25 Oct 2023 10:36:01 +0000 (GMT) Received: from epsmgec5p1-new.samsung.com (unknown [182.195.38.177]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4SFlhJ1kqtz4x9Pp; Wed, 25 Oct 2023 10:36:00 +0000 (GMT) Received: from epcas5p3.samsung.com ( [182.195.41.41]) by epsmgec5p1-new.samsung.com (Symantec Messaging Gateway) with SMTP id C0.CC.19369.09FE8356; Wed, 25 Oct 2023 19:36:00 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPA id 20231025102300epcas5p2c266a078b70614dc948b0e47cd5cf788~RUp-JfHRP0482304823epcas5p2a; Wed, 25 Oct 2023 10:23:00 +0000 (GMT) Received: from epsmgms1p2new.samsung.com (unknown [182.195.42.42]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20231025102300epsmtrp2ac1cb7b53daf69d576ee2e85a097407d~RUp-IazN_0878508785epsmtrp2k; Wed, 25 Oct 2023 10:23:00 +0000 (GMT) X-AuditID: b6c32a50-c99ff70000004ba9-39-6538ef9015ec Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p2new.samsung.com (Symantec Messaging Gateway) with SMTP id B2.D0.08817.48CE8356; Wed, 25 Oct 2023 19:23:00 +0900 (KST) Received: from cheetah.sa.corp.samsungelectronics.net (unknown [107.109.115.53]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20231025102257epsmtip12448a7fd69bb19bf8b5e3a484c5b7857~RUp7-8Iat0719907199epsmtip1B; Wed, 25 Oct 2023 10:22:57 +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, dillon.minfei@gmail.com, david.plowman@raspberrypi.com, mark.rutland@arm.com, 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 v4 09/11] media: s5p-mfc: Load firmware for each run in MFCv12. Date: Wed, 25 Oct 2023 15:52:14 +0530 Message-Id: <20231025102216.50480-10-aakarsh.jain@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231025102216.50480-1-aakarsh.jain@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0VTfUxbVRTffe+1r6BdmjLmTeOQ1LCEaaFlpbtdYNMxzZtjWoefGIYNfSmE 9rXph24zCx1aHbghMDeBQYd8NSsIyDdIt8IgTMgGZBMcgoCdzmEYgQISGNOWMv3vd37nd+75 nXPv5eD8UbaAk8aYaAOj1AjZgUTL9fBwUe4cosWuqkD0e1shC7nmugg0ZWtho/KV+xiaLPcQ qLuxmUQ1zlsYsve5WOhyzy0Wau36jUB3Xe0YGi6cIFDOn9M4anCPsND0zLvodkcxG52tb2ah gsGrGPquZ4JElaPDGKpqeIShsuZFElmdPST67HQF6yVI1dhqADVasYBT7UUTJFXe+QCjGhxZ bGp8pJNNNVZkUNbeVYLKaXIA6nFmCUl5GkKo/iUPqXg6MT0mlVaqaEMozaToVGmMOlZ4OCE5 LjlaJpaIJHK0RxjKKLV0rPBgvEL0aprGO7ww9COlxuylFEqjURi5L8agM5vo0FS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R5meST0DTz9BXLBeqM/7KvOwqH1eyMGPxgtBCwc7Udgd6ETg00VZhKW1D9D4K0nVhzm 2Z7hsKrxIwZfW2sQ+CKrC4OZAz0oNPV24rDn8zbYUZtDQH25GYdX2xoQeM/WRcIb9hcIvGn6 jcAC808SptfbSHj6VBG+hmFLjCWAtRcNoWxNdhfJFtZ9QlhTsY5g33XWEWxF0Uk2/fEYxmZW FgN2PDWXZJ0mX7Zl2ElGuu/krYzjFAeTOM3S8L28eHPKe1w9Qh57/icPSQFviXPAlWLo5Uxp oxE/B3iUgH4AmIqX7fiMMY+ZONNMzrAnc2e8n5wJpSGMo9cw2aYogg5kWqsUU7oXnQ4Y+x0d MnWgdBnG2MqLptuedATj6PiJTDFGL2LqO/XTOp8OZzpa6v9982PullvRKXad1PNHUqczAnoV 0909Ci4Aj3zgUgy8ObVWKVNqJeoQFXc0SCtVao+oZEH7E5QmMD2ZWFwN6ooHg5oAQoEmwFCo 0Iu/YxPkBPw46fFkTpMQqzmi4LRNYC6FCefwRxwZcQJaJk3k5Byn5jT/XYRy9UlB5LvyY1nJ 6KzMh4Y9sTpNWGRf1uakgkNrw7x2vhZd6ndrla/pzqn03UREb5XVoFFJLaJru25fbIvpQrcc TzjrHZwaWdYekRE2GLCRNfxYIjf/Clk12Ov9KtgWLYm21zU7j9l0foh/0jeTaJm9nPD0s0Vl Ye6K68ZPof1Xcmu3B8qAfwV9sl3V/OPNxPhg6P7VlhV+J1phzOH81bV5kiqfywEPdI730Qfs 4vul9y/I226E9pkHDBvjx4YKDluiZqu30gMhbtm6RBO+D/EYbW0YHnJtE63n5SxcMP8rZ7A0 XM19ni5L2+CB4y7rRMrzKbvZAlnyUzlf7wh0imXfFwsxbbxUIkY1WulfZgAelyEDAAA= X-CMS-MailID: 20231025102300epcas5p2c266a078b70614dc948b0e47cd5cf788 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: 20231025102300epcas5p2c266a078b70614dc948b0e47cd5cf788 References: <20231025102216.50480-1-aakarsh.jain@samsung.com> <CGME20231025102300epcas5p2c266a078b70614dc948b0e47cd5cf788@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 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: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-LSpam-Score: -4.8 (----) X-LSpam-Report: No, score=-4.8 required=5.0 tests=BAYES_00=-1.9,DKIMWL_WL_HIGH=0.001,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,RCVD_IN_DNSWL_MED=-2.3 autolearn=ham autolearn_force=no |
Series |
Add MFC V12 support
|
|
Commit Message
Aakarsh Jain
Oct. 25, 2023, 10:22 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
Comments
On 25/10/2023 12:22, 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. Huh? This is very weird. This definitely deserves a comment in the actual code rather than just the commit log. Do you know what is going on? What part is updated? Are you sure it isn't a driver bug somehow? Regards, Hans > > 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 | 5 +++-- > 1 file changed, 3 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..057088b9d327 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,9 @@ int s5p_mfc_load_firmware(struct s5p_mfc_dev *dev) > * into kernel. */ > mfc_debug_enter(); > > - if (dev->fw_get_done) > - return 0; > + 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])
Hi Hans, > -----Original Message----- > From: Hans Verkuil <hverkuil-cisco@xs4all.nl> > Sent: 22 November 2023 21:14 > 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; > dillon.minfei@gmail.com; david.plowman@raspberrypi.com; > mark.rutland@arm.com; 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 v4 09/11] media: s5p-mfc: Load firmware for each run in > MFCv12. > > On 25/10/2023 12:22, 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. > > Huh? This is very weird. This definitely deserves a comment in the actual > code rather than just the commit log. > > Do you know what is going on? What part is updated? Are you sure it isn't a > driver bug somehow? > > Regards, > > Hans > During SYS_INIT command sent to MFC sequentially, firmware is not able to initialize the hardware due to incorrect firmware transfer and in current scenario the firmware is not loaded again in the Reserved memory area. In this case RET_SYS_INIT response from hardware is failing. So we need to load firmware every time we open the device node. I will add comment in the code why this change is needed. Thanks for the review. > > > > 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 | 5 +++-- > > 1 file changed, 3 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..057088b9d327 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,9 @@ int s5p_mfc_load_firmware(struct s5p_mfc_dev > *dev) > > * into kernel. */ > > mfc_debug_enter(); > > > > - if (dev->fw_get_done) > > - return 0; > > + 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..057088b9d327 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,9 @@ int s5p_mfc_load_firmware(struct s5p_mfc_dev *dev) * into kernel. */ mfc_debug_enter(); - if (dev->fw_get_done) - return 0; + 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])