Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2405386lqp; Sun, 24 Mar 2024 18:10:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU2z+zxF2fFfqz/PGz1k1gsQDLXwTlisacQAPcrZBkAkKnizivqdpaS67+IL8PapYw+LC0n6OJ1QWwzt9cKhwrDJp3iBYDi0kmQVvv4/Q== X-Google-Smtp-Source: AGHT+IH4bLhkXlPL/uYP/spjoTfG2GWIEK5g5Tneu9Bl4T+OAOcnE6egRrxg01PUEsqSH2u5/XOy X-Received: by 2002:a05:6a20:2148:b0:1a3:5d2a:4003 with SMTP id z8-20020a056a20214800b001a35d2a4003mr4101597pzz.49.1711329001028; Sun, 24 Mar 2024 18:10:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711329001; cv=pass; d=google.com; s=arc-20160816; b=KNRth18GPbxRl6DJKUjHz/LiS36+vFp5bc9euj6tlgqQZqBypaRMK8zXe5xLJgHsVA WCdOqKHQOjYqy3OS+VidPOUqnArH4TdEN+TSoe6bXT3224XINR5dg++Ha1si+qdl4eIs jFzdOIlKW6lAr42fvbAyR0LdXqxm+183uJv4M9mYmovDlIMyOG3a9Rd1xm7EwISmqR0t dGTTywgnhv67PLu6rQMz4riVDbEs3MI5H67KXKuXR8oxK+Spyt82Dy0/O32I03z8kYVe 5vVmkICmvzXIW8XR4fDkDWZW82dAdPRQ1Mxq9nK6ZLcFmlz4zCIORujBoJYKDkZVFDQQ uj6w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=tJ64ETd2tgBusXMj7J3sebBMZzMoMA9NPoLz6myNi9Q=; fh=KaWuy+J/rRi1rQFIYzrEytFj80jZ3i/KN22dP5dDnlM=; b=vhBHZ2dgLFgamD7SN3QCdhoiikGOGBohbeNA/Oe+cW4fFcFFXX4x17zcCeAIWbp2Ne MoRYucGdQkwrt3PsWvkn4e80sVYThImio92mYISnjgD4Q96yaPyHT18X4Pgzr9QO0rKT ZSi0McgN/pc3FO854DksS1Q6KX3KgnMZhm2m4KdH4pjTCkJa5YxxfQcs9g6mqe0Dedyq 81O44udJvBU3cDc6y3fPrblFaNLEBSZ3BogPeKflwNwNdAz9aEFU5FgviRGOLg27/SWi XDl8VoohIGrf+5XQ+wuYGdev2XhCnWChVGlixtmvjvx1hwnKFF2ClbmXuDVrACEb8s9G DAXw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BfJ9uSj3; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113588-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113588-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id p11-20020a17090ab90b00b002a040721dc9si5450861pjr.138.2024.03.24.18.10.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 18:10:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113588-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BfJ9uSj3; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113588-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113588-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id B4160284B8F for ; Mon, 25 Mar 2024 01:10:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BF5F11CB694; Sun, 24 Mar 2024 22:46:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BfJ9uSj3" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A65861CB672; Sun, 24 Mar 2024 22:46:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320391; cv=none; b=BcAgevJuCoIn31jvyRQNQMQXzFV3teUMQQxksiNK+0G0XGD6fe2AbCcoqkgGs766M4C0yQ7tzYBgv3PF1JgKHTS4X9ghfWrOLCdES826SlRrpCg92XaCRnkP6/YBcO48K9bQlzqcmLxZ01zwP/+f9qjRozLHZExKM0Vob5Jap2I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320391; c=relaxed/simple; bh=VbR4fQBjLC7Rzjg/ep21s0JziHQ4SL9IpGKzUXBLVfA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Q/+su2rOOz7Cmqi3X2+qCNajl34naRq4gsjw3ZEMXHvu550IifrIcRVh5PrC2RI+uxrGY/P9/7JiWJ21GuxhkFZRxWPJamSpfEoiYvOCRfg0jiyyOl/k+4UtPcjwa7zVgaafKEM/563I4YNjL9Ccbk30Yt3FC7wULVgIuE+rYnk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BfJ9uSj3; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9283BC433B1; Sun, 24 Mar 2024 22:46:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711320391; bh=VbR4fQBjLC7Rzjg/ep21s0JziHQ4SL9IpGKzUXBLVfA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BfJ9uSj3iKg5qCrrLS/ZpCCfBHIucYe784CABv4KZX/CsWEWSVSz0d4tKyutkcxy/ hSzIUkiYxdxYJ7OC1f3tSSaFWrgIVeABlo+ACPyOI87H1dWkpJJUksRdv5J8/70JL7 JuMbmlxSkng9wq9waKcfo4CxAfjdkHpAUFQy9Q/njx+XJKRPEgARW0kJdFAuAkZfEn 5ihzR1z5ZrpgzlOdBp5cC3sVVVAlzP1BkNCSQ4I+BEGVahlyRy5ceKGTwlY+n5x609 FClPCDsgg7/R9HXGO3j0n4/uXOGZ/NKxOEMBOTSFOmR20JsmqaeLD+IWi1jjOFYqfb zqewtez7UIahg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Yifan Zhang , Alex Deucher , Sasha Levin Subject: [PATCH 6.8 697/715] drm/amdgpu: add MMHUB 3.3.1 support Date: Sun, 24 Mar 2024 18:34:36 -0400 Message-ID: <20240324223455.1342824-698-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324223455.1342824-1-sashal@kernel.org> References: <20240324223455.1342824-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Yifan Zhang [ Upstream commit 31e0a586f3385134bcad00d8194eb0728cb1a17d ] This patch to add MMHUB 3.3.1 support. v2: squash in fault info fix (Alex) Signed-off-by: Yifan Zhang Signed-off-by: Alex Deucher Stable-dep-of: 6540ff6482c1 ("drm/amdgpu: fix mmhub client id out-of-bounds access") Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 1 + drivers/gpu/drm/amd/amdgpu/mmhub_v3_3.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c index c9c653cfc765b..3f1692194b7ad 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c @@ -570,6 +570,7 @@ static void gmc_v11_0_set_mmhub_funcs(struct amdgpu_device *adev) adev->mmhub.funcs = &mmhub_v3_0_2_funcs; break; case IP_VERSION(3, 3, 0): + case IP_VERSION(3, 3, 1): adev->mmhub.funcs = &mmhub_v3_3_funcs; break; default: diff --git a/drivers/gpu/drm/amd/amdgpu/mmhub_v3_3.c b/drivers/gpu/drm/amd/amdgpu/mmhub_v3_3.c index dc4812ecc98d6..b3961968c10c4 100644 --- a/drivers/gpu/drm/amd/amdgpu/mmhub_v3_3.c +++ b/drivers/gpu/drm/amd/amdgpu/mmhub_v3_3.c @@ -98,6 +98,7 @@ mmhub_v3_3_print_l2_protection_fault_status(struct amdgpu_device *adev, switch (amdgpu_ip_version(adev, MMHUB_HWIP, 0)) { case IP_VERSION(3, 3, 0): + case IP_VERSION(3, 3, 1): mmhub_cid = mmhub_client_ids_v3_3[cid][rw]; break; default: -- 2.43.0