From nobody Thu Sep 4 03:33:50 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 8A260C6FA89 for ; Tue, 13 Sep 2022 15:12:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235517AbiIMPME (ORCPT ); Tue, 13 Sep 2022 11:12:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235537AbiIMPKX (ORCPT ); Tue, 13 Sep 2022 11:10:23 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 824B477EBE; Tue, 13 Sep 2022 07:32:14 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 7F785614D9; Tue, 13 Sep 2022 14:31:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 99971C433D6; Tue, 13 Sep 2022 14:31:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663079496; bh=57IC6E6AX7usppRwB0rZ/Wdn5wt79iBpTKmZzSEOBwM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GrhttD+ujXMO/0HjDr6Fh3dHyG1UGQlYhNPV0RYhCvl8w/OBai9WlcM2nbr7trlDd R6EY2clj4ccs+iDEjR7OKX4QoBoxFpOfLvy3DfG0+9G4ENYQL8w3UQqUqU5+yIcbn+ Tj7q1Q/vnbfYTw/i2DGjsag4t1uz5jgS2aOc0J64= 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 4.19 49/79] drm/amdgpu: Check num_gfx_rings for gfx v9_0 rb setup. Date: Tue, 13 Sep 2022 16:07:07 +0200 Message-Id: <20220913140351.265139694@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220913140348.835121645@linuxfoundation.org> References: <20220913140348.835121645@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 d8ae6a23e6133..d36bea68a67e1 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c @@ -1771,7 +1771,8 @@ static void gfx_v9_0_gpu_init(struct amdgpu_device *a= dev) =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