From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 AF641C433EF for ; Wed, 18 May 2022 11:34:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E023210E07A; Wed, 18 May 2022 11:34:21 +0000 (UTC) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by gabe.freedesktop.org (Postfix) with ESMTPS id DBEDA89DD3 for ; Wed, 18 May 2022 11:34:20 +0000 (UTC) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 552F960C94; Wed, 18 May 2022 11:34:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 41CA7C385A5; Wed, 18 May 2022 11:34:15 +0000 (UTC) Message-ID: <31992c67-400e-8e14-38c2-4655995886f5@xs4all.nl> Date: Wed, 18 May 2022 13:34:13 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH v6, 6/7] media: mediatek: vcodec: prevent kernel crash when scp ipi timeout Content-Language: en-US To: "yunfei.dong@mediatek.com" , Alexandre Courbot , Nicolas Dufresne , AngeloGioacchino Del Regno , Benjamin Gaignard , Tiffany Lin , Andrew-CT Chen , Mauro Carvalho Chehab , Rob Herring , Matthias Brugger , Tomasz Figa References: <20220513092526.9670-1-yunfei.dong@mediatek.com> <20220513092526.9670-7-yunfei.dong@mediatek.com> From: Hans Verkuil In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Irui Wang , George Sun , Steve Cho , devicetree@vger.kernel.org, Project_Global_Chrome_Upstream_Group@mediatek.com, linux-kernel@vger.kernel.org, dri-devel , Xiaoyong Lu , linux-mediatek@lists.infradead.org, Hsin-Yi Wang , Fritz Koenig , linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 5/18/22 13:29, yunfei.dong@mediatek.com wrote: > Dear Hans, > > Thanks for your review. > On Wed, 2022-05-18 at 11:37 +0200, Hans Verkuil wrote: >> Hi Yunfei, >> >> On 5/13/22 11:25, Yunfei Dong wrote: >>> When SCP timeout during playing video, kernel crashes with >>> following >>> message. It's caused by accessing NULL pointer in >>> vpu_dec_ipi_handler. >>> This patch doesn't solve the root cause of NULL pointer, but merely >>> prevent kernel crashed when encounter the NULL pointer. >> >> Is the root cause being addressed as well? Where is the root cause? >> Is it >> in this driver or in the scp (i.e. the remoteproc) driver? >> >> I need a bit more information to decide whether this series is ready >> to >> be merged for 5.20 or not. >> >> Regards, >> >> Hans >> > Vpu will be NUll when scp(micro processor) is hang or crash. Need to > keep kernel works well , so add this patch. OK, I think this should be stated in the commit log, and also in the code (see below). > > Best Regards, > Yunfei Dong >>> diff --git a/drivers/media/platform/mediatek/vcodec/vdec_vpu_if.c >>> b/drivers/media/platform/mediatek/vcodec/vdec_vpu_if.c >>> index 35f4d5583084..1041dd663e76 100644 >>> --- a/drivers/media/platform/mediatek/vcodec/vdec_vpu_if.c >>> +++ b/drivers/media/platform/mediatek/vcodec/vdec_vpu_if.c >>> @@ -91,6 +91,11 @@ static void vpu_dec_ipi_handler(void *data, >>> unsigned int len, void *priv) >>> struct vdec_vpu_inst *vpu = (struct vdec_vpu_inst *) >>> (unsigned long)msg- >>>> ap_inst_addr; >>> >>> + if (!vpu) { >>> + mtk_v4l2_err("ap_inst_addr is NULL"); E.g., either add a comment here or perhaps change the error message to: "ap_inst_addr is NULL, did the SCP hang?" Or something along those lines. Shouldn't there be a \n at the end of this message as well? Or does mtk_v4l2_err add that? Regards, Hans >>> + return; >>> + } >>> + >>> mtk_vcodec_debug(vpu, "+ id=%X", msg->msg_id); >>> >>> vpu->failure = msg->status; > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B8B9CC433FE for ; Wed, 18 May 2022 11:36:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235812AbiERLgQ (ORCPT ); Wed, 18 May 2022 07:36:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235745AbiERLeY (ORCPT ); Wed, 18 May 2022 07:34:24 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63DC61778B5; Wed, 18 May 2022 04:34:22 -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 14B40B81F30; Wed, 18 May 2022 11:34:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 41CA7C385A5; Wed, 18 May 2022 11:34:15 +0000 (UTC) Message-ID: <31992c67-400e-8e14-38c2-4655995886f5@xs4all.nl> Date: Wed, 18 May 2022 13:34:13 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH v6, 6/7] media: mediatek: vcodec: prevent kernel crash when scp ipi timeout Content-Language: en-US To: "yunfei.dong@mediatek.com" , Alexandre Courbot , Nicolas Dufresne , AngeloGioacchino Del Regno , Benjamin Gaignard , Tiffany Lin , Andrew-CT Chen , Mauro Carvalho Chehab , Rob Herring , Matthias Brugger , Tomasz Figa Cc: George Sun , Xiaoyong Lu , Hsin-Yi Wang , Fritz Koenig , Daniel Vetter , dri-devel , Irui Wang , Steve Cho , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Project_Global_Chrome_Upstream_Group@mediatek.com References: <20220513092526.9670-1-yunfei.dong@mediatek.com> <20220513092526.9670-7-yunfei.dong@mediatek.com> From: Hans Verkuil In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/18/22 13:29, yunfei.dong@mediatek.com wrote: > Dear Hans, > > Thanks for your review. > On Wed, 2022-05-18 at 11:37 +0200, Hans Verkuil wrote: >> Hi Yunfei, >> >> On 5/13/22 11:25, Yunfei Dong wrote: >>> When SCP timeout during playing video, kernel crashes with >>> following >>> message. It's caused by accessing NULL pointer in >>> vpu_dec_ipi_handler. >>> This patch doesn't solve the root cause of NULL pointer, but merely >>> prevent kernel crashed when encounter the NULL pointer. >> >> Is the root cause being addressed as well? Where is the root cause? >> Is it >> in this driver or in the scp (i.e. the remoteproc) driver? >> >> I need a bit more information to decide whether this series is ready >> to >> be merged for 5.20 or not. >> >> Regards, >> >> Hans >> > Vpu will be NUll when scp(micro processor) is hang or crash. Need to > keep kernel works well , so add this patch. OK, I think this should be stated in the commit log, and also in the code (see below). > > Best Regards, > Yunfei Dong >>> diff --git a/drivers/media/platform/mediatek/vcodec/vdec_vpu_if.c >>> b/drivers/media/platform/mediatek/vcodec/vdec_vpu_if.c >>> index 35f4d5583084..1041dd663e76 100644 >>> --- a/drivers/media/platform/mediatek/vcodec/vdec_vpu_if.c >>> +++ b/drivers/media/platform/mediatek/vcodec/vdec_vpu_if.c >>> @@ -91,6 +91,11 @@ static void vpu_dec_ipi_handler(void *data, >>> unsigned int len, void *priv) >>> struct vdec_vpu_inst *vpu = (struct vdec_vpu_inst *) >>> (unsigned long)msg- >>>> ap_inst_addr; >>> >>> + if (!vpu) { >>> + mtk_v4l2_err("ap_inst_addr is NULL"); E.g., either add a comment here or perhaps change the error message to: "ap_inst_addr is NULL, did the SCP hang?" Or something along those lines. Shouldn't there be a \n at the end of this message as well? Or does mtk_v4l2_err add that? Regards, Hans >>> + return; >>> + } >>> + >>> mtk_vcodec_debug(vpu, "+ id=%X", msg->msg_id); >>> >>> vpu->failure = msg->status; > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 E1757C433F5 for ; Wed, 18 May 2022 11:38:44 +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:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=BuMBTa61v12hxeI656aASwJ4F5QwcXNXM+uc4JAhj6A=; b=KjFdPQqNifthPM vQUvJRpJIrIYQIo5VgyF2N5WrcoWCGXfyg+Q5PnOgV4KKu39omnDK3s32wwSEHkPcqDW8DRRIUi86 AA2vAMCEUBiRQNujZW2lrNsg9tDTsqo+qPe/sgA5duLXDmGnG8JK8CL6Yyx2SDa5zr2J6R4n9AlzF Iq/8HUE4GdzFZuCc+bA/6SSFOjsCEtB5mIK6TBBfqWeBmrNF/JeLIqRMYci7IHVCiQB+6j5lsmoXZ nv+/+RXz3aJCio397LuZgrgkJSbavTJLDzQPNV7EH4btgiXa5M4un5ru/HHN3lq5T0hXK9UOgsyZg j6bYyXUk7J6GIkIJ8zOQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nrI0l-001cHx-Qm; Wed, 18 May 2022 11:38:39 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nrHwb-001Zqy-5b; Wed, 18 May 2022 11:34:22 +0000 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 dfw.source.kernel.org (Postfix) with ESMTPS id 552F960C94; Wed, 18 May 2022 11:34:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 41CA7C385A5; Wed, 18 May 2022 11:34:15 +0000 (UTC) Message-ID: <31992c67-400e-8e14-38c2-4655995886f5@xs4all.nl> Date: Wed, 18 May 2022 13:34:13 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH v6, 6/7] media: mediatek: vcodec: prevent kernel crash when scp ipi timeout Content-Language: en-US To: "yunfei.dong@mediatek.com" , Alexandre Courbot , Nicolas Dufresne , AngeloGioacchino Del Regno , Benjamin Gaignard , Tiffany Lin , Andrew-CT Chen , Mauro Carvalho Chehab , Rob Herring , Matthias Brugger , Tomasz Figa Cc: George Sun , Xiaoyong Lu , Hsin-Yi Wang , Fritz Koenig , Daniel Vetter , dri-devel , Irui Wang , Steve Cho , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Project_Global_Chrome_Upstream_Group@mediatek.com References: <20220513092526.9670-1-yunfei.dong@mediatek.com> <20220513092526.9670-7-yunfei.dong@mediatek.com> From: Hans Verkuil In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220518_043421_367311_D72721B6 X-CRM114-Status: GOOD ( 23.30 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org On 5/18/22 13:29, yunfei.dong@mediatek.com wrote: > Dear Hans, > > Thanks for your review. > On Wed, 2022-05-18 at 11:37 +0200, Hans Verkuil wrote: >> Hi Yunfei, >> >> On 5/13/22 11:25, Yunfei Dong wrote: >>> When SCP timeout during playing video, kernel crashes with >>> following >>> message. It's caused by accessing NULL pointer in >>> vpu_dec_ipi_handler. >>> This patch doesn't solve the root cause of NULL pointer, but merely >>> prevent kernel crashed when encounter the NULL pointer. >> >> Is the root cause being addressed as well? Where is the root cause? >> Is it >> in this driver or in the scp (i.e. the remoteproc) driver? >> >> I need a bit more information to decide whether this series is ready >> to >> be merged for 5.20 or not. >> >> Regards, >> >> Hans >> > Vpu will be NUll when scp(micro processor) is hang or crash. Need to > keep kernel works well , so add this patch. OK, I think this should be stated in the commit log, and also in the code (see below). > > Best Regards, > Yunfei Dong >>> diff --git a/drivers/media/platform/mediatek/vcodec/vdec_vpu_if.c >>> b/drivers/media/platform/mediatek/vcodec/vdec_vpu_if.c >>> index 35f4d5583084..1041dd663e76 100644 >>> --- a/drivers/media/platform/mediatek/vcodec/vdec_vpu_if.c >>> +++ b/drivers/media/platform/mediatek/vcodec/vdec_vpu_if.c >>> @@ -91,6 +91,11 @@ static void vpu_dec_ipi_handler(void *data, >>> unsigned int len, void *priv) >>> struct vdec_vpu_inst *vpu = (struct vdec_vpu_inst *) >>> (unsigned long)msg- >>>> ap_inst_addr; >>> >>> + if (!vpu) { >>> + mtk_v4l2_err("ap_inst_addr is NULL"); E.g., either add a comment here or perhaps change the error message to: "ap_inst_addr is NULL, did the SCP hang?" Or something along those lines. Shouldn't there be a \n at the end of this message as well? Or does mtk_v4l2_err add that? Regards, Hans >>> + return; >>> + } >>> + >>> mtk_vcodec_debug(vpu, "+ id=%X", msg->msg_id); >>> >>> vpu->failure = msg->status; > _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 E4059C433EF for ; Wed, 18 May 2022 11:39:24 +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:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=eC+jfew48LrJTjfTgFTSGFkdCz8vkvzHJnH5+7VHKgQ=; b=OYF8axgshoAU9f 03u+wxebKuBVLZdJVqf4tzyScZShJNtkCrV8w5hrnDfBPkWemveuJ+dynhivFrGYdSTiXYOseX9tZ Y6oPdsRIoWh5yD/Y88zxYKpdbhirJFnZ4tEJHyT9PBcPWxYT6Kw5vBoKoi3rQ0ZyJ4PGcCXAtU9rg hREk6lHAlXmTui8daQs36ubZcusILpu+4YVpC0sepNFXFrbfOpQQedv9Coi9UMyaByOETVy0LbBGi O9d2wRDeRJBrojsWB7cPu5n7JtBtAH4xpzVRe+ERDwQ2zFcVI29w6F8sUS2N+FQLneVErK9SdQXdT QCaJhJcGXLxYEngzJZDQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nrI0N-001c1C-NF; Wed, 18 May 2022 11:38:16 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nrHwb-001Zqy-5b; Wed, 18 May 2022 11:34:22 +0000 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 dfw.source.kernel.org (Postfix) with ESMTPS id 552F960C94; Wed, 18 May 2022 11:34:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 41CA7C385A5; Wed, 18 May 2022 11:34:15 +0000 (UTC) Message-ID: <31992c67-400e-8e14-38c2-4655995886f5@xs4all.nl> Date: Wed, 18 May 2022 13:34:13 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH v6, 6/7] media: mediatek: vcodec: prevent kernel crash when scp ipi timeout Content-Language: en-US To: "yunfei.dong@mediatek.com" , Alexandre Courbot , Nicolas Dufresne , AngeloGioacchino Del Regno , Benjamin Gaignard , Tiffany Lin , Andrew-CT Chen , Mauro Carvalho Chehab , Rob Herring , Matthias Brugger , Tomasz Figa Cc: George Sun , Xiaoyong Lu , Hsin-Yi Wang , Fritz Koenig , Daniel Vetter , dri-devel , Irui Wang , Steve Cho , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Project_Global_Chrome_Upstream_Group@mediatek.com References: <20220513092526.9670-1-yunfei.dong@mediatek.com> <20220513092526.9670-7-yunfei.dong@mediatek.com> From: Hans Verkuil In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220518_043421_367311_D72721B6 X-CRM114-Status: GOOD ( 23.30 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 5/18/22 13:29, yunfei.dong@mediatek.com wrote: > Dear Hans, > > Thanks for your review. > On Wed, 2022-05-18 at 11:37 +0200, Hans Verkuil wrote: >> Hi Yunfei, >> >> On 5/13/22 11:25, Yunfei Dong wrote: >>> When SCP timeout during playing video, kernel crashes with >>> following >>> message. It's caused by accessing NULL pointer in >>> vpu_dec_ipi_handler. >>> This patch doesn't solve the root cause of NULL pointer, but merely >>> prevent kernel crashed when encounter the NULL pointer. >> >> Is the root cause being addressed as well? Where is the root cause? >> Is it >> in this driver or in the scp (i.e. the remoteproc) driver? >> >> I need a bit more information to decide whether this series is ready >> to >> be merged for 5.20 or not. >> >> Regards, >> >> Hans >> > Vpu will be NUll when scp(micro processor) is hang or crash. Need to > keep kernel works well , so add this patch. OK, I think this should be stated in the commit log, and also in the code (see below). > > Best Regards, > Yunfei Dong >>> diff --git a/drivers/media/platform/mediatek/vcodec/vdec_vpu_if.c >>> b/drivers/media/platform/mediatek/vcodec/vdec_vpu_if.c >>> index 35f4d5583084..1041dd663e76 100644 >>> --- a/drivers/media/platform/mediatek/vcodec/vdec_vpu_if.c >>> +++ b/drivers/media/platform/mediatek/vcodec/vdec_vpu_if.c >>> @@ -91,6 +91,11 @@ static void vpu_dec_ipi_handler(void *data, >>> unsigned int len, void *priv) >>> struct vdec_vpu_inst *vpu = (struct vdec_vpu_inst *) >>> (unsigned long)msg- >>>> ap_inst_addr; >>> >>> + if (!vpu) { >>> + mtk_v4l2_err("ap_inst_addr is NULL"); E.g., either add a comment here or perhaps change the error message to: "ap_inst_addr is NULL, did the SCP hang?" Or something along those lines. Shouldn't there be a \n at the end of this message as well? Or does mtk_v4l2_err add that? Regards, Hans >>> + return; >>> + } >>> + >>> mtk_vcodec_debug(vpu, "+ id=%X", msg->msg_id); >>> >>> vpu->failure = msg->status; > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel