Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2928856rwb; Mon, 15 Aug 2022 14:14:30 -0700 (PDT) X-Google-Smtp-Source: AA6agR7sVdigLiPuojJp7qUASuSUdDCUCEYWmCNKjaBZZ5EXDJa4ouJVG64pAr7H2EXcReslaiyh X-Received: by 2002:a63:4c05:0:b0:41d:12ad:e885 with SMTP id z5-20020a634c05000000b0041d12ade885mr15874673pga.130.1660598070172; Mon, 15 Aug 2022 14:14:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660598070; cv=none; d=google.com; s=arc-20160816; b=kqwaUADOQR8jY0cdtMA/HrKepHvW7YDat+S3JAKhzvvphCIcnhR/v+N6bcytwJMFzj 4aXV0zLS+EupKKwYSpW1cXgkdLPUAAVPwbgfhjimy9gDTA/JcBLCMon7TPovB+j/r12O 6inxFd7MWHqtT2+ItzXDA5Llm83FXDFNOxC0U8cS/GpAamxqpo54K/RfndkdTXZ/M1RR VxmTAOeLq8nX6YRRfNQDNGCGtH8jokTfuHx13LfT4v8SV/urr8HG+vuw602XQaajlwU/ 0df8tkqCeYyHZbwYNof/zSdcc2cJFHO1MZNI2+qGxs5kJ+zCojTtYaz3fkNmfUdmIIBr ag3g== 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=LJfpvfTDxbH88Mu4jW1irbZFZNAKUN0y2xzzAV3DRRs=; b=t2AyAPYsPk5qsslxvlD0etKS3W5ZbQHeXNoc9/PFZXhkJD1KitSSV5Us8ouDPxeRZb K/g+quaHAKavSxL/PvfRbyL6eWycZjoANLTrdPWxk4s99l4lFTCTXbwUXgAW2KWg0OkS 6xWGzz9gFIEzgOoyz1r9Y697gxBKu9644jjGcLVnzx7ioftnvnvuwyBcV8mZr0ZqXZFo Ymyaj+dWQGoO6XRGVRwkJGo0Nc3mQ1IqpYAxCHpYpr2bAL/KbJgf86Tn1BY+fbjzFkia LqayXkot96iI2SAQfq3rqXyaw/EJSqsQEPOYPjty/JGnhBWloxWMipRy+df3IT/qGREV 2VZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=h7Pig7x5; 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 82-20020a630055000000b0041c0861b61bsi12501555pga.772.2022.08.15.14.14.18; Mon, 15 Aug 2022 14:14:30 -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=h7Pig7x5; 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 S245385AbiHOVC6 (ORCPT + 99 others); Mon, 15 Aug 2022 17:02:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346751AbiHOVA7 (ORCPT ); Mon, 15 Aug 2022 17:00:59 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27CE7C6EB7; Mon, 15 Aug 2022 12:13:16 -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 75F11B810C6; Mon, 15 Aug 2022 19:13:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 92981C433C1; Mon, 15 Aug 2022 19:13:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660590793; bh=l1JNBUW67c3Haepi31TlKOHIL3hpGY4BFuc6oaKik5A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h7Pig7x5uZRF7dFmwGasHxDDRB27Ieqasusrk/zFQtZLvXS5ndOfyjlS/O8a8DNM0 uk54o1HL+PTgpCy33iehEAA7n2MGnyWOsyDbXNNG8znc743+Z+qHZa5KNkXBOfMAsS 7mEsIrmzJSW11b2N9TL5eo84SkDMBwbMqrvUfpqk= 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.18 0373/1095] media: amphion: output firmware error message Date: Mon, 15 Aug 2022 19:56:12 +0200 Message-Id: <20220815180445.151333958@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@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 58502c51ddb3..077644bc1d7c 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