From patchwork Fri Aug 12 15:07:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 9277245 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7FBD1600CB for ; Fri, 12 Aug 2016 15:07:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 71EAC28A4B for ; Fri, 12 Aug 2016 15:07:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6696428A4E; Fri, 12 Aug 2016 15:07:42 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID 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 177AB28A4B for ; Fri, 12 Aug 2016 15:07:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 936286EBCE; Fri, 12 Aug 2016 15:07:41 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 004446EBD3 for ; Fri, 12 Aug 2016 15:07:39 +0000 (UTC) Received: by mail-wm0-x243.google.com with SMTP id o80so3399209wme.0 for ; Fri, 12 Aug 2016 08:07:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=S61BZ454irHeO/7BCkomYVEAJQPMtybSISn/f/6lFPY=; b=MB2gmFWMtQMoDwehLklKnYrRzvSITQ2ZyBitHBd1jXMCMXRXVWADV+LQ3GP6oGh52x /J7bT/jUZje7ZPPMO/ma8KQs4lcKJxP/+2h6weBShO+iACsyhz2pq4L/cFgq3mEzqDWP Z+uKh29C5pt8u34DpPMPJR+F5/id4jqDgp/RTHjj4yPlwlSsJG994LxF7r9HR56gfuyO wWc/UPZRDf5nl+eT9pehw4OuYhlo4W0TEz0dEidZdIsywWcFeuBFQKBkjAgl3w1q0JL/ WqIUor6K4/bB04Jl3AUBbCAPeYuAExdkXlLALL463+J2OqNLuqY5QsfHioHDixcJaTDK 1GKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=S61BZ454irHeO/7BCkomYVEAJQPMtybSISn/f/6lFPY=; b=fPt6fTMc7AQfBbWOVfIKARu3y+KAUbmSRGLCMTdlNf89WAKdJYsssgrXGU6mwepBO0 zP55RZ76GLuOIbwe2Woph1KKGfW4GmRaao5RyqmFqK88UjgCrT6YzZHisAt/QhSUEP0c vu1CxYfp0FawkAwdkQwF5hk0KhfUVVz/Vr1w1gmP+Q44E/uPoMpNQ8YLgtBKrgluqAiC t6+xusacbXyyY5nRDV9/B5B/+RMYVNQNdmDaQoLYKyOas1xyHc+87U0PK2nYt5QvG9iF 0E4UvQJRBfHkWNs79IjuDqJSXz0NCYAJd0lCuElNHtrvIFdDlGOzeeHwCIlDBY+AKSWq fjUg== X-Gm-Message-State: AEkoouts8HlMVefCjoqQtTxJ4k9ig/Q0/Bj/l0FpBKqggeoNC7iw1VPs/XnebB5/5w5FxA== X-Received: by 10.194.105.40 with SMTP id gj8mr494672wjb.71.1471014458562; Fri, 12 Aug 2016 08:07:38 -0700 (PDT) Received: from haswell.alporthouse.com ([78.156.65.138]) by smtp.gmail.com with ESMTPSA id w129sm2980299wmd.9.2016.08.12.08.07.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Aug 2016 08:07:37 -0700 (PDT) From: Chris Wilson To: intel-gfx@lists.freedesktop.org Date: Fri, 12 Aug 2016 16:07:23 +0100 Message-Id: <1471014450-21020-3-git-send-email-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1471014450-21020-1-git-send-email-chris@chris-wilson.co.uk> References: <1471014450-21020-1-git-send-email-chris@chris-wilson.co.uk> Subject: [Intel-gfx] [PATCH 2/9] drm/i915/cmdparser: Add the TIMESTAMP register for the other engines 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-Virus-Scanned: ClamAV using ClamSMTP Since I have been using the BCS_TIMESTAMP to measure latency of execution upon the blitter ring, allow regular userspace to also read from that register. They are already allowed RCS_TIMESTAMP! Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld --- drivers/gpu/drm/i915/i915_cmd_parser.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_cmd_parser.c b/drivers/gpu/drm/i915/i915_cmd_parser.c index 1882dc28c750..5fbd049f8095 100644 --- a/drivers/gpu/drm/i915/i915_cmd_parser.c +++ b/drivers/gpu/drm/i915/i915_cmd_parser.c @@ -458,6 +458,7 @@ static const struct drm_i915_reg_descriptor gen7_render_regs[] = { REG32(GEN7_GPGPU_DISPATCHDIMX), REG32(GEN7_GPGPU_DISPATCHDIMY), REG32(GEN7_GPGPU_DISPATCHDIMZ), + REG64_IDX(RING_TIMESTAMP, BSD_RING_BASE), REG64_IDX(GEN7_SO_NUM_PRIMS_WRITTEN, 0), REG64_IDX(GEN7_SO_NUM_PRIMS_WRITTEN, 1), REG64_IDX(GEN7_SO_NUM_PRIMS_WRITTEN, 2), @@ -473,6 +474,7 @@ static const struct drm_i915_reg_descriptor gen7_render_regs[] = { REG32(GEN7_L3SQCREG1), REG32(GEN7_L3CNTLREG2), REG32(GEN7_L3CNTLREG3), + REG64_IDX(RING_TIMESTAMP, BLT_RING_BASE), }; static const struct drm_i915_reg_descriptor hsw_render_regs[] = { @@ -502,7 +504,10 @@ static const struct drm_i915_reg_descriptor hsw_render_regs[] = { }; static const struct drm_i915_reg_descriptor gen7_blt_regs[] = { + REG64_IDX(RING_TIMESTAMP, RENDER_RING_BASE), + REG64_IDX(RING_TIMESTAMP, BSD_RING_BASE), REG32(BCS_SWCTRL), + REG64_IDX(RING_TIMESTAMP, BLT_RING_BASE), }; static const struct drm_i915_reg_descriptor ivb_master_regs[] = {