Received: by 10.213.65.68 with SMTP id h4csp471968imn; Tue, 13 Mar 2018 10:06:32 -0700 (PDT) X-Google-Smtp-Source: AG47ELvLEU3QavV3qADmxkQNazL5BGIKCE+ylhc++V+1A3OaJhmPdtq2WISIxfVSm9AkAQtB8jeL X-Received: by 10.99.174.5 with SMTP id q5mr1067160pgf.170.1520960792452; Tue, 13 Mar 2018 10:06:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520960792; cv=none; d=google.com; s=arc-20160816; b=VE0V2zuaNYL5SBtq6tveL8AlgJWczI2MzlsYA1j6825Uu4tW7Tts8ne67oayyJ731V Xy3AVfLuLgWLU3Y/vwdbQHe/qoQA5qMZD4/m++sMA5bCjfKJOhUeS8EBabgyP1hOtOyA Nlf86za3ubz4WCWu9SXd4XhySSZAT5q9nvx3F7lASQIw+ostt4iIe0uE2OXfJV/Ld1DI mns1DZo+RWu7H9IMZudm33GVttAm07IYTlb5ux5eJxruZHPHMP8fyBNUvQmHFI0aLYvK b+VA1GwqUJC5+pZBqtEOzvZIAe1xOeAjt51kd+rvQjnDZf9LgMDmvR/urCXNXKhm+uuC NZ8Q== 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=0TXhH9e4pSIUsiyPiamNssyzo5uOKDX0r9Sc4r5kubM=; b=sYtL42mMkrolxfQ3mt1Rt3m/ckxp/VMj6oad7Ry1PtOK56x3aJ/5ISGggoU8pLnV5U WCYEBwigXNU//UMDopeaH3RhlWUGzVAf0/M0qtp9HE8XFp8c+7p9A8t3pikia+lv7JXx ur7rjr/+6/xzRaeAN8rZY9J6KYOut+VyGNuO9jXktrhgY78Gdw+5D3zSnSmuLhKkbqru qY69mPd1lZyQYenzOKMkoC2Hs/qOsDhVMQo0nosflO3AGIgsjH99trDJ3dszGxtXQ5Nd guR1WtHmlvJBVb/RaJ8ukCifx2qx/yH4vOoQxN8CvPZPP5Xe5iQ4AKvA/h6Ud7ZcHI8U twtQ== 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 y22si288060pfm.357.2018.03.13.10.06.15; Tue, 13 Mar 2018 10:06:32 -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 S932771AbeCMP2h (ORCPT + 99 others); Tue, 13 Mar 2018 11:28:37 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:58064 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932755AbeCMP2e (ORCPT ); Tue, 13 Mar 2018 11:28:34 -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 33F8EE8E; Tue, 13 Mar 2018 15:28:33 +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.15 026/146] drm/amd/powerplay/smu7: allow mclk switching with no displays Date: Tue, 13 Mar 2018 16:23:13 +0100 Message-Id: <20180313152322.493843393@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180313152320.439085687@linuxfoundation.org> References: <20180313152320.439085687@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.15-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 @@ -2791,10 +2791,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;