Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp316870rwb; Fri, 18 Nov 2022 01:43:19 -0800 (PST) X-Google-Smtp-Source: AA0mqf5WkMmF+UpuWeRS4zkCSUNdiORG3b4Lia9328omo0/WZKxO9SGOnZgf9va0GWvPqGsAi6kI X-Received: by 2002:a17:902:b68c:b0:186:8bd9:eca3 with SMTP id c12-20020a170902b68c00b001868bd9eca3mr7004261pls.0.1668764598911; Fri, 18 Nov 2022 01:43:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668764598; cv=none; d=google.com; s=arc-20160816; b=ohVtjONdNHX6sw/OWvsOiIW7BXMAIVSkIXWGAiQivoGZRAKXEN/sbMrlZsUj9LKIof Fz+4Qu/EydNfISsszBAyKI1fbY86U/tq7cUZYAjY2EGn5YJH3NLMgwdvZwaGwIsNlmmW GRm6hHWUQLo6jJEJxNWLRsiv+cbk3x1C2eG67/YLo15tVp7emBpgbrkkEPBsIY0jjC1O 3l31vY9a8CYQBvBXaY/ckbgZO9WA8gIfsIksTktsHcZrJy1sW8+cEk1oCpGjaJ2CWruB 2kpy5KpqScndBY7ULAmsmIVi9e+8YMeFPYaIToRalERYSEJkC7YruHeNl3BetXZXVLy3 NHNg== 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:content-language:subject:mime-version:date :message-id:dkim-signature; bh=lTdyYev7Ss9teMBT/XBdYBNta7QNMGTiSYism0OihVU=; b=vSNjUAfEEnP6LOxEBTYBqV3ZjJWUF4BjiCSLEL1h0YL2TSFrzVh/cjVPHvtv2IDFX7 f7sIO3epWjBA4Edw11Gqe65iV4faai8g6qJ+hU68jf8UAfV35H+xLjGlYnYJqxS3foRk p+WX+Q9Y+wUADgkOp/Fjp0QSJMyLzVljqdpfxtH318oC7NcXLKNB2Gce2WQTCqJW3vhN sTltN9IGAzVYLCB0vVVXhkCr+yoFu2eIAgyEfSGCYn9CfQPWJ3bnTiYSGWvyY4BfdViq IuLnt6tyJnykt2glrn9favcLD4EYRUYxiEwG/rUREFVGW6MABm+GLA9i7fuSRgq935y6 0Riw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailbox.org header.s=mail20150812 header.b=K4iIv+pZ; 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=REJECT sp=REJECT dis=NONE) header.from=mailbox.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i9-20020a170902cf0900b00186c3afe179si3288057plg.422.2022.11.18.01.43.06; Fri, 18 Nov 2022 01:43:18 -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; dkim=pass header.i=@mailbox.org header.s=mail20150812 header.b=K4iIv+pZ; 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=REJECT sp=REJECT dis=NONE) header.from=mailbox.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241882AbiKRJTA (ORCPT + 91 others); Fri, 18 Nov 2022 04:19:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241876AbiKRJS3 (ORCPT ); Fri, 18 Nov 2022 04:18:29 -0500 Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [80.241.56.152]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FFD9419B8 for ; Fri, 18 Nov 2022 01:18:23 -0800 (PST) Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4NDB606Phzz9skf; Fri, 18 Nov 2022 10:18:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1668763096; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lTdyYev7Ss9teMBT/XBdYBNta7QNMGTiSYism0OihVU=; b=K4iIv+pZTFwX+LEDRaLRHyjsgcD4KeBvR0ua48NOL0K5wqITYyjnjgNxRis4zmvj7lI5WQ tKQ/qV08YGd+MwUdViZ892ZR6tyNTo/TeaSnzkcXCI7Baa2CvAjAvVxCN1ebiQ66okaEL0 WQXhuqP6Wxiq6m16KKL3Hbo1oOKlKducPVYjbF3EwAZH2zVR+Y4ClR79JKcojy2eakDzzb PCJzbJrb5EKfuHr2kjQYiMoI0Tc8rHhiJBVsG4VJJoX3aNmuVRcYqfLvAhvHFmEOWjWmFz cmTdNo7oTXxjP8RKYYjFKvyrmoLYtpJ5bZFIqEJsqr0d8NlhrQVRW/yBBc5E6A== Message-ID: <800a1207-8ff6-4cfa-60f3-6ff456874890@mailbox.org> Date: Fri, 18 Nov 2022 10:18:14 +0100 MIME-Version: 1.0 Subject: Re: [PATCH] drm/amdgpu: add mb for si Content-Language: de-CH-frami, en-CA To: =?UTF-8?Q?Christian_K=c3=b6nig?= , Zhenneng Li , 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> From: =?UTF-8?Q?Michel_D=c3=a4nzer?= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-MBO-RS-META: 1afyttkaptk1qh7bss3ey8wa78i7z3af X-MBO-RS-ID: 4afc4dcc6c7cfafea96 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS 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 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. -- Earthling Michel Dänzer | https://redhat.com Libre software enthusiast | Mesa and Xwayland developer