Received: by 10.213.65.68 with SMTP id h4csp435162imn; Tue, 13 Mar 2018 08:59:16 -0700 (PDT) X-Google-Smtp-Source: AG47ELtEvHBNjEZa7Mwujgt4fmyKfY9gA8RQNHedG3hvhsphepuPjTRnTbPF4E+BA6jBrgAdaA63 X-Received: by 10.98.66.89 with SMTP id p86mr1091116pfa.228.1520956756478; Tue, 13 Mar 2018 08:59:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520956756; cv=none; d=google.com; s=arc-20160816; b=GprrYNRtxavaw64CWvYtGvCe3ZBs/jiZ6zZJNVfvfFEjO0SebPaH/Z8m3kM8VzW16v ICjanFJz6LPzsh/9jC0CgvDkTiZEYAQe7cAco2dMHoxEAnAlBTnc9jQBGfIfcMhapOw1 JXZVFO/pzfJwy7NhJrqMGr8Kkg4eC74F99H5z3Bm+EhkDV2j2MuYVtl0YwkC2OO1zDWl sNkv+otsy/FDm4MQdiZDna3XGrc3DvmDtH+yZZV+d/XHftrzGWPQ4xisD/G9FA1o1KOh 67HcSFRxdkDEuaYJ5H64UkanOhtBCJTyNfCQgRCwrTNw89bqNM8/iVFPLQXLzcOq3/74 cTYw== 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=HSLInpdMuRRZEfWvTZy0iWAesYqFPqsXjbGBbhQ35ZE=; b=itQXjnjn2+1OnTa7M6OHSTNFYUoy2Q2UwF+0SjVBzy042jlUCLiecS30bqp/SRxPzf G6+Df6DBdOXY6Iw0/UMOZ32Ore+apqp26POHvLhAt6PeX2HQrAALoIQ9KvJr0Xs5tOSF 3kq/8ht9nCO2ShJXpg9u7h64IqByuL3nhFJfeT56l2sGT8/MDzmZSh+wuosq+hYGccEj nhYY/d/TmwaHWfQjq9MCfat8mymRjiBjCNxF93W0M9xfpAqstpSj0yvSNyJcg9MSgC/X yR7miGmCIqvARHckTohulScWU2xwpL+he7qU/7tDCOUTvBQxhbp21SWiZFujLyfSz8vA GnyQ== 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 v26si282006pge.237.2018.03.13.08.59.01; Tue, 13 Mar 2018 08:59:16 -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 S934515AbeCMP50 (ORCPT + 99 others); Tue, 13 Mar 2018 11:57:26 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:34240 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934525AbeCMPiM (ORCPT ); Tue, 13 Mar 2018 11:38:12 -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 A7C651261; Tue, 13 Mar 2018 15:38:11 +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 068/140] drm/amd/powerplay/vega10: allow mclk switching with no displays Date: Tue, 13 Mar 2018 16:24:31 +0100 Message-Id: <20180313152502.770326816@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 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 @@ -3243,10 +3243,13 @@ static int vega10_apply_state_adjust_rul force_mclk_high = phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, 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;