From patchwork Tue Dec 18 14:55:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Guittot X-Patchwork-Id: 10735813 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 D525B924 for ; Tue, 18 Dec 2018 14:55:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C48E82A7C2 for ; Tue, 18 Dec 2018 14:55:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B90242A829; Tue, 18 Dec 2018 14:55:38 +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=unavailable 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 CB3EF2A7C2 for ; Tue, 18 Dec 2018 14:55:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 86CA66EC09; Tue, 18 Dec 2018 14:55:34 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by gabe.freedesktop.org (Postfix) with ESMTPS id BEA236EC08 for ; Tue, 18 Dec 2018 14:55:32 +0000 (UTC) Received: by mail-wm1-x343.google.com with SMTP id a62so2959590wmh.4 for ; Tue, 18 Dec 2018 06:55:32 -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=nJOMK4qGOuH+htAiRTQMW4VoOALmj1vJ8fGpeQ2ufJk=; b=rDIds9ZrCYb3eW/OhlO+Gk1YQJwlVQoH1z7om8Lsp8ROePss52eHPUwz6Hpw3U2Zkz tTaeLgjUvv7OePlTk1wkHn8p44UotI0ic78Cd1PcETB4w0YX/q7wrk24nVfrMOkddp4w 6FpkL49Wr9Gr0Uk7frb/yL5GaQmYSNQ/FUMsNlttETnBMgmvDs305q5qZr5dE++3MDgf LZta9Ftl3924sAdgqd11YDxLTaUz5o/ZB/IzPsvvvSaoMMSJYd7K02dH+zViNSDLsOqO LRps7CF9oAJ+NCAyRQQ4yl7ZTgka+2SBgLCuAlMQpKBcxuk+mCpqF6r+h9pqXt9G+WbF 6BUA== X-Gm-Message-State: AA+aEWYhquCNd2MzM7xkbR5Dzx9JYN++63FTCwaK4v8xpaKAscJhtUQx YFNUQAke8ZuRrPpkvQKxMmngDQ== X-Google-Smtp-Source: AFSGD/WyfkPru7UiGqwy5vr3/LmUzD6wXgTCCVL0bROvdKkNSj0zW7q/FYzJvae9D9eCrbZy+diW5g== X-Received: by 2002:a1c:e3d7:: with SMTP id a206mr3393236wmh.12.1545144931236; Tue, 18 Dec 2018 06:55:31 -0800 (PST) Received: from localhost.localdomain ([2a01:e0a:f:6020:85e9:25c5:6cbd:73e9]) by smtp.gmail.com with ESMTPSA id n20sm1579956wmi.11.2018.12.18.06.55.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 18 Dec 2018 06:55:30 -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 Subject: [PATCH v3 0/3] Move pm_runtime accounted time to raw nsec Date: Tue, 18 Dec 2018 15:55:20 +0100 Message-Id: <1545144923-31546-1-git-send-email-vincent.guittot@linaro.org> X-Mailer: git-send-email 2.7.4 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ulf.hansson@linaro.org, Vincent Guittot MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 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 ktim 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 | 36 +++++++++++++++++++++++++++++++----- drivers/base/power/sysfs.c | 11 ++++++++--- drivers/gpu/drm/i915/i915_pmu.c | 18 ++++++++---------- drivers/gpu/drm/i915/i915_pmu.h | 4 ++-- include/linux/pm.h | 6 +++--- include/linux/pm_runtime.h | 2 ++ 6 files changed, 54 insertions(+), 23 deletions(-)