Received: by 10.213.65.68 with SMTP id h4csp435407imn; Tue, 13 Mar 2018 08:59:46 -0700 (PDT) X-Google-Smtp-Source: AG47ELsWZJyP7D5467L+JYz0SIFkXgh7uiFHbWS3WbcdjP0/Eg1qatca01azQdcgQVf/FvFTt+Fh X-Received: by 10.101.102.79 with SMTP id z15mr867162pgv.181.1520956786687; Tue, 13 Mar 2018 08:59:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520956786; cv=none; d=google.com; s=arc-20160816; b=Wc2ap7pz4f6OFfQDjR4Va+2urRG9SxGPzhxmsc0y+stGhvqAmg0mnHVzdIhsbPikFA xJP+KcpidgdcRZJ+FGblRsWZ7e00kYI7z2O9lP7JaaU+NrFrmpWfNnBDQlBLzeB7MSt8 /RqBgyiP7WGxCX+RambQYt90o3DLdU4n/JDZJK3SBq6xaGT6uifWGqD/Ppp/YkW4PgNx rwXNYzZu9MrRRIvcfxMnHgGAdTXR4k+gNIY4grVncQbxe3wWByO59UQa46WLooiNTXuo 5OhFnA0X1ddV6rhg6TsW5/aQiNvHC5FUw5WR/chpsoZMMSQF2DQQlMYsk2d+nKGqm+Qu XH4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=RvJGj68fv/hoCr3Ur3brENmHGYoc/4+W8uZV8D9TH2w=; b=thdp/6BAV9rh8h861GLDn9jZGimya3EQMiOFxrOWu4vrzItKXVm4cbe9dfnMVpIOSQ T2jEoWTpovXPM05pLLcEO9YuOiidJOWqxKok2VJp+bwnEgGCv3HSU/0UCGYLfBEw9Vqh GWrb60wj1A7AhDFtFIu5eIowLD1/vkwSkDCJ25bgx0Ro5LkExGlYtxUsvuFlZwzje4pd 2/srK3J0djByJEaTNgPAJC5m8fT/lvSPbcOcb8fcDz02YzmHqPOj3JYyPlEJrJOgGoXr xh5PLdGeFXd35Gjm0tepXRwRSvlhGE9XiZaBvzQ4f1eeN33tghSifQcvosE+oJPyEatn WrRg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h193si270088pgc.591.2018.03.13.08.59.31; Tue, 13 Mar 2018 08:59:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934619AbeCMP5o (ORCPT + 99 others); Tue, 13 Mar 2018 11:57:44 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:34234 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934521AbeCMPiJ (ORCPT ); Tue, 13 Mar 2018 11:38:09 -0400 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 9C6D81261; Tue, 13 Mar 2018 15:38:08 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eric Huang , Alex Deucher Subject: [PATCH 4.14 067/140] drm/amd/powerplay/smu7: allow mclk switching with no displays Date: Tue, 13 Mar 2018 16:24:30 +0100 Message-Id: <20180313152502.710983642@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180313152458.201155692@linuxfoundation.org> References: <20180313152458.201155692@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Alex Deucher commit 51954e17914aaadf18d97b21c2a2cee16fa29513 upstream. If there are no displays attached, there is no reason to disable mclk switching. Fixes mclks getting set to high when there are no displays attached. Reviewed-by: Eric Huang Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) --- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c @@ -2788,10 +2788,13 @@ static int smu7_apply_state_adjust_rules PHM_PlatformCaps_DisableMclkSwitchingForFrameLock); - disable_mclk_switching = ((1 < info.display_count) || - disable_mclk_switching_for_frame_lock || - smu7_vblank_too_short(hwmgr, mode_info.vblank_time_us) || - (mode_info.refresh_rate > 120)); + if (info.display_count == 0) + disable_mclk_switching = false; + else + disable_mclk_switching = ((1 < info.display_count) || + disable_mclk_switching_for_frame_lock || + smu7_vblank_too_short(hwmgr, mode_info.vblank_time_us) || + (mode_info.refresh_rate > 120)); sclk = smu7_ps->performance_levels[0].engine_clock; mclk = smu7_ps->performance_levels[0].memory_clock;