Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp314843rwb; Fri, 18 Nov 2022 01:41:15 -0800 (PST) X-Google-Smtp-Source: AA0mqf6M1m2SqChTpndBJR6WC66O9ogbiJSZBT7lEILz0A9Q2C549sSJT8VpQxGSsY0iTKiVzAWs X-Received: by 2002:a17:902:bd98:b0:187:1b89:52da with SMTP id q24-20020a170902bd9800b001871b8952damr6725673pls.172.1668764474747; Fri, 18 Nov 2022 01:41:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668764474; cv=none; d=google.com; s=arc-20160816; b=N3NUVRtjk+gGP7e0Dqt9IHMyFkKxCytZKeut3zLt2xlTVQ/elZWdabquSvJTGVKSeW V0pWYe2xRHMQNCfL934OyBzpZLg0oF2l6ZBp4P3WjcyimrPWAY2UAveT3IDjO9wmk9AX fNX2HgAemyOgn4gIJH6FmrTHnFQIVRx3J+ryfJwScnFexASXJVjGgslOYiaYqLzYunoV d2Rj1CvCl2rdeZl/z9EduPz1cAb7i96z0kN+qbWboM2/vj70vh5RAUIRJEoLvSjAljQR LWKN/LQ54nSnnn6U1mCB0Yr292G1YnHBn+VpXg5QKUFXJWhSMCYAtb7kIF61n7m6JQTh pc5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=YWmN9hp02E/vlQ5ELAvlPu6+1CNwPrDJDFykEsoo17k=; b=gQ2KGDF6kvspQQ+XEESA+lylbHavabfyWhEvPby7It2XBjwMjdl174/ldJAqkTji2E 1Ce+oeGy9DzfArgkUOlA7JBBP205yw3omwnky4wUE9AQZK4vWlqIDqLAhkxcZxSwukjM D2sOEuK9KFv070tHTP2aUwdK6s1O0fX2gsSUAdoqFNRqTyIsk8nwPJaIgchgW7ely5Jp GP2AC0l9Au4GekJqGy3CUc3qdPyZ1itVeiE0be4EkgRqcuHBLEp3s7Vg1smxixC+Yvk1 W/3eEA2YPiHGIyy1jx0RBF9IWd+prTgsHv+tcECAnaNLPL5Ubu7El/T8wWGjXnduvkJb IOJg== ARC-Authentication-Results: i=1; mx.google.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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f12-20020a170902684c00b00188f9534a59si2251461pln.306.2022.11.18.01.41.02; Fri, 18 Nov 2022 01:41:14 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241621AbiKRJY6 (ORCPT + 91 others); Fri, 18 Nov 2022 04:24:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229620AbiKRJY5 (ORCPT ); Fri, 18 Nov 2022 04:24:57 -0500 Received: from mailgw.kylinos.cn (unknown [124.126.103.232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93E4113D28 for ; Fri, 18 Nov 2022 01:24:55 -0800 (PST) X-UUID: 65a0b4b390194fa38cb937c4cbeeb3a9-20221118 X-CPASD-INFO: a30bbf889eb14895b776f333e9c9069e@qoNqgo-YZmhlhaR9g3uEb4JoZ2aWX1O Cp3ODaV5mZYWVhH5xTV5uYFV9fWtVYV9dYVR6eGxQYmBgZFJ4i3-XblBgXoZgUZB3sHVqgpKUaA== X-CLOUD-ID: a30bbf889eb14895b776f333e9c9069e X-CPASD-SUMMARY: SIP:-1,APTIP:-2.0,KEY:0.0,FROMBLOCK:1,OB:0.0,URL:-5,TVAL:181. 0,ESV:0.0,ECOM:-5.0,ML:0.0,FD:0.0,CUTS:192.0,IP:-2.0,MAL:-5.0,PHF:-5.0,PHC:-5 .0,SPF:4.0,EDMS:-5,IPLABEL:4480.0,FROMTO:0,AD:0,FFOB:0.0,CFOB:0.0,SPC:0,SIG:- 5,AUF:7,DUF:8753,ACD:145,DCD:145,SL:0,EISP:0,AG:0,CFC:0.75,CFSR:0.034,UAT:0,R AF:2,IMG:-5.0,DFA:0,DTA:0,IBL:-2.0,ADI:-5,SBL:0,REDM:0,REIP:0,ESB:0,ATTNUM:0, EAF:0,CID:-5.0,VERSION:2.3.17 X-CPASD-ID: 65a0b4b390194fa38cb937c4cbeeb3a9-20221118 X-CPASD-BLOCK: 1000 X-CPASD-STAGE: 1 X-UUID: 65a0b4b390194fa38cb937c4cbeeb3a9-20221118 X-User: lizhenneng@kylinos.cn Received: from [172.20.124.41] [(116.128.244.169)] by mailgw (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 128/128) with ESMTP id 1399027987; Fri, 18 Nov 2022 17:25:13 +0800 Message-ID: <4adc40d1-e775-c480-bb35-23fe9c63e05e@kylinos.cn> Date: Fri, 18 Nov 2022 17:24:49 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH] drm/amdgpu: add mb for si To: =?UTF-8?Q?Michel_D=c3=a4nzer?= , =?UTF-8?Q?Christian_K=c3=b6nig?= , Alex Deucher Cc: Xinhui.Pan@amd.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org References: <20221118074810.380368-1-lizhenneng@kylinos.cn> <800a1207-8ff6-4cfa-60f3-6ff456874890@mailbox.org> From: =?UTF-8?B?5p2O55yf6IO9?= In-Reply-To: <800a1207-8ff6-4cfa-60f3-6ff456874890@mailbox.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, PDS_RDNS_DYNAMIC_FP,RDNS_DYNAMIC,SPF_HELO_NONE,SPF_PASS autolearn=no 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 在 2022/11/18 17:18, Michel Dänzer 写道: > On 11/18/22 09:01, Christian König wrote: >> Am 18.11.22 um 08:48 schrieb Zhenneng Li: >>> During reboot test on arm64 platform, it may failure on boot, >>> so add this mb in smc. >>> >>> The error message are as follows: >>> [    6.996395][ 7] [  T295] [drm:amdgpu_device_ip_late_init [amdgpu]] *ERROR* >>>                 late_init of IP block failed -22 >>> [    7.006919][ 7] [  T295] amdgpu 0000:04:00.0: amdgpu_device_ip_late_init failed >>> [    7.014224][ 7] [  T295] amdgpu 0000:04:00.0: Fatal error during GPU init >> Memory barries are not supposed to be sprinkled around like this, you need to give a detailed explanation why this is necessary. >> >> Regards, >> Christian. >> >>> Signed-off-by: Zhenneng Li >>> --- >>>   drivers/gpu/drm/amd/pm/legacy-dpm/si_smc.c | 2 ++ >>>   1 file changed, 2 insertions(+) >>> >>> diff --git a/drivers/gpu/drm/amd/pm/legacy-dpm/si_smc.c b/drivers/gpu/drm/amd/pm/legacy-dpm/si_smc.c >>> index 8f994ffa9cd1..c7656f22278d 100644 >>> --- a/drivers/gpu/drm/amd/pm/legacy-dpm/si_smc.c >>> +++ b/drivers/gpu/drm/amd/pm/legacy-dpm/si_smc.c >>> @@ -155,6 +155,8 @@ bool amdgpu_si_is_smc_running(struct amdgpu_device *adev) >>>       u32 rst = RREG32_SMC(SMC_SYSCON_RESET_CNTL); >>>       u32 clk = RREG32_SMC(SMC_SYSCON_CLOCK_CNTL_0); >>>   +    mb(); >>> + >>>       if (!(rst & RST_REG) && !(clk & CK_DISABLE)) >>>           return true; > In particular, it makes no sense in this specific place, since it cannot directly affect the values of rst & clk. I thinks so too. But when I do reboot test using nine desktop machines,  there maybe report this error on one or two machines after Hundreds of times or Thousands of times reboot test, at the beginning, I use msleep() instead of mb(), these two methods are all works, but I don't know what is the root case. I use this method on other verdor's oland card, this error message are reported again. What could be the root reason? test environmen: graphics card: OLAND 0x1002:0x6611 0x1642:0x1869 0x87 driver: amdgpu os: ubuntu 2004 platform: arm64 kernel: 5.4.18 >