From patchwork Wed Feb 3 05:59:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: sagar.a.kamble@intel.com X-Patchwork-Id: 8198221 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9CACFBEEE5 for ; Wed, 3 Feb 2016 05:57:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D9E8B20253 for ; Wed, 3 Feb 2016 05:57:30 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id DEF272022D for ; Wed, 3 Feb 2016 05:57:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4403F6E0EB; Tue, 2 Feb 2016 21:57:29 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id 3E4CE6E0EB for ; Tue, 2 Feb 2016 21:57:28 -0800 (PST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP; 02 Feb 2016 21:57:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,388,1449561600"; d="scan'208";a="41497106" Received: from sakamble-desktop.iind.intel.com ([10.223.82.59]) by fmsmga004.fm.intel.com with ESMTP; 02 Feb 2016 21:57:26 -0800 From: Sagar Arun Kamble To: intel-gfx@lists.freedesktop.org Date: Wed, 3 Feb 2016 11:29:46 +0530 Message-Id: <1454479186-32113-1-git-send-email-sagar.a.kamble@intel.com> X-Mailer: git-send-email 1.9.1 Cc: shashidhar.hiremath@intel.com Subject: [Intel-gfx] [PATCH 1/1] drm/i915/skl: fix RC6 residency time calculation X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 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-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The RC6 residency time unit is 1.33us on SKL according to the specification, so update the calculation accordingly. Cc: Imre Deak Signed-off-by: Sagar Arun Kamble --- drivers/gpu/drm/i915/i915_sysfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_sysfs.c b/drivers/gpu/drm/i915/i915_sysfs.c index c6188dd..9aa49a9 100644 --- a/drivers/gpu/drm/i915/i915_sysfs.c +++ b/drivers/gpu/drm/i915/i915_sysfs.c @@ -58,7 +58,8 @@ static u32 calc_residency(struct drm_device *dev, } else if (IS_BROXTON(dev)) { units = 1; div = 1200; /* 833.33ns */ - } + } else if (IS_SKYLAKE(dev)) + units = 133ULL; raw_time = I915_READ(reg) * units; ret = DIV_ROUND_UP_ULL(raw_time, div);