From patchwork Thu Sep 6 18:19:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: kai.chen@intel.com X-Patchwork-Id: 10590931 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 58B1E920 for ; Thu, 6 Sep 2018 18:26:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 46E6B2856D for ; Thu, 6 Sep 2018 18:26:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3A68B2881B; Thu, 6 Sep 2018 18:26:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EC15C2880C for ; Thu, 6 Sep 2018 18:26:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 326DD6E716; Thu, 6 Sep 2018 18:26:45 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id 67C356E716 for ; Thu, 6 Sep 2018 18:26:44 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Sep 2018 11:26:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,339,1531810800"; d="scan'208";a="81461480" Received: from kai-fedora.fm.intel.com ([10.1.23.156]) by orsmga003.jf.intel.com with ESMTP; 06 Sep 2018 11:26:43 -0700 From: kai.chen@intel.com To: intel-gfx@lists.freedesktop.org Date: Thu, 6 Sep 2018 11:19:02 -0700 Message-Id: <20180906181902.25669-1-kai.chen@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [Intel-gfx] [PATCH] drm/i915: Raise RPS FUp Interrupt Limiter for GEN9LP above softmax X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Kai Chen On GEN9LP, raise the RPS FUp Interrupt Limiter above softmax so that the HW won't miss interrupt when requested max_freq is set back to RP0 value. Signed-off-by: Kai Chen --- drivers/gpu/drm/i915/intel_pm.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index d99e5fabe93c..bf2494294c9d 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -6276,7 +6276,20 @@ static u32 intel_rps_limits(struct drm_i915_private *dev_priv, u8 val) * frequency, if the down threshold expires in that window we will not * receive a down interrupt. */ if (INTEL_GEN(dev_priv) >= 9) { - limits = (rps->max_freq_softlimit) << 23; + int max_freq = rps->max_freq_softlimit; + int rp0_freq = rps->rp0_freq; + + if (IS_GEN9_LP(dev_priv) && (max_freq == rp0_freq)) + /* + * For GEN9_LP, it is suggested to increase the upper + * interrupt limiter by 1 (16.6MHz) so that the HW will + * generate an interrupt when we are near or just below + * the upper limit. + */ + limits = (rps->max_freq_softlimit + 1) << 23; + else + limits = (rps->max_freq_softlimit) << 23; + if (val <= rps->min_freq_softlimit) limits |= (rps->min_freq_softlimit) << 14; } else {