Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp3116222pxm; Mon, 28 Feb 2022 12:21:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJxrEyw/jSVvBLLv8kLu1MPioE1K533uyj4rG98GaGO0Wm39IASvmjlDQahMM5SWIgdnmVZB X-Received: by 2002:a17:90b:4c02:b0:1bc:89f1:c864 with SMTP id na2-20020a17090b4c0200b001bc89f1c864mr18410770pjb.100.1646079696889; Mon, 28 Feb 2022 12:21:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646079696; cv=none; d=google.com; s=arc-20160816; b=0mtZp4NJNEAbz0q9qW1pzgYFfBzeefIyduZqGidzk1gnLUaVmdiiHvtHZm/KqLdbvz XpPDCjPqyMovw8nIc69UsJKUNVPSnQQswja6/CzI9wtqRtKewjMhhLHZ4SCZgz8WQP5C 16KVfEmktx4wdx0f7XYT0go25+K/57r6KKWzl8NANU4Om0NE8Kc9Wud4NLCEmOddkF3C qIqx1BtGR4gthKSjjuxkESESWHmsSuk7Tk+XfojQiLGZD5/hjgzULukJG8f6rWDHGAx6 C10jvNN/42Bf8KR+3Ox1XmORR5mAkTnz6D0ikcxiiJrTnWvwjysudUxtXvnlu4L4Ml35 e0Sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Q64wU0gjLzQt4u8Bj6UxzifgUgkKwJe0e7stLxTp7Y4=; b=R6ZHMi7MEwj5j1sWHznu7TZ3OIjV3/MlxgkDL/GkO5YuOfK5b4Kv9eM9mlA/MSeMgi PRge14sASp6AUiPmGrHwo8EVPkld7zJVsiKf0IX0RtGLpHSmsEziAcs4S5psxx0Q9d8p yYAysLQ3ok5KpnuuAJxqqBeisHQunoYxWXvhHm3BY/xkSTX4cavot/VgM12Lhzaf0Tqq LHMEqbYQOCB0K0h4FQu/zG+X9QUkz+H9fshBnXAB8md/o7AF9YAS+fA36Z0PtNq3KKO+ QI5ObRcyNBKu2hphaI3s8KqLdUJ60XSbj5uPvJjap3tjgYyBNP3bGz3wvyUrE2NKI9ma j56w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lb4sSgQU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id c8-20020a654208000000b003755b0a3aa1si11242141pgq.706.2022.02.28.12.21.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Feb 2022 12:21:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lb4sSgQU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 033D11BAF38; Mon, 28 Feb 2022 11:41:11 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237876AbiB1SGE (ORCPT + 99 others); Mon, 28 Feb 2022 13:06:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239394AbiB1R7u (ORCPT ); Mon, 28 Feb 2022 12:59:50 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20AA08A6CA; Mon, 28 Feb 2022 09:45:26 -0800 (PST) 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 48967B81187; Mon, 28 Feb 2022 17:45:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8C004C340E7; Mon, 28 Feb 2022 17:45:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1646070316; bh=H4bCPBLG7fxRFwWOWxzj2fIKxJazT6R4qsz8GJmb+dM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lb4sSgQUePDMlFCeBIgJo7eujLZPo0ig1hLaL9U/CdzxKi/4OB5Z3K+4so5WmOs1D er6qbYKGEXJfKrmGxg9OxOvqabdixP6Kc2p71ETOx5/QDyeMZchZwL+CeoRy2NL5KL 2yRrd1i21yQLI4ynsee4fUwPGX65QNhtaAkJ2Wxg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Evan Quan , Alex Deucher Subject: [PATCH 5.16 018/164] drm/amd/pm: fix some OEM SKU specific stability issues Date: Mon, 28 Feb 2022 18:23:00 +0100 Message-Id: <20220228172401.592173123@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220228172359.567256961@linuxfoundation.org> References: <20220228172359.567256961@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 From: Evan Quan commit e3f3824874da78db5775a5cb9c0970cd1c6978bc upstream. Add a quirk in sienna_cichlid_ppt.c to fix some OEM SKU specific stability issues. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 32 +++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c @@ -418,6 +418,36 @@ static int sienna_cichlid_store_powerpla return 0; } +static int sienna_cichlid_patch_pptable_quirk(struct smu_context *smu) +{ + struct amdgpu_device *adev = smu->adev; + uint32_t *board_reserved; + uint16_t *freq_table_gfx; + uint32_t i; + + /* Fix some OEM SKU specific stability issues */ + GET_PPTABLE_MEMBER(BoardReserved, &board_reserved); + if ((adev->pdev->device == 0x73DF) && + (adev->pdev->revision == 0XC3) && + (adev->pdev->subsystem_device == 0x16C2) && + (adev->pdev->subsystem_vendor == 0x1043)) + board_reserved[0] = 1387; + + GET_PPTABLE_MEMBER(FreqTableGfx, &freq_table_gfx); + if ((adev->pdev->device == 0x73DF) && + (adev->pdev->revision == 0XC3) && + ((adev->pdev->subsystem_device == 0x16C2) || + (adev->pdev->subsystem_device == 0x133C)) && + (adev->pdev->subsystem_vendor == 0x1043)) { + for (i = 0; i < NUM_GFXCLK_DPM_LEVELS; i++) { + if (freq_table_gfx[i] > 2500) + freq_table_gfx[i] = 2500; + } + } + + return 0; +} + static int sienna_cichlid_setup_pptable(struct smu_context *smu) { int ret = 0; @@ -438,7 +468,7 @@ static int sienna_cichlid_setup_pptable( if (ret) return ret; - return ret; + return sienna_cichlid_patch_pptable_quirk(smu); } static int sienna_cichlid_tables_init(struct smu_context *smu)