Received: by 10.213.65.68 with SMTP id h4csp471310imn; Tue, 13 Mar 2018 10:05:19 -0700 (PDT) X-Google-Smtp-Source: AG47ELu7wAIvP1ITs5HV/Pi0mKhofPEDhj2mPWgQQTkxOertRodSlEf5X5lB60XDmGiz/KiOXJYT X-Received: by 2002:a17:902:41:: with SMTP id 59-v6mr1224254pla.248.1520960719652; Tue, 13 Mar 2018 10:05:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520960719; cv=none; d=google.com; s=arc-20160816; b=Eqi6ZoQYBngAoeIOaMfKtyAwGIjWXZJrG8DXPiVLwlJ+n6crlUWQDXeGLbITQ6v9fU R8uDD/VKIAl8S0ftNudD8eF8r/Ub3gnGyxRC6d/Lm8+RZIPvd0O2iLtq5F47rbxYp3aD mfsJJRXkQrYqXPAX7GW2hc+I+FE10TzFd4BpmzaFlqenYxF2nHoC7sBYmUVCsMpasa+m kAE30O6eMqLAoMK4cvC7oh0ciPBqD2rJGSS8+3eZ45EW/ecJf+YKSCypfkTMn8/eYAB+ d7ihaE53/9fFyax02syd71/z+PPDI5PxVOr1mINApzsfValGGQnQ99OkduGCZo5706Lk 2EBQ== 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=pM+wfUC8UzkXbwWmSPVE65P/3b6zk+HfT4YP68ob/ac=; b=hk4UPBJU/YbvWRZA8/29WcPNuRuhG79RH334YRPV6hXGPGOvuqYz5QghK2g9sigoCN 3pgn4mqmcJ5HJMYMSl0aFdB4FxHCUseITJxFc5xjtzMoynkoCDEo2nhIBZJzvNyqFX9G ucgNuEjXvSTvQkXJgfwb1gh36rn01PxEwj0k5g1QzWMQb4pVNFZZtICIdpBFnKaIP0nZ VwvalMEJEKFlbOm+YBrqZ8RsWb67d1iT1n0crVB3Rye4sZ8rJiWnouKh4piB75Z9+i0t 0nWH6HY5tzOHRo/LmX1yiSdwbhx1geEK+XM+dzlv3kC5xr2JDev3A1S4XMbVP1SeNv6x z1Xw== 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 p9si431637pff.235.2018.03.13.10.05.04; Tue, 13 Mar 2018 10:05:19 -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 S932993AbeCMRDK (ORCPT + 99 others); Tue, 13 Mar 2018 13:03:10 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:58088 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752280AbeCMP2g (ORCPT ); Tue, 13 Mar 2018 11:28:36 -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 1C253DFE; Tue, 13 Mar 2018 15:28:35 +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 027/146] drm/amd/powerplay/vega10: allow mclk switching with no displays Date: Tue, 13 Mar 2018 16:23:14 +0100 Message-Id: <20180313152322.569006620@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 5825acf5c958a6820b04e9811caeb2f5e572bcd8 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/vega10_hwmgr.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) --- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c @@ -3208,10 +3208,13 @@ static int vega10_apply_state_adjust_rul disable_mclk_switching_for_vr = PP_CAP(PHM_PlatformCaps_DisableMclkSwitchForVR); force_mclk_high = PP_CAP(PHM_PlatformCaps_ForceMclkHigh); - disable_mclk_switching = (info.display_count > 1) || - disable_mclk_switching_for_frame_lock || - disable_mclk_switching_for_vr || - force_mclk_high; + if (info.display_count == 0) + disable_mclk_switching = false; + else + disable_mclk_switching = (info.display_count > 1) || + disable_mclk_switching_for_frame_lock || + disable_mclk_switching_for_vr || + force_mclk_high; sclk = vega10_ps->performance_levels[0].gfx_clock; mclk = vega10_ps->performance_levels[0].mem_clock;