From patchwork Tue Nov 3 16:28:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 317249 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 20AE4C388F7 for ; Tue, 3 Nov 2020 16:29:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D47052072C for ; Tue, 3 Nov 2020 16:29:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Ws16bs5q" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727883AbgKCQ3N (ORCPT ); Tue, 3 Nov 2020 11:29:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726126AbgKCQ3N (ORCPT ); Tue, 3 Nov 2020 11:29:13 -0500 Received: from mail-qk1-x744.google.com (mail-qk1-x744.google.com [IPv6:2607:f8b0:4864:20::744]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 034E3C0613D1 for ; Tue, 3 Nov 2020 08:29:13 -0800 (PST) Received: by mail-qk1-x744.google.com with SMTP id s14so15157702qkg.11 for ; Tue, 03 Nov 2020 08:29:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=z4o3K+SXk1EZriNkflBZWyIPiJPUVnsfHwzI5+HZSis=; b=Ws16bs5qHA+wRdZlLBmsaco6AEAFeNrQvEKstV99yhhhN6JUM3FGQ05tZgnsIb7yKm q711Hs+XrKHeN4oVtwma/IcMSP7Csxg0ABCFT88EnOtNqXJZnSKGf5/0jBF6vAXKMJtW CW2t/siGskKIyVRh81loAICW1v189FxdanqOHNjxh6uu5pBAuRJOj03myjc6JT7H2Id5 FD9GaGpEaB3XAH+xUQox6fDPjD0ZLmeNroccKqD4rdf3X4dqqM9N7pHiTwPjO058vmmW Q7yUhmky8jrci9bw4h/hJu92/bpgUpzijMishxxZyY1gCZZ8tU1O0y8P56kBr4JmlLl6 gT0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=z4o3K+SXk1EZriNkflBZWyIPiJPUVnsfHwzI5+HZSis=; b=amhWRBQ5rSXaheSEDtSknJCt+VHOh7+AmEMKJkAHRO3Q4/RHnFoXUIqWWyToH/FbLh JlaYn5Rfi5T/kvjgJ/eZ0OLRexwyl6M08e/aUV133UavhRxTVXrBF7GB4uqqIyDaZeUx hCH7MreFmo+wULLoeQL83tj1Zn7r1NrR+hEMoEtwZ53h4ev/SgiNMf+VU6xlF1tALwtL tcoBhi96GsqkmMz37eZgKGsTlOeyUm+0yXb34LW3kUSurHDrfy/iOeIHm+S/ampH+jiS ZIcDit+RfngZWaZFcQbRja2+1/xLsEMy2MALGxgdqMg+sTnT3upVX60ZIqy3qjGCNc2Y 7fDg== X-Gm-Message-State: AOAM530PpbJO9fDz9s+VOaBN5sK8fMC9tm+2w6ksLHwqi7HkMaSh2/fV 1VVR9xEvZeVRWUD4liTeTxClcryFlhw= X-Google-Smtp-Source: ABdhPJwMNXSWE6jpNL6zAh5dJ0q9BVlo4xkvLewL6q0YfQmXdnjVvdDmXBit5y4iacsKK+eEZxblyg== X-Received: by 2002:a37:65d1:: with SMTP id z200mr20184887qkb.103.1604420952018; Tue, 03 Nov 2020 08:29:12 -0800 (PST) Received: from localhost.localdomain ([71.219.66.138]) by smtp.gmail.com with ESMTPSA id d48sm10171434qta.26.2020.11.03.08.29.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Nov 2020 08:29:11 -0800 (PST) From: Alex Deucher X-Google-Original-From: Alex Deucher To: stable@vger.kernel.org Cc: Alex Deucher , Evan Quan Subject: [PATCH 1/7] drm/amdgpu/swsmu: drop smu i2c bus on navi1x Date: Tue, 3 Nov 2020 11:28:56 -0500 Message-Id: <20201103162903.687752-2-alexander.deucher@amd.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20201103162903.687752-1-alexander.deucher@amd.com> References: <20201103162903.687752-1-alexander.deucher@amd.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org Stop registering the SMU i2c bus on navi1x. This leads to instability issues when userspace processes mess with the bus and also seems to cause display stability issues in some cases. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1314 Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1341 Reviewed-by: Evan Quan Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org (cherry picked from commit 10105d0c9763f058f6a9a09f78397d5bf94dc94c) --- drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 26 ---------------------- 1 file changed, 26 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c index b1547a83e721..e0992cd7914e 100644 --- a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c +++ b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c @@ -2463,37 +2463,11 @@ static const struct i2c_algorithm navi10_i2c_algo = { .functionality = navi10_i2c_func, }; -static int navi10_i2c_control_init(struct smu_context *smu, struct i2c_adapter *control) -{ - struct amdgpu_device *adev = to_amdgpu_device(control); - int res; - - control->owner = THIS_MODULE; - control->class = I2C_CLASS_SPD; - control->dev.parent = &adev->pdev->dev; - control->algo = &navi10_i2c_algo; - snprintf(control->name, sizeof(control->name), "AMDGPU SMU"); - - res = i2c_add_adapter(control); - if (res) - DRM_ERROR("Failed to register hw i2c, err: %d\n", res); - - return res; -} - -static void navi10_i2c_control_fini(struct smu_context *smu, struct i2c_adapter *control) -{ - i2c_del_adapter(control); -} - - static const struct pptable_funcs navi10_ppt_funcs = { .get_allowed_feature_mask = navi10_get_allowed_feature_mask, .set_default_dpm_table = navi10_set_default_dpm_table, .dpm_set_vcn_enable = navi10_dpm_set_vcn_enable, .dpm_set_jpeg_enable = navi10_dpm_set_jpeg_enable, - .i2c_init = navi10_i2c_control_init, - .i2c_fini = navi10_i2c_control_fini, .print_clk_levels = navi10_print_clk_levels, .force_clk_levels = navi10_force_clk_levels, .populate_umd_state_clk = navi10_populate_umd_state_clk, From patchwork Tue Nov 3 16:28:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 317248 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CA0AEC388F7 for ; Tue, 3 Nov 2020 16:29:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 839E02072C for ; Tue, 3 Nov 2020 16:29:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NgLt7Ss2" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728116AbgKCQ3Q (ORCPT ); Tue, 3 Nov 2020 11:29:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726126AbgKCQ3P (ORCPT ); Tue, 3 Nov 2020 11:29:15 -0500 Received: from mail-qt1-x842.google.com (mail-qt1-x842.google.com [IPv6:2607:f8b0:4864:20::842]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E271C0613D1 for ; Tue, 3 Nov 2020 08:29:15 -0800 (PST) Received: by mail-qt1-x842.google.com with SMTP id g17so3527305qts.5 for ; Tue, 03 Nov 2020 08:29:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jz8hWyeLCDU1uCQNL3NNtY0a7zCNewhmalZFotzhmyk=; b=NgLt7Ss2A/8L8hrK35v2SbfQxOBMmLDO1Mxmwz7jq+FMszoCOPDsCLtwanTl6KLTiQ odx5L+gsUI7hppWSMth1PQbY6qw8UHbSvqYAiZVgvppuCFUlWFiDOOaaDIF4hLyvCJ2q lxKQDa9MsAOf5yP/qo60HD4F6r+1DLD0rkz6BZehBS5aZ4RHdzyBOyajBjeN3sJP7qv3 lsRo3B1J0rYc7eHuEN3SLjeHZcA5evQE2zZog3+Aw4RCysYMPSI6U4kdXcfUh1TMf+e1 7ypqeL9Bw//dTLYbDjH/7mVzGmCj7A1/GF1Kq2z7Nnc+SaOFnNFdh0zg1m1nKF7cfHWZ eH5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jz8hWyeLCDU1uCQNL3NNtY0a7zCNewhmalZFotzhmyk=; b=OguJNwVc+qGs8Q8/NeOGuJkJZkYNDcufLpcJYCQrvJJH1NnNDV9d+Ze9QSAwYDjeN8 jqjZ5YBvNCk/6JuHhUUIDlZz1xFG2T39pewE7vDM89TYz+hv4/de64DjapMiXJsstd1i 1x74VwoqwnxuvMQ/kytKrvWghbLcboD1Fan7vFF0dTW5u9K3S0qs2na0F2B8uPjwVboZ lkYqD77fAIoZVDkTC+TIfPokCixp7ZOj9s3eykIkWbbGmR4gwytupP/yiBme0zJwyA7f qm5pkODgT9JM63lz0KCJn2iBpSi3fgLA6/u4VDcEBOnH/0X/K5nK9HnkN+xCrhTS03Ty j6MA== X-Gm-Message-State: AOAM530+rGC7PiUWxv8wGeutbovTo4jIskm38RN73vbhNRquzv8EjEIy yPUtWO//UDp54nDYvCohDhGG+8HkNAI= X-Google-Smtp-Source: ABdhPJxDwTB9b9MS8hsEDKeX8rTijXO5Vs9p+UEUlGyjg9M4+YocZzWtPWdnZ95jPOtaLKWdvLHOCA== X-Received: by 2002:ac8:750a:: with SMTP id u10mr5847515qtq.303.1604420954630; Tue, 03 Nov 2020 08:29:14 -0800 (PST) Received: from localhost.localdomain ([71.219.66.138]) by smtp.gmail.com with ESMTPSA id d48sm10171434qta.26.2020.11.03.08.29.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Nov 2020 08:29:13 -0800 (PST) From: Alex Deucher X-Google-Original-From: Alex Deucher To: stable@vger.kernel.org Cc: Evan Quan , Alex Deucher Subject: [PATCH 2/7] drm/amd/pm: increase mclk switch threshold to 200 us Date: Tue, 3 Nov 2020 11:28:58 -0500 Message-Id: <20201103162903.687752-4-alexander.deucher@amd.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20201103162903.687752-1-alexander.deucher@amd.com> References: <20201103162903.687752-1-alexander.deucher@amd.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Evan Quan To avoid underflow seen on Polaris10 with some 3440x1440 144Hz displays. As the threshold of 190 us cuts too close to minVBlankTime of 192 us. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org (cherry picked from commit 83da6eea3af669ee0b1f1bc05ffd6150af984994) --- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c index 4a3b64aa21ce..fc63d9e32e1f 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c @@ -2873,7 +2873,7 @@ static int smu7_vblank_too_short(struct pp_hwmgr *hwmgr, if (hwmgr->is_kicker) switch_limit_us = data->is_memory_gddr5 ? 450 : 150; else - switch_limit_us = data->is_memory_gddr5 ? 190 : 150; + switch_limit_us = data->is_memory_gddr5 ? 200 : 150; break; case CHIP_VEGAM: switch_limit_us = 30; From patchwork Tue Nov 3 16:29:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 317247 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48592C388F7 for ; Tue, 3 Nov 2020 16:29:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 076882072C for ; Tue, 3 Nov 2020 16:29:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JTuUfafL" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728241AbgKCQ3S (ORCPT ); Tue, 3 Nov 2020 11:29:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726126AbgKCQ3S (ORCPT ); Tue, 3 Nov 2020 11:29:18 -0500 Received: from mail-qv1-xf43.google.com (mail-qv1-xf43.google.com [IPv6:2607:f8b0:4864:20::f43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C7E6C0613D1 for ; Tue, 3 Nov 2020 08:29:18 -0800 (PST) Received: by mail-qv1-xf43.google.com with SMTP id da2so5812162qvb.0 for ; Tue, 03 Nov 2020 08:29:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6ZTXmbzCHTTNMxJqUXLM8Rt2JD8dq42dHryRV9BUDaU=; b=JTuUfafLEcXzQOdp/ZZ9YoL576cBK/O0mibt8m90HczwMPzhTqNn1NoDHW5qSLD5mT ND2noWUK5hGWb1d6IpsTvYS/2byQZ8EqyGhJtz09YiIowv+wkFpfbd8D0cv5aIlcTemZ xEl3cJ9qg6mN1/h2Mdzx62DdCXUqvYJNXuPUO3AMrvbZf41Y4/yj/hf/JHLOaEcgBoyk 77NLY77/HgbLWgiOkHtz5A9KEw+ONmzUdHSJ58jY8V9E58WL5GtN7qezsH/a4nC0lFIf +HnIVfeYion8NZLwvx7Wl9fa4fryuS57KTOPRmKo2ncB+zxgjBkC8eyHO9pfhFSqX30s EQtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6ZTXmbzCHTTNMxJqUXLM8Rt2JD8dq42dHryRV9BUDaU=; b=D2/C4a+v4g9AwuNt0kyQOCzSN+EQM4qAhv9E1jMYsNulp/X9rVqOxRYe5h32lbmQbG aQSfIKXPrYYNYV1c/fZkbpm33l+m1tP6GaOkCLRlwH0v9JkG5ZRqlC01g12O59mk7VCs xtrm3UlRQmx8CifEE0nYDQjxtBi7udL1a9R49BUPj2gzaZWSJSY/vPFfpulRhL9lOJV+ up8/cUf7H54tamG5EfnRDRWRnEkfXpTtFxoMLSNYo5mUtPN9zol3ZJ80Sysc5lnp1Rvm OkxO1kBP2nYpom9ub2eQFYK3R1csoNCQTr1DkByYKDynG1M+Zq+pclbU+cvCS8nRT4Ed OiJQ== X-Gm-Message-State: AOAM530GTL46vpzC/nSUrFGCMmcKFrA3dlqRD+0k5BITg1pEo1xM7EIH umOVnaPMzyvykPag5whosIYhMkSFKOc= X-Google-Smtp-Source: ABdhPJy4tZdu7kCCuGLe8fZhcGhJphsl9Ssfua+oyN+HaV5EPx/mmR4iRKH7t36UOc+hYMyDOUYWJw== X-Received: by 2002:a0c:ba85:: with SMTP id x5mr27570355qvf.7.1604420957247; Tue, 03 Nov 2020 08:29:17 -0800 (PST) Received: from localhost.localdomain ([71.219.66.138]) by smtp.gmail.com with ESMTPSA id d48sm10171434qta.26.2020.11.03.08.29.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Nov 2020 08:29:16 -0800 (PST) From: Alex Deucher X-Google-Original-From: Alex Deucher To: stable@vger.kernel.org Cc: Kevin Wang , Likun Gao , Alex Deucher Subject: [PATCH 4/7] drm/amd/swsmu: add missing feature map for sienna_cichlid Date: Tue, 3 Nov 2020 11:29:00 -0500 Message-Id: <20201103162903.687752-6-alexander.deucher@amd.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20201103162903.687752-1-alexander.deucher@amd.com> References: <20201103162903.687752-1-alexander.deucher@amd.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Kevin Wang it will cause smu sysfs node of "pp_features" show error. Signed-off-by: Kevin Wang Reviewed-by: Likun Gao Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 5.9.x (cherry picked from commit d48d7484d8dca1d4577fc53f1f826e68420d00eb) --- drivers/gpu/drm/amd/powerplay/inc/smu_types.h | 1 + drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/powerplay/inc/smu_types.h b/drivers/gpu/drm/amd/powerplay/inc/smu_types.h index 7b585e205a5a..3b868f2adc12 100644 --- a/drivers/gpu/drm/amd/powerplay/inc/smu_types.h +++ b/drivers/gpu/drm/amd/powerplay/inc/smu_types.h @@ -217,6 +217,7 @@ enum smu_clk_type { __SMU_DUMMY_MAP(DPM_MP0CLK), \ __SMU_DUMMY_MAP(DPM_LINK), \ __SMU_DUMMY_MAP(DPM_DCEFCLK), \ + __SMU_DUMMY_MAP(DPM_XGMI), \ __SMU_DUMMY_MAP(DS_GFXCLK), \ __SMU_DUMMY_MAP(DS_SOCCLK), \ __SMU_DUMMY_MAP(DS_LCLK), \ diff --git a/drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c b/drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c index f2844943f6b7..8f41496630a5 100644 --- a/drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c +++ b/drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c @@ -150,14 +150,17 @@ static struct cmn2asic_mapping sienna_cichlid_feature_mask_map[SMU_FEATURE_COUNT FEA_MAP(DPM_GFXCLK), FEA_MAP(DPM_GFX_GPO), FEA_MAP(DPM_UCLK), + FEA_MAP(DPM_FCLK), FEA_MAP(DPM_SOCCLK), FEA_MAP(DPM_MP0CLK), FEA_MAP(DPM_LINK), FEA_MAP(DPM_DCEFCLK), + FEA_MAP(DPM_XGMI), FEA_MAP(MEM_VDDCI_SCALING), FEA_MAP(MEM_MVDD_SCALING), FEA_MAP(DS_GFXCLK), FEA_MAP(DS_SOCCLK), + FEA_MAP(DS_FCLK), FEA_MAP(DS_LCLK), FEA_MAP(DS_DCEFCLK), FEA_MAP(DS_UCLK), From patchwork Tue Nov 3 16:29:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 317246 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8A625C388F7 for ; Tue, 3 Nov 2020 16:29:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 400542072C for ; Tue, 3 Nov 2020 16:29:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Bp5n4n0j" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728292AbgKCQ3U (ORCPT ); Tue, 3 Nov 2020 11:29:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726126AbgKCQ3U (ORCPT ); Tue, 3 Nov 2020 11:29:20 -0500 Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D5BAC0613D1 for ; Tue, 3 Nov 2020 08:29:20 -0800 (PST) Received: by mail-qt1-x844.google.com with SMTP id m14so11974691qtc.12 for ; Tue, 03 Nov 2020 08:29:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bIoFzonjoY401Cg0ra5WwfsOvOK6cmHDTIRVCXL5XTY=; b=Bp5n4n0jCM+q2mtNMALF6lhGpIa39HHAyBfdopJZjg+PpHjQ1gKe8RC/ro92dK6wlU vWvoBYDBfLH+ehiVG02ZbFtKOmS1XEil3goxEk62Ux0hBmDT08C+1XiZP6Ix10NFlcJx LX/KAKbh4rZHgU84Ygi6ud7lI3ogkPuGpWAtYvmTlZ9sP/ZLC0EkxuXEuNM+wRscgqMw cSJgnGQODT9UYhVGeuTSh9va07rpjZQM8WBCI6AA3lah8soi78dCzipQMAhG7NBzlO6A Ep45+uLLSrqd+1p/c1Nu+CSBAwlDftLBelqoFxrq1UqTwSVVd/6gO8f/ElDrYVWUEdva w4bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bIoFzonjoY401Cg0ra5WwfsOvOK6cmHDTIRVCXL5XTY=; b=pUFO+lS3GM5tpMdC5dnRbNWIvYkQySFLkZPbPjyF9L+uESKhoPYACquAxU72E2e67+ BRuHn9OaKeHBLOIwQBVgg0Pr/noK4jCjEelDvVP1JdpvYWpHTKKA1j2HMkPVxFnws8r6 yRqwwunbp/PzUx51AqV/QlotTM3P42r+m7SvL8M+mQ6/wWH9O8419+0IPJYftfTz0Uxj Y1gRbGWKiFJfhfuEcZqkj0yUNA1y3cj2iEatCsRzCUYprh7drLaHu7TCCNSSKOLcG5qQ sskO7Vt1uN/ikm7MSNUFAIirSN3Da41f3t+KqNdbZfFIlVjeHwOgN6Ut7CAJG0Dyk+TL j3dQ== X-Gm-Message-State: AOAM5318ONjmg2UX60g7LkxdLjV0TuJ9AmRkS0+FQ5nc5VjctEBfY756 UoLhoTArRLZ6TEIv0xQqaYaMVmLqW74= X-Google-Smtp-Source: ABdhPJyYXMqHL/5UDowFsL2Wxnb6m1Ih4yZhLI2ja4s8Ppk+0GPCWaHoUgYKKLH6oZOPdZl/lpQTzQ== X-Received: by 2002:ac8:4419:: with SMTP id j25mr20543826qtn.359.1604420959318; Tue, 03 Nov 2020 08:29:19 -0800 (PST) Received: from localhost.localdomain ([71.219.66.138]) by smtp.gmail.com with ESMTPSA id d48sm10171434qta.26.2020.11.03.08.29.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Nov 2020 08:29:18 -0800 (PST) From: Alex Deucher X-Google-Original-From: Alex Deucher To: stable@vger.kernel.org Cc: Likun Gao , Hawking Zhang , Alex Deucher Subject: [PATCH 6/7] drm/amdgpu: correct the cu and rb info for sienna cichlid Date: Tue, 3 Nov 2020 11:29:02 -0500 Message-Id: <20201103162903.687752-8-alexander.deucher@amd.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20201103162903.687752-1-alexander.deucher@amd.com> References: <20201103162903.687752-1-alexander.deucher@amd.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Likun Gao Skip disabled sa to correct the cu_info and active_rbs for sienna cichlid. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 5.9.x (cherry picked from commit 687e79c0feb4243b141b1e9a20adba3c0ec66f7f) --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c index b1cb7bf5dd10..190161d1a466 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c @@ -4536,12 +4536,17 @@ static void gfx_v10_0_setup_rb(struct amdgpu_device *adev) int i, j; u32 data; u32 active_rbs = 0; + u32 bitmap; u32 rb_bitmap_width_per_sh = adev->gfx.config.max_backends_per_se / adev->gfx.config.max_sh_per_se; mutex_lock(&adev->grbm_idx_mutex); for (i = 0; i < adev->gfx.config.max_shader_engines; i++) { for (j = 0; j < adev->gfx.config.max_sh_per_se; j++) { + bitmap = i * adev->gfx.config.max_sh_per_se + j; + if ((adev->asic_type == CHIP_SIENNA_CICHLID) && + ((gfx_v10_3_get_disabled_sa(adev) >> bitmap) & 1)) + continue; gfx_v10_0_select_se_sh(adev, i, j, 0xffffffff); data = gfx_v10_0_get_rb_active_bitmap(adev); active_rbs |= data << ((i * adev->gfx.config.max_sh_per_se + j) * @@ -8760,6 +8765,10 @@ static int gfx_v10_0_get_cu_info(struct amdgpu_device *adev, mutex_lock(&adev->grbm_idx_mutex); for (i = 0; i < adev->gfx.config.max_shader_engines; i++) { for (j = 0; j < adev->gfx.config.max_sh_per_se; j++) { + bitmap = i * adev->gfx.config.max_sh_per_se + j; + if ((adev->asic_type == CHIP_SIENNA_CICHLID) && + ((gfx_v10_3_get_disabled_sa(adev) >> bitmap) & 1)) + continue; mask = 1; ao_bitmap = 0; counter = 0;