Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp1098565iol; Thu, 9 Jun 2022 23:35:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJysvKmpnZ0WOUKIv5BkYKBEkaVPBqOJjwANrrBv/0VAfu4+gaTJhLSztbGZnNZR4sNwetLg X-Received: by 2002:a63:85c3:0:b0:401:9819:8fb9 with SMTP id u186-20020a6385c3000000b0040198198fb9mr5797469pgd.443.1654842952164; Thu, 09 Jun 2022 23:35:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1654842952; cv=pass; d=google.com; s=arc-20160816; b=FPFlWrmrtPXWVhalk+LoslbIdEqyGjLXffSgVIdr3YcVPcaZkisnwdj0kLo/WDrtNW /bydBoy7xiJxAw8VC9XloUjv/D3RWsT2WZDbPuKxmHWimMJ72AVRN4uGazt55mC19cfn BdirE9BjQ9rlPL+bTm4UviG5RxU4LW5g4mH4ZRZ8jbERwlJKPRL6HgvatcZ2Q2dWOZJ5 0+YgsuzlDIBxr3wh7/vMKpe/tYtmXTqTFI3kWMICa7gTg3wKp2mXkK2myWJp/CKbWFKa DY7M/pS2HOjBDIKXaOkuiHcQE90/0+6RLmyfkHpgXvsut71m9DiQ3Oa6tT2B8STdKKEB OHNw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=T8zZKPcmwRxXvMsS0Gc5DSPSOLmif2cM4370/8JdRKo=; b=ZuvoqtXkBraApm1kS6wwzufcLCSCbcRIq0+CJilSet1zVn/ZdXq91i+jfnplUjk1Iv X6Te+5LInD4pJsWy6UTAgtdoaM0YovfBakhDobWHJjw5nLdS12Op4qV99q2f3huqvwzU PYKBC+AUqjszWttsiKx2IXqUG+Z5Hd3VO5PIlxDPKAhiX9M30YqVWqifFuNE43y3byzU BOrCzmqFphmWMyrp5raDCXlxE4XLTM798MY5T6w1OwgFB72p5bdodWr+B9gNGNOXXNQm i9pCbW6GHrftpaziuYoLky/ljzlpmbEIuQZ5ycp42W+tKybLxOmlUVTrz2SGO5XcQNqR DXuw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=e82zDv+d; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); 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=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oj12-20020a17090b4d8c00b001df621048f4si2102568pjb.10.2022.06.09.23.35.38; Thu, 09 Jun 2022 23:35:52 -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=@nxp.com header.s=selector2 header.b=e82zDv+d; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); 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=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343984AbiFJG0r (ORCPT + 99 others); Fri, 10 Jun 2022 02:26:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238058AbiFJG0p (ORCPT ); Fri, 10 Jun 2022 02:26:45 -0400 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2078.outbound.protection.outlook.com [40.107.22.78]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80492624A; Thu, 9 Jun 2022 23:26:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O/VuWHjGKINJqFx0hPDlTphPvE0Mutg8aRU9GFKzLEErQUD+oEYCJMVaE06Ibao8mW6nzvc8cVY8pnDIXbHjK7f5No3hlqAWB6a0B2SlyVRHhhdNpieaBZbyhold/gxwilCC+rOxj6QJICWToJwJ+E292CBwoE8JR4EcCETsbXkpW8Zaud+vxQRrx43HlCMQEtJcLt2X5/ThxdERkGvkATaHe3uh6VXPdlx9+VObDQ7TeaCEo35DETBHAgZDPIofp6WdBanHU5kCZDsm1FVc7R97Y+95d2p40tkWeMl0Z7e3HGOTxMzyMdmnjTGLpCBnubbekq0vN/RDEEcM8b79iQ== 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=T8zZKPcmwRxXvMsS0Gc5DSPSOLmif2cM4370/8JdRKo=; b=iyEz2ApexJU2jftnfKB1oNASB0IQV5QbiGEfVWV5eTTeY2OUyM/micYvK0TRrgvCLl11RN0ngU53DK5RFZjs7MtUE0QqcSjIjziLKKlsa9RwRQlATkMZKGDMgBT0kDPxXiXjAhmiuyCoYbs7ODSN+IfV8f/XnxeVWT3kPO88eCvvwS6CkOml/zhv2XovfQn6Bz9i8HKWxGrSxol6g0eGJsZtROipcADBsMdUsyyOaHI4wIK2PLWBJsLqQREYN47HTk+cS6W8V1AY34zxQ+kTNXOxM4BvhiTIMlFtWaJpAGh8e+tTnYVnvgnRva7vKoysERqnCUnQfkCTvfSaYVUARw== 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=T8zZKPcmwRxXvMsS0Gc5DSPSOLmif2cM4370/8JdRKo=; b=e82zDv+dpUr95xnHeo0/QyF4lpJPWp06RRYGgbrcpmAKL/cJErpAneB9wkdnWZcsZ7eMeOzWYclgpbNjfbbCLq1HK4Fl0P6o2hMLSvJrNBIH4ipFCscXgHS0oyw+Ki7QD46c6zPGxBrFynLZ0H5aSvYCGT5yyr48SLZcIm1z6vA= 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 AM0PR0402MB3858.eurprd04.prod.outlook.com (2603:10a6:208:f::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5332.13; Fri, 10 Jun 2022 06:26:40 +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.5332.014; Fri, 10 Jun 2022 06:26:40 +0000 From: Ming Qian 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: output firmware error message Date: Fri, 10 Jun 2022 14:26:11 +0800 Message-Id: <20220610062611.20201-1-ming.qian@nxp.com> X-Mailer: git-send-email 2.36.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR02CA0048.apcprd02.prod.outlook.com (2603:1096:3:18::36) 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: 0f0bf4b3-e00d-4620-95e9-08da4aaa2e02 X-MS-TrafficTypeDiagnostic: AM0PR0402MB3858:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PuGXvgMaqqCHxuXM0vqHcOhmv2kfdaCnYDnhjiLgq/yTB14mJ0AQYheAP1Y4MTQLYHXxfuhHACvDiRTdPO1CXm85KcmzDNT0vfTSHw6FIg1ePKUZECzwFGcnA05s+Yg8cHTjC9Wq+D9IDMWqBm1Zn4d82o/ce1ZLirTfQLydM2TgDq3peejtBtoZHFzdZj7ClshLOxe3QGPqNHBbgXu7JPUWyO9Jeysm3/hZJ5Q/OcWNvmCgrwKpIoYIFUb8LyxIhczicA5uhs+9NDPigtj0OA6tanXfJW1LB+i10dATEgzFlsdoOZNmbFeV7w4aLgK+QvJREyn4OLabo2DVJtlo/KYjquXCmYJ8kTD0BPw0p7pwbtq1SGhvp9Lo1sprErRWVNi3UUOvaYFJVGFlMzb1Y+qQaEcCql8/5kw3BMHb/4lBZNbTE8KRBZ9HNtK3sPdw5ath4w7fg/nKySgWbjvZ6MMp4SqLROeMLj5Aq1YXP1n1o1vz18XCAV+Rqsbblf51rfAPN93eDnlBvEsAKHJQPAC28tLO2G2fz4JFBwAmYOG3VCO9OvYygu+l/02yhL4WUnMVTLKDmxLX8FgohnCqc6VFUWCrtd4FyUqckCA+WJJRkBgOGbI69XFRCiSJAIaAYQqbZCfyWfdgd5Zb/JmaBaHrPwZzT+H1j7IJrnfcWya2N5X0cbJGOiJaMQuVOdLP8zCnJ/aFGL5NCRh7izZgGw== 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)(8936002)(7416002)(66476007)(4326008)(8676002)(66946007)(5660300002)(6486002)(83380400001)(66556008)(316002)(508600001)(6506007)(2906002)(38100700002)(86362001)(52116002)(6666004)(186003)(2616005)(36756003)(6512007)(26005)(44832011)(38350700002)(1076003)(15650500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?VySriApSw/yrK5y3jsHSxKiLa6kNa/ahVf6mtubrHCQaVOtDyjO9ACYVBgI0?= =?us-ascii?Q?+1IJohOjNc6XKBojglGONAtWyhikXOvPQedu1BGCVD4TFbEAilAimT1sUpRM?= =?us-ascii?Q?0WiBPa+Ne8HemE6eSChadi1MI7odXOgURfeO2TZk5h9SmWnbUYaNRC8xI/Ai?= =?us-ascii?Q?ZEi9++N6+wVj67Gi2l94LOIUuuiZhiRO7PwTQ1Grqh0u16Invx/Z22TSWyu2?= =?us-ascii?Q?/aVt9bcg6WBzP8itycHpK4ulQOuMc0Cxna1b3U9crBn2M0XuFGwkKULZXtKF?= =?us-ascii?Q?yBKDqGV3FoQ0AdVKgS5UNTtlIvotBY/xSDECgipd5YAmZozIwnHy3yIY57+1?= =?us-ascii?Q?WlsNPQUjjzemykkitQLZl4bWG3TFig6rbcsGcyyWIwm79cB7xACOwT8MTC0d?= =?us-ascii?Q?L0hipcz+E8PtHN2RrvHCgHsX6Mil9Ov9N0WdL6ZNoexVFjYkiGUrul72fCi1?= =?us-ascii?Q?jaJmwUFdU7vm/vQEuf3XyiDak3FDr1d0WbojKQbqKtbTxEt5Nf+2Zqyjxrdu?= =?us-ascii?Q?eNqG49aGp8etwmvgvDiuOl33dkeaaMtVxUSwuxya2mPlQUt0FhRlGD9LOmUM?= =?us-ascii?Q?ytL8FVJws0XR2b//LBkxFY9H/YZcJ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A9jK4q57lHU6zdtKNQzWMRpooGVCcXy6xFu/XeKwddyM1UIGMc2JsVyvB?= =?us-ascii?Q?xbWWSbX9Xb5JRF2x9DDzFT061gAhbG2tNHnKj/6OhNMEvP+TxNNqAjN/IdwJ?= =?us-ascii?Q?giRhIrCstcQB9b7gOSK3qVjBPikrisyFXmoawZKfwcAj5tIt9OIbYVY8sGsA?= =?us-ascii?Q?1HoCduVfuseQMyZ9v7T/lX4ggKrZPvTQ2wWpK4Oe7KM3yk2llEmWeMtz6lVO?= =?us-ascii?Q?jIh5FOAJwA=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0f0bf4b3-e00d-4620-95e9-08da4aaa2e02 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB6341.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jun 2022 06:26:40.6757 (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: P6gstk11ZdNrh1+OYw/O6FcZum3f+i4j2eQoeLXTUCYG3j3E7IZRbmCTrsGMlGLSYNlC0JmYEEH9FBMw653Gdw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0402MB3858 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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 Firmware may send the error event with some error messge, and it help locate the firmware error, so output the error message if it exists Fixes: 61cbf1c1fa6d7 ("media: amphion: implement vpu core communication based on mailbox") Signed-off-by: Ming Qian --- drivers/media/platform/amphion/vpu_msgs.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/amphion/vpu_msgs.c b/drivers/media/platform/amphion/vpu_msgs.c index d5850df8f1d5..d8247f36d84b 100644 --- a/drivers/media/platform/amphion/vpu_msgs.c +++ b/drivers/media/platform/amphion/vpu_msgs.c @@ -150,7 +150,12 @@ static void vpu_session_handle_eos(struct vpu_inst *inst, struct vpu_rpc_event * static void vpu_session_handle_error(struct vpu_inst *inst, struct vpu_rpc_event *pkt) { - dev_err(inst->dev, "unsupported stream\n"); + char *str = (char *)pkt->data; + + if (strlen(str)) + dev_err(inst->dev, "instance %d firmware error : %s\n", inst->id, str); + else + dev_err(inst->dev, "instance %d is unsupported stream\n", inst->id); call_void_vop(inst, event_notify, VPU_MSG_ID_UNSUPPORTED, NULL); vpu_v4l2_set_error(inst); } -- 2.36.1