From nobody Sun Sep 14 22:52:48 2025 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 08D06C6FA82 for ; Tue, 13 Sep 2022 14:32:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234064AbiIMOcK (ORCPT ); Tue, 13 Sep 2022 10:32:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233776AbiIMO3t (ORCPT ); Tue, 13 Sep 2022 10:29:49 -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 707DD6A49B; Tue, 13 Sep 2022 07:18:48 -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 BED49B80FA6; Tue, 13 Sep 2022 14:17:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 34613C433C1; Tue, 13 Sep 2022 14:17:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663078674; bh=EAJCYjhkJNORUUDynnZRYb9oNFCXK83WLB1Yzw2xubg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=txkdR64NRg0h8ncG7Ehf9J3DEVyW8tFhA7IwqgoRQLJiiGGZku0LQJbZUUECz6B/F eHjTGYjTWlKI8RvCtg8ilYHot19cfxFJ/NXtcjGNZQO/LFdGf88iuxVGU2nmobw5Eo YVt60bAd2yIDhetgLqiqkyVjGI32PxY0RForgSu0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Candice Li , Hawking Zhang , Alex Deucher , Sasha Levin Subject: [PATCH 5.15 012/121] drm/amdgpu: Check num_gfx_rings for gfx v9_0 rb setup. Date: Tue, 13 Sep 2022 16:03:23 +0200 Message-Id: <20220913140357.858242921@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220913140357.323297659@linuxfoundation.org> References: <20220913140357.323297659@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Candice Li [ Upstream commit c351938350ab9b5e978dede2c321da43de7eb70c ] No need to set up rb when no gfx rings. Signed-off-by: Candice Li Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/am= dgpu/gfx_v9_0.c index db27fcf87cd04..16cbae04078ad 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c @@ -2624,7 +2624,8 @@ static void gfx_v9_0_constants_init(struct amdgpu_dev= ice *adev) =20 gfx_v9_0_tiling_mode_table_init(adev); =20 - gfx_v9_0_setup_rb(adev); + if (adev->gfx.num_gfx_rings) + gfx_v9_0_setup_rb(adev); gfx_v9_0_get_cu_info(adev, &adev->gfx.cu_info); adev->gfx.config.db_debug2 =3D RREG32_SOC15(GC, 0, mmDB_DEBUG2); =20 --=20 2.35.1