From patchwork Wed Oct 17 13:03:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sharat Masetty X-Patchwork-Id: 10645535 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 A748A157A for ; Wed, 17 Oct 2018 13:04:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9D4632851D for ; Wed, 17 Oct 2018 13:04:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9159D2AF4C; Wed, 17 Oct 2018 13:04:12 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3DFFA2851D for ; Wed, 17 Oct 2018 13:04:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727061AbeJQU7r (ORCPT ); Wed, 17 Oct 2018 16:59:47 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:55262 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727000AbeJQU7r (ORCPT ); Wed, 17 Oct 2018 16:59:47 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id C60816028C; Wed, 17 Oct 2018 13:04:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1539781450; bh=NTSmK2pwZFSvAAyH+p+RzPOV1n8Df9bLACcfgznysPI=; h=From:To:Cc:Subject:Date:From; b=RCDuHfNn6Pd0BhtJcWOqaM6aD3J2EraFFj7sEL0DEHDGrT7Zarl1PmajcbgJJ93lD 5l38yfc0ykAqPjoWNpKSXW1BcDLTMr4dHOoyUPMXuVSAxdHmog/hRLff1888yprXMS i34VG9J9GH3ds9l77s1eRcmSomw7Z+uQaLdrXhu0= Received: from smasetty-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: smasetty@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 198826028C; Wed, 17 Oct 2018 13:04:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1539781450; bh=NTSmK2pwZFSvAAyH+p+RzPOV1n8Df9bLACcfgznysPI=; h=From:To:Cc:Subject:Date:From; b=RCDuHfNn6Pd0BhtJcWOqaM6aD3J2EraFFj7sEL0DEHDGrT7Zarl1PmajcbgJJ93lD 5l38yfc0ykAqPjoWNpKSXW1BcDLTMr4dHOoyUPMXuVSAxdHmog/hRLff1888yprXMS i34VG9J9GH3ds9l77s1eRcmSomw7Z+uQaLdrXhu0= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 198826028C Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=smasetty@codeaurora.org From: Sharat Masetty To: freedreno@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, jcrouse@codeaurora.org, Sharat Masetty Subject: [PATCH 0/3] drm/msm: Revive GPU workload profiling Date: Wed, 17 Oct 2018 18:33:58 +0530 Message-Id: <1539781441-13076-1-git-send-email-smasetty@codeaurora.org> X-Mailer: git-send-email 1.9.1 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP I was looking for a simple mechanism to measure GPU workloads, it turns out that the support is already present in the msm driver. In this series I try to make use of the hardware counters where possible for a more accurate workload estimation. Please review and share your thoughts on this. I could have piggybacked on the devfreq samples and accumulated the busytimes, but I chose not to, since it puts a dependency on the gpu devfreq which in itself is an optional feature. There is one pending issue with GPU recovery + sampling use case, which I plan to address soon. Sharat Masetty (3): drm/msm: Change gpu_busy() function drm/msm/a6xx: Move power counter selectable to resume() drm/msm: Use Hardware counters for perf profiling drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 6 +++--- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 22 +++++++++++----------- drivers/gpu/drm/msm/msm_gpu.c | 33 ++++++++++++++++++++++++++++----- drivers/gpu/drm/msm/msm_gpu.h | 7 ++++--- drivers/gpu/drm/msm/msm_perf.c | 10 +++++----- 5 files changed, 51 insertions(+), 27 deletions(-) --- 1.9.1