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 X-Spam-Level: X-Spam-Status: No, score=-14.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 55189C47094 for ; Thu, 10 Jun 2021 13:07:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 29F62610A7 for ; Thu, 10 Jun 2021 13:07:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230301AbhFJNJe (ORCPT ); Thu, 10 Jun 2021 09:09:34 -0400 Received: from m12-16.163.com ([220.181.12.16]:36848 "EHLO m12-16.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229941AbhFJNJd (ORCPT ); Thu, 10 Jun 2021 09:09:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=Date:From:Subject:Message-ID:MIME-Version; bh=pxC9E nxMVqs3LNT5sCWptjPiO5xu1I0lUTky1QGVIPY=; b=Kh8KROiIp4LmblfzwQlLs 1c0TY2psTDLStnV0z1F7u5W3/O+zNLxFAmF4rkaiJtMNRYYoo22OaMZ2QajWKdQg 4NBk9e87gt4n8ASRkoGTQPn/6bDkG2p5cFgxjQpyDXQcbfSOxUGrQXN80d/s20I5 LX31UBlCM8NAHPXs585vhk= Received: from localhost (unknown [218.17.89.111]) by smtp12 (Coremail) with SMTP id EMCowAD30zpzDsJgPWKXwQ--.45531S2; Thu, 10 Jun 2021 21:07:12 +0800 (CST) Date: Thu, 10 Jun 2021 21:06:59 +0800 From: Chunyou Tang To: Steven Price Cc: robh@kernel.org, tomeu.vizoso@collabora.com, alyssa.rosenzweig@collabora.com, airlied@linux.ie, daniel@ffwll.ch, tangchunyou@icubecorp.cn, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, tangchunyou Subject: Re: [PATCH] modified: gpu/drm/panfrost/panfrost_gpu.c Message-ID: <20210610210659.00003155@163.com> In-Reply-To: <78a2488a-71d5-548a-e221-7786f788509c@arm.com> References: <20210609063850.2060-1-tangchunyou@163.com> <78a2488a-71d5-548a-e221-7786f788509c@arm.com> Organization: icube X-Mailer: Claws Mail 3.10.1 (GTK+ 2.16.6; i586-pc-mingw32msvc) MIME-Version: 1.0 Content-Type: text/plain; charset=GB18030 Content-Transfer-Encoding: 8bit X-CM-TRANSID: EMCowAD30zpzDsJgPWKXwQ--.45531S2 X-Coremail-Antispam: 1Uf129KBjvJXoWxXFyfZr4kKFyDXw48Cr1kuFg_yoW5Gr4fpF yDAFyYyF9YqF1jqa1q93WxKFy5uay8Ja4kW3WDCrZ0yFsIqFn8KwsrKa409FyUurW8Zw12 va1xAry7Wa15Z3DanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jTZX5UUUUU= X-Originating-IP: [218.17.89.111] X-CM-SenderInfo: 5wdqwu5kxq50rx6rljoofrz/1tbiHgCtUVSIvHe1SgAAsK Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Steven, > > The GPU exception fault status register(0x3C),the low 8 bit is the > > EXCEPTION_TYPE.We can see the description at P3-78 in spec. You can see the spec . > However this change is correct - panfrost_exception_name() should be > taking only the lower 8 bits. Even better though would be to to report > the full raw fault information as well as the high bits can contain > useful information: > > dev_warn(pfdev->dev, "GPU Fault 0x%08x (%s) at 0x%016llx\n", > fault_status, > panfrost_exception_name(pfdev, fault_status & 0xFF), > address); So I change it according to what you said? ÓÚ Thu, 10 Jun 2021 11:41:52 +0100 Steven Price дµÀ: > The subject should have the prefix "drm/panfrost" and should mention > what the patch is changing (not just the filename). > > On 09/06/2021 07:38, ChunyouTang wrote: > > From: tangchunyou > > > > The GPU exception fault status register(0x3C),the low 8 bit is the > > EXCEPTION_TYPE.We can see the description at P3-78 in spec. > > Nit: When referring to a spec it's always good to mention the name - > I'm not sure which specification you found this in. > > > > > Signed-off-by: tangchunyou > > --- > > drivers/gpu/drm/panfrost/panfrost_gpu.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/panfrost/panfrost_gpu.c > > b/drivers/gpu/drm/panfrost/panfrost_gpu.c index > > 2aae636f1cf5..1fffb6a0b24f 100644 --- > > a/drivers/gpu/drm/panfrost/panfrost_gpu.c +++ > > b/drivers/gpu/drm/panfrost/panfrost_gpu.c @@ -33,7 +33,7 @@ static > > irqreturn_t panfrost_gpu_irq_handler(int irq, void *data) address > > |= gpu_read(pfdev, GPU_FAULT_ADDRESS_LO); > > dev_warn(pfdev->dev, "GPU Fault 0x%08x (%s) at > > 0x%016llx\n", > > - fault_status & 0xFF, > > panfrost_exception_name(pfdev, fault_status), > > + fault_status & 0xFF, > > panfrost_exception_name(pfdev, fault_status & 0xFF), > > However this change is correct - panfrost_exception_name() should be > taking only the lower 8 bits. Even better though would be to to report > the full raw fault information as well as the high bits can contain > useful information: > > dev_warn(pfdev->dev, "GPU Fault 0x%08x (%s) at 0x%016llx\n", > fault_status, > panfrost_exception_name(pfdev, fault_status & 0xFF), > address); > > Thanks, > > Steve > > > address); > > > > if (state & GPU_IRQ_MULTIPLE_FAULT) > > 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 X-Spam-Level: X-Spam-Status: No, score=-14.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93BDBC47094 for ; Thu, 10 Jun 2021 13:07:36 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 16AB6613C9 for ; Thu, 10 Jun 2021 13:07:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 16AB6613C9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=163.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5FD886E090; Thu, 10 Jun 2021 13:07:35 +0000 (UTC) Received: from m12-16.163.com (m12-16.163.com [220.181.12.16]) by gabe.freedesktop.org (Postfix) with ESMTP id 511826E090 for ; Thu, 10 Jun 2021 13:07:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=Date:From:Subject:Message-ID:MIME-Version; bh=pxC9E nxMVqs3LNT5sCWptjPiO5xu1I0lUTky1QGVIPY=; b=Kh8KROiIp4LmblfzwQlLs 1c0TY2psTDLStnV0z1F7u5W3/O+zNLxFAmF4rkaiJtMNRYYoo22OaMZ2QajWKdQg 4NBk9e87gt4n8ASRkoGTQPn/6bDkG2p5cFgxjQpyDXQcbfSOxUGrQXN80d/s20I5 LX31UBlCM8NAHPXs585vhk= Received: from localhost (unknown [218.17.89.111]) by smtp12 (Coremail) with SMTP id EMCowAD30zpzDsJgPWKXwQ--.45531S2; Thu, 10 Jun 2021 21:07:12 +0800 (CST) Date: Thu, 10 Jun 2021 21:06:59 +0800 From: Chunyou Tang To: Steven Price Subject: Re: [PATCH] modified: gpu/drm/panfrost/panfrost_gpu.c Message-ID: <20210610210659.00003155@163.com> In-Reply-To: <78a2488a-71d5-548a-e221-7786f788509c@arm.com> References: <20210609063850.2060-1-tangchunyou@163.com> <78a2488a-71d5-548a-e221-7786f788509c@arm.com> Organization: icube X-Mailer: Claws Mail 3.10.1 (GTK+ 2.16.6; i586-pc-mingw32msvc) MIME-Version: 1.0 Content-Type: text/plain; charset=GB18030 Content-Transfer-Encoding: 8bit X-CM-TRANSID: EMCowAD30zpzDsJgPWKXwQ--.45531S2 X-Coremail-Antispam: 1Uf129KBjvJXoWxXFyfZr4kKFyDXw48Cr1kuFg_yoW5Gr4fpF yDAFyYyF9YqF1jqa1q93WxKFy5uay8Ja4kW3WDCrZ0yFsIqFn8KwsrKa409FyUurW8Zw12 va1xAry7Wa15Z3DanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jTZX5UUUUU= X-Originating-IP: [218.17.89.111] X-CM-SenderInfo: 5wdqwu5kxq50rx6rljoofrz/1tbiHgCtUVSIvHe1SgAAsK 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: tangchunyou , tomeu.vizoso@collabora.com, airlied@linux.ie, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, alyssa.rosenzweig@collabora.com, tangchunyou@icubecorp.cn Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Steven, > > The GPU exception fault status register(0x3C),the low 8 bit is the > > EXCEPTION_TYPE.We can see the description at P3-78 in spec. You can see the spec . > However this change is correct - panfrost_exception_name() should be > taking only the lower 8 bits. Even better though would be to to report > the full raw fault information as well as the high bits can contain > useful information: > > dev_warn(pfdev->dev, "GPU Fault 0x%08x (%s) at 0x%016llx\n", > fault_status, > panfrost_exception_name(pfdev, fault_status & 0xFF), > address); So I change it according to what you said? ÓÚ Thu, 10 Jun 2021 11:41:52 +0100 Steven Price дµÀ: > The subject should have the prefix "drm/panfrost" and should mention > what the patch is changing (not just the filename). > > On 09/06/2021 07:38, ChunyouTang wrote: > > From: tangchunyou > > > > The GPU exception fault status register(0x3C),the low 8 bit is the > > EXCEPTION_TYPE.We can see the description at P3-78 in spec. > > Nit: When referring to a spec it's always good to mention the name - > I'm not sure which specification you found this in. > > > > > Signed-off-by: tangchunyou > > --- > > drivers/gpu/drm/panfrost/panfrost_gpu.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/panfrost/panfrost_gpu.c > > b/drivers/gpu/drm/panfrost/panfrost_gpu.c index > > 2aae636f1cf5..1fffb6a0b24f 100644 --- > > a/drivers/gpu/drm/panfrost/panfrost_gpu.c +++ > > b/drivers/gpu/drm/panfrost/panfrost_gpu.c @@ -33,7 +33,7 @@ static > > irqreturn_t panfrost_gpu_irq_handler(int irq, void *data) address > > |= gpu_read(pfdev, GPU_FAULT_ADDRESS_LO); > > dev_warn(pfdev->dev, "GPU Fault 0x%08x (%s) at > > 0x%016llx\n", > > - fault_status & 0xFF, > > panfrost_exception_name(pfdev, fault_status), > > + fault_status & 0xFF, > > panfrost_exception_name(pfdev, fault_status & 0xFF), > > However this change is correct - panfrost_exception_name() should be > taking only the lower 8 bits. Even better though would be to to report > the full raw fault information as well as the high bits can contain > useful information: > > dev_warn(pfdev->dev, "GPU Fault 0x%08x (%s) at 0x%016llx\n", > fault_status, > panfrost_exception_name(pfdev, fault_status & 0xFF), > address); > > Thanks, > > Steve > > > address); > > > > if (state & GPU_IRQ_MULTIPLE_FAULT) > >