From patchwork Fri Dec 21 10:33:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Guittot X-Patchwork-Id: 10740283 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 4847113BF for ; Fri, 21 Dec 2018 10:34:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 37F932855E for ; Fri, 21 Dec 2018 10:34:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 28C71285A7; Fri, 21 Dec 2018 10:34:07 +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 CF9172855E for ; Fri, 21 Dec 2018 10:34:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D80496E01E; Fri, 21 Dec 2018 10:34:05 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by gabe.freedesktop.org (Postfix) with ESMTPS id C06AE6E007 for ; Fri, 21 Dec 2018 10:34:04 +0000 (UTC) Received: by mail-wr1-x441.google.com with SMTP id s12so4698001wrt.4 for ; Fri, 21 Dec 2018 02:34:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=AXRcF9hCBywIe7OQ4cW1uBDgnWFwaWi9AOMWDYeO9tI=; b=Lppxh7lEsWYIqCkRR8ZhGWRgMfZcIfgoL4M+Nm9UmVp3/PvITO+ULtrft/OXNnrKNg Jumq0X1aNYT/8Fwp1Mp5arjqKhNKb+DVk+5K/LuPDS9xfcN2t55NO8D4ExaV/nO5s+7e zlHZKO8B6fh2od5jDH4AvE2zXzKYolJIM6stuK//CqcpTrfRqcViVIJofzePZI/bX9GE DywOLOigOzCEhJavm0cQBAuPwso1ztJXD/UGoIh6df4DdyC0wI6prXj2/EdVt5KSgyO/ PzX/88dEDwOTWLh5pTlmJfjr1utYFv2B5nNrToYXbaF9XzAOzzSEFKBgjUrvcQR5u1hz WJyA== X-Gm-Message-State: AJcUukfJ6IIJsIDuPnv6qdGibhCkTw304/FYrdM8anZ4dcScr40knm4h OnLnhX1A1D6bh0Ww8jIhtn1B9A== X-Google-Smtp-Source: ALg8bN7/2JTkZAXxgUFS2tLPQu/+sEL8VKaVFekordDbMZeqKZiBmxduapOdfN3EVkSBni7WiTQvEw== X-Received: by 2002:adf:8001:: with SMTP id 1mr1908786wrk.23.1545388443270; Fri, 21 Dec 2018 02:34:03 -0800 (PST) Received: from localhost.localdomain ([2a01:e0a:f:6020:ac05:2372:f02d:b03f]) by smtp.gmail.com with ESMTPSA id h10sm10573685wmf.44.2018.12.21.02.34.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 21 Dec 2018 02:34:02 -0800 (PST) From: Vincent Guittot To: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, rjw@rjwysocki.net, thara.gopinath@linaro.org, jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com, rodrigo.vivi@intel.com, airlied@linux.ie, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Date: Fri, 21 Dec 2018 11:33:53 +0100 Message-Id: <1545388436-7489-1-git-send-email-vincent.guittot@linaro.org> X-Mailer: git-send-email 2.7.4 Subject: [Intel-gfx] [PATCH v5 0/3] Move pm_runtime accounted time to raw nsec 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: , Cc: ulf.hansson@linaro.org MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Move pm_runtime accounted time to raw nsec. The subject of the patchset has changed as the 1st patch of the previous version has been queued by Rafael. Patch 1 adds a new pm_runtime interface to get accounted suspended time Patch 2 moves drm/i915 driver on the new interface and removes access to internal fields. Patch 3 moves time accounting on raw ns. This patch initially used ktime instead of raw ns but it was easier to move i915 driver on raw ns than on ktime. Changes since v4: -Update commit message Changes since v3: - Rebase on v4.20-rc7 without patch that has been queued by Rafael - Simplify the new interface pm_runtime_suspended_time() Changes since v2: - remove patch1 that has been queued by rafael - add new interface in pm_runtime to get accounted time - reorder patchset to prevent compilation error Changes since v1: - updated commit message of patch 1 - Added patches 2 & 3 to move runtime_pm accounting on raw ns Thara Gopinath (1): PM/runtime:Replace jiffies based accounting with ktime based accounting Vincent Guittot (2): PM/runtime: Add a new interface to get accounted time drm/i915: Move on the new pm runtime interface drivers/base/power/runtime.c | 27 ++++++++++++++++++++++----- drivers/base/power/sysfs.c | 11 ++++++++--- drivers/gpu/drm/i915/i915_pmu.c | 16 ++++++---------- drivers/gpu/drm/i915/i915_pmu.h | 4 ++-- include/linux/pm.h | 6 +++--- include/linux/pm_runtime.h | 2 ++ 6 files changed, 43 insertions(+), 23 deletions(-)