Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp3109522pxm; Mon, 28 Feb 2022 12:12:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJyHi0ISabfZzOnrLwqzJorqKGFndYZiI6LtLMjvIuhl7s9piDzeFd9WyOJNGoL5xAgTdOFl X-Received: by 2002:a05:6a00:1747:b0:4f3:e449:4416 with SMTP id j7-20020a056a00174700b004f3e4494416mr15088536pfc.5.1646079127617; Mon, 28 Feb 2022 12:12:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646079127; cv=none; d=google.com; s=arc-20160816; b=n837UiT4d4AJInQHGvlqE1l3wkZRdijihIXvQMBECoWUVuS4cSqOnHBzx8Bf59VX/L 8mRpSOjCHW5vRP35Tp2NcLsSYtOO+NmvC8NtFLtv23YjIVmUNl9z8VAR37NvUJfIsJhy F2rWh1HEH87rHlhUo7ieFKumrv6CAhfziR33+m0pHBA9zTvu+Qog/Ni0ZqYViyoMAK2i /Rd24ZR49QpE+bS2ASMASqYk4OLwUDxtJi/4zjCMLEfTJ8lM4xNx/7UIR51U8cajqvbT uB3wbbUaOywuxeLulDoNyzlzhDPI2DEKXm+ruvfSel/R3HnbxlPnWI2Ehw3nZqH+pfR8 9q4w== 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=eafCBs1SjMyRBqThc1UN0CvAPA0gbmaN36rcGhRMsZImwM8BdW9zkDa5WDFMtYBU91 VUsQJMAbxNPxJAUIEVQFlS+nU+rHt2ynRvf77dJgY0qp5djgkwaNeatwZS3z3iboP5T1 uEQgs/IWKWE3xufYeFDs8FkJYjxIM57qoH3yQpRupBmNMRZF/qIVrxH/11EQwOaV2DGI gnU12IGcUprOzPX7xsFzBP6qjqhylJ1y0RG5uf8RBbAwGmnmvaW+cw2WaFKCkPJuF4xS 5Vk1GbEmI80pJAmyuY5UHwhoQSZBtgjbYHk3gJlxNtBe+RUCILyAh4Tu0RzX4J1dfFz2 nucg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2YXX8ZKZ; 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 u2-20020a170902714200b0014f9a7c7ce0si10218598plm.307.2022.02.28.12.12.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Feb 2022 12:12:07 -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=2YXX8ZKZ; 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 C6473157214; Mon, 28 Feb 2022 11:35:23 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239405AbiB1RxB (ORCPT + 99 others); Mon, 28 Feb 2022 12:53:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238858AbiB1Rrq (ORCPT ); Mon, 28 Feb 2022 12:47:46 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08D329F3BD; Mon, 28 Feb 2022 09:38:14 -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 9D83DB815BE; Mon, 28 Feb 2022 17:38:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E8EFCC340E7; Mon, 28 Feb 2022 17:38:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1646069891; bh=H4bCPBLG7fxRFwWOWxzj2fIKxJazT6R4qsz8GJmb+dM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2YXX8ZKZfkFYIZ+JmwuBmJuGYJ2kKJB/EvXKW1m4YVj0KNRxixZYP/GdZG/UOgyZt RO8CDc5vXzYlER5eYxAICipDc8rX02d2elcb/l9MAmEcdfQevBj1PjBxY1Z8rvQzFv bPDs6h4bWml2CJaO4Jw4TjSuCrHeJ7hypT6hsT4E= 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.15 016/139] drm/amd/pm: fix some OEM SKU specific stability issues Date: Mon, 28 Feb 2022 18:23:10 +0100 Message-Id: <20220228172349.397553169@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220228172347.614588246@linuxfoundation.org> References: <20220228172347.614588246@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)