Message ID | 20220517080116.24502-1-ming.qian@nxp.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 490FEC433F5 for <linux-arm-kernel@archiver.kernel.org>; Tue, 17 May 2022 08:03:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Oay9fmjr5t/VQHKS80I03iT4DIB3Bwfs4H7+1xgBKZY=; b=AVbTqoDDgMWVSF ZLisRUV2E8Z/REmwd2TEiMAhtVPnSuYm5A5ORFBaaCayQ/spYIdxeq1MmiV2iBdZDbo/zfsNMxJvB Uaqrus5ImnuZqoZT2PE4RmyUdqdMVarWBnYp8CfRAhfsNIEezdKdWCvnc3/qMFCevkjHBgrQrHBsr b2R7kCHPyXOUMngr9U27RdFbsKY0bE5xcpFdnf/OxA8rhS/jMw2UY8Yv1fgFI1j78o9CvKKDJsUEj 0wv+/FaIc8cvUoUagZVejKnLz2LKJ/N+3xUTOSeNjdliLZK9W3xsD4cuHT5kmKZEhNLZ90WCvN/5m yEDrvoTrzPx2niybgtEQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqs9G-00CJK7-2m; Tue, 17 May 2022 08:01:42 +0000 Received: from mail-db8eur05on20628.outbound.protection.outlook.com ([2a01:111:f400:7e1a::628] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqs9C-00CJI6-6P for linux-arm-kernel@lists.infradead.org; Tue, 17 May 2022 08:01:39 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UiWayjE1cJHmbgY/Tbb01/ysGdYGSrOT3MY/JsMkLygu5V/cjlykKPvVltXS67KZaPhnqDsM+O+0JshBC6dqB/wyU9wuWtNSmm0OBGPPLiFPTlh4unrmnXcAx8a1ZVPWkEDhveOwtzvq0Ht3GzzcSgouanp2l3NOtCgsTKtU6qZguby4Q+99Hn56Gw/sSeVuhrsPcyImRC8zduWsMp0kmqhynPCbcPHTBfXxq3RNq9r8lmNZHxfAwTcEsukm95AymQxxZghD38KKiroIRk1YGcbfsRCZLQp2Jr5SnDBaJbP5D6Z9Z6NteMAE+YmADR237QG7Z/njIHjFJLN9jxOK2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=7cO5pQ+IU70ujZNtLnHCk+xOHdhbIIMynapQyg6Vnkw=; b=WUiOXOMuNOTFkEhn+T57r4r8OccnrbwZCqGLo3+SA6jx6cgLZe8DLjhIscKd21/MtzJnPU9YebyoRj8VaF25qkc7txaUHGjcq5675OD02Ijgs+8BhxqgYhQlwdiX0masmCXFYtkO1P8S55k/IjgkQWNKYzzFsJ38pQMjuk7znHlEVupBA/p7BBQne428GaMGo9LXCHk6kMLU6q2aTJqsGVT+lHVFTK9M/Ogpq4lXlqaH36+i3iZ2oKT7iFrVHGY2DgScFkLZUCj+f8iJPFKezLUtGOiTfXTM32ukKXfuFaMfBcpopLGqUp71VtabbSP6YBdfbpbCNk7kyDw3gro+cQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7cO5pQ+IU70ujZNtLnHCk+xOHdhbIIMynapQyg6Vnkw=; b=ece+lKfNe2SBWY3CM0SGWSEKNNw/uhXjQLO0IOllkvsmmj1tgmXIo16UjVRhlrxyyLGtAqOyVQgD81IxiRH5jix1zi8x+2I0OuaJ3cQ0a1nVSgb1lhkTwY/8PdqXXROeSN7vQ5T0p5EdeePBlbNfoFRxwDKsK7bm+Q323KodQxU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB6341.eurprd04.prod.outlook.com (2603:10a6:20b:d8::14) by AM0PR04MB5924.eurprd04.prod.outlook.com (2603:10a6:208:124::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5250.18; Tue, 17 May 2022 08:01:31 +0000 Received: from AM6PR04MB6341.eurprd04.prod.outlook.com ([fe80::bc48:7565:c619:62c3]) by AM6PR04MB6341.eurprd04.prod.outlook.com ([fe80::bc48:7565:c619:62c3%7]) with mapi id 15.20.5250.018; Tue, 17 May 2022 08:01:31 +0000 From: Ming Qian <ming.qian@nxp.com> To: mchehab@kernel.org, hverkuil-cisco@xs4all.nl Cc: shawnguo@kernel.org, robh+dt@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] media: amphion: support for reloading module Date: Tue, 17 May 2022 16:01:16 +0800 Message-Id: <20220517080116.24502-1-ming.qian@nxp.com> X-Mailer: git-send-email 2.36.1 X-ClientProxiedBy: HK2PR02CA0168.apcprd02.prod.outlook.com (2603:1096:201:1f::28) To AM6PR04MB6341.eurprd04.prod.outlook.com (2603:10a6:20b:d8::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: dd57076e-5a4f-44d0-cf56-08da37db742f X-MS-TrafficTypeDiagnostic: AM0PR04MB5924:EE_ X-Microsoft-Antispam-PRVS: <AM0PR04MB592426747681E21EFD177A03E7CE9@AM0PR04MB5924.eurprd04.prod.outlook.com> X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9P9HrzKSxBneltSZQCCN+0USAoGyQyrqQ28rJwCf0bb/zbfjrZU8Kcyj13qWcD/QUYWvCfb56TcSACLDf3wSkoka18EGvIcsgJ+y/fy6NNNnkBbOoD0JBvVo2TrUCfvrD++kKM/ZR5O+Anizgb2of2U34JKlQgNByG4m4aoVJZbI4aaW8d6Udzc76S8v8X9uN27XvftNcumh4ker1CtAiK18GwEip4BnhE3+EoJLOTbnfc63YoBFibxrdWsi1Mc8f7HIvpQV/Yl3ueUggf+5IOdgQQfk8g4IWXlrtwmwbGz1R3CcDU77pI2l82LqNDTUweD+VwaO8i4n+I50VRLw4XNxn/2NFZVCCPq31VMTo2j7fkEtYsd6PrKz2anUB/TbIpJ94LoqzsbXxJFiGK63QZVpwJJYCRxtMNsmhT1LQVwLYquDAQJsdtRvQLb7LFPpdYgjpEkNGJsxfZga3hdDF8XqAhJMcIgdAh4Xv39A5JpxGSH1yc8/u/QmTPdo5o5TvQ+Te8J1nIGhA1l5U7PbKAh8WFQ8CxXxA6pdO1u54KC6gOG5DSC+vVcKWUWxu7ko7CsGHOv/XhEzFZre2WgHHNi7hPwghpgnL5gkbDn2g9HtFtDEuxH15Kat30SwGhwR9XHAJCH3cTEzGWlv1mmuK2aD/u6WK4+TsgGUbyQnK0NXQ0/p8AcnbWwNBIlk6BfwGOd0TzEIw8n2rdt8BtQ0SQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR04MB6341.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(186003)(52116002)(6666004)(2906002)(26005)(7416002)(6512007)(8676002)(1076003)(44832011)(6486002)(8936002)(508600001)(316002)(66476007)(2616005)(83380400001)(4326008)(36756003)(66556008)(86362001)(66946007)(38350700002)(6506007)(38100700002)(5660300002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: IvO57ftuMJXrLrZ8M1Tu4netf2BaoOY2eJ8lSbja977BD29vrx2TZSXFyymaI5j44Jj0uJE+NvX6QPRLbmYouQMmVazSt8fW3Cei96wMAbZ5LO4IhI124ZEdX44w5fH9S0f+nqBKnpBgPRPE5e1mH3HC2bZ36Rsw/V1SwPfAftv7TjcypCS4/cv1o323rhbPlusvRF1BTlJYg1rcnthU2XprDpYb3b+6ZPjAq9kfIzeAKE6IGvX7US2LP+29BvQN+/E0vIsYS2SbfQkscFVU4toPArm12F35IiEpwD8Etp780Ml/ldwIMVf/hQwHGPnLx+CxMFzlwsBXr+JKOvMK0TFZ8wQ0YQ0e7BsgKOpEblWYg9mj+RRZE20rPRzpIBFurkX099zli/ZmfGf81aA3stnvntanOVq8Acl/0a8KJPfxiZOuSsV55oquGf4QFYem6Aa7HEaSvzwSMv5HiuAGbrn4Emqb2rO6jFVC40ktyft2nimt7JghDlYJLFt0H5g2exRzC7tVLNHEY8fD0sNQmQCMnJodkSouyR4Rpjd7r6R81lUbnDwzWSKdB+3IZ3ZsSZhWsm6UqjTdfhD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VMbgqUxU0tHQgJaZNy7rEl26EQ7UthuxTXJsvm3bOM8f6gbjsE1Xy4XwmSLMTWscKkqS7jiVQ== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: dd57076e-5a4f-44d0-cf56-08da37db742f X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB6341.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 May 2022 08:01:31.6595 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: QOwDkhhMZWOfGTQcfsW4bmh69kRKbdRFIchIsxJ1kDNWtotpAzNSJuBJZ8bl4wiwA5xkhIwWTIyr1pzsc5niYg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB5924 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220517_010138_471380_1181E8B6 X-CRM114-Status: GOOD ( 12.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
media: amphion: support for reloading module
|
expand
|
diff --git a/drivers/media/platform/amphion/vpu_core.c b/drivers/media/platform/amphion/vpu_core.c index 68ad183925fd..3cca7ae2355d 100644 --- a/drivers/media/platform/amphion/vpu_core.c +++ b/drivers/media/platform/amphion/vpu_core.c @@ -257,14 +257,8 @@ static int vpu_core_register(struct device *dev, struct vpu_core *core) } list_add_tail(&core->list, &vpu->cores); - vpu_core_get_vpu(core); - if (vpu_iface_get_power_state(core)) - ret = vpu_core_restore(core); - if (ret) - goto error; - return 0; error: if (core->msg_buffer) { @@ -362,7 +356,10 @@ struct vpu_core *vpu_request_core(struct vpu_dev *vpu, enum vpu_core_type type) pm_runtime_resume_and_get(core->dev); if (core->state == VPU_CORE_DEINIT) { - ret = vpu_core_boot(core, true); + if (vpu_iface_get_power_state(core)) + ret = vpu_core_restore(core); + else + ret = vpu_core_boot(core, true); if (ret) { pm_runtime_put_sync(core->dev); mutex_unlock(&core->lock);
As there is no interface to power off vpu core. So it need to boot from cold on first load. but on the second load, driver need to restore the status instead of booting. Signed-off-by: Ming Qian <ming.qian@nxp.com> --- drivers/media/platform/amphion/vpu_core.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-)