Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3091343rwb; Mon, 15 Aug 2022 17:55:02 -0700 (PDT) X-Google-Smtp-Source: AA6agR4aXVSNJ8M+lrFetwGLHM1cb4KjXdM9QxoW3zINalZ/Atfxrzhq7qA/u/617HkrJeaA4QWm X-Received: by 2002:a17:907:1690:b0:731:56b6:fded with SMTP id hc16-20020a170907169000b0073156b6fdedmr12201751ejc.119.1660611197098; Mon, 15 Aug 2022 17:53:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660611197; cv=none; d=google.com; s=arc-20160816; b=Avl5yxmgEzC6nhTM7ZWYHMR+W3yQx0rhOJE+IEH2hQyCajEGc+TK9hC2rwM+kkD9uh XUgKYaBefuRbrxupmvr38wU+TJh6gkGSahWmj4/XVO86aTeNIF3FBmdwMiqRNAnhLss5 T/9tvJq4cO1OJAAzAPsZFe7qHC7Y5G5QVOQqbF/zgDeseJ9vdu0l7Trq9jKMqxC9zCev ezSd9weyaWeapTsJp8T1MyUMgczhi1J3haI+ZDomZGzlWchfQ7pWQLcIMhn5nGdJFBL5 Uh5QfOAfJ1QkRyYNNs3kLxxn9o3pToDGgg6s9XZ4HqUGc8u88mrOZdC8v0Tl0XRofuiG Mc5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hh9H/RX62CsSxqk6XauciCfibZEFU0l+2kOt6DMUpxM=; b=YXXu2qgvU9XSRO+xxSFygYnUMCUZv3Lf6v+i6YXNiaG5KnMGSw3LwFJb8bww3URGhT 4UJRFb53/HToBdeBhtiw32vhyimxp/+5phaPAcRHejKTMx/X1Ixg71+lRmWE36+6OL6o ffXLi+l8y90015vOAKmpKAaljOk46hGyIxMvCFz+9dAbH8PloOpy3pKdAbr/qHAEN2R2 1l/vMduyRgllWhd/3NuyN9HI0cAJie0dsKk/bGUDI7u1C7+fiCBfu5OyS1AF28DHWhzn 3HE3I9FFNcw/Vbe119DUyIwkWz/2qsFR2xeRq1w4xGDQYJ0PirIGck4NFMQkDV2jDgQh nYGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=duwp1yIW; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hq34-20020a1709073f2200b00734bbe8d2casi8877543ejc.608.2022.08.15.17.52.51; Mon, 15 Aug 2022 17:53:17 -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=@linuxfoundation.org header.s=korg header.b=duwp1yIW; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353906AbiHOXmx (ORCPT + 99 others); Mon, 15 Aug 2022 19:42:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353976AbiHOXk0 (ORCPT ); Mon, 15 Aug 2022 19:40:26 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71E64DF8C; Mon, 15 Aug 2022 13:10:19 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 24C51B80EAB; Mon, 15 Aug 2022 20:10:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 282C8C433C1; Mon, 15 Aug 2022 20:10:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660594216; bh=+RDC+fA7ra6cCH+DXFwe/HZEoHRonNZiVTAAfjz3wCQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=duwp1yIWYwsc+QoHCdux09gjhl5Z6kX8TDifYid941WLaic4bRHhlQWHnGRI3xWuC ZLGagMOlb2DOhLClmdxaJ5IM4Jaaawyr/nsDLQfAVVQEQ/d17uUbLCDj6rSfdZyA2x VF1BDMLTy3bItNsLHie/aqCUURNLEHnJLPLLcscI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ming Qian , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.19 0396/1157] media: amphion: output firmware error message Date: Mon, 15 Aug 2022 19:55:52 +0200 Message-Id: <20220815180455.521689307@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 From: Ming Qian [ Upstream commit 89e3f3fb3d9014efa59ed6bb526d5f1a00168452 ] Firmware may send the error event with some error message, 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 Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- 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.35.1