From patchwork Wed Feb 22 16:36:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Bragg X-Patchwork-Id: 9587151 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 2AE636051E for ; Wed, 22 Feb 2017 16:37:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 118ED22638 for ; Wed, 22 Feb 2017 16:37:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0685C28305; Wed, 22 Feb 2017 16:37:13 +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 E768422638 for ; Wed, 22 Feb 2017 16:37:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5B0CC6E85C; Wed, 22 Feb 2017 16:37:11 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wr0-x243.google.com (mail-wr0-x243.google.com [IPv6:2a00:1450:400c:c0c::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6915F6E85E for ; Wed, 22 Feb 2017 16:37:09 +0000 (UTC) Received: by mail-wr0-x243.google.com with SMTP id 89so1052353wrr.1 for ; Wed, 22 Feb 2017 08:37:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=VVmQxQk/gsbvc1Nf/BTUccknV02+BNSQwz6qbMpmjt0=; b=G7ibH0kSY6s0TvqifKTzFlGeYHeG+VaRkWVU8hIQLftmr804EiPCNt67Ld+5RYIUkZ HUHC0BRFCGdmZ7H2f4LEu2o7g+y8lEzOG6d2Pnx2sRIZoWCvnH3Sda1EXWbxJK91WJS9 WzWhILNjCwg29QJ81FfbF6OwpqAVoNQd1weEhD48hMwhN7CkFHcp13l8u/78q/Lbqx/D QwlmnyPBP9XXyciWFRd5cW9DP8WMciCJeaCQ3nxo4Njn38png16T1E0Ms+CWbFRuT/+/ 0gEdcVr/vD+LV0cQ6DxhbYiNtuM3Fe1W2kfI9Ji6kQy4wmLGAB2+hh6/tjIAY+AUTdtL qNXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=VVmQxQk/gsbvc1Nf/BTUccknV02+BNSQwz6qbMpmjt0=; b=GjCsEsUvIg5mVC9GU5uRALmBa60PDRnetK5zCCuq9SiJRUEZnY0wae9nZtmtNTvPhR tQ3kO8LZ6sc25tC8ZAEQ6BfP/8rePiqMYEb90A7g0K0Kp+pK0HQh4hijgwheMwRcU5OA 3CCCcPnNW945o5CIvuhye0T6L6LugapQMO1qCW+XwrLgRLBtDdDaDogrMq7BUWGM5mGI ah7rn6zWXqAZ+P02lA7gs8gjxgoTcpImjB8h+aa64mtNLOepHNPHiMtbslGyzUuUrM43 C1o77k7W3MmuYPdhFp4kwymdpuRvt8/f/XRtkiJ+JeLZ4ZuGBZOkR4IdBBxr0jzavg4m 6Egg== X-Gm-Message-State: AMke39kf454LktgNeygCSJClQcsbfyaS3M2AO/IyLSB4Hfy9tmz/UK95AZGzDGwXzhu7MA== X-Received: by 10.223.146.2 with SMTP id 2mr13063817wrj.85.1487781427774; Wed, 22 Feb 2017 08:37:07 -0800 (PST) Received: from sixbynine.org (cpc26-heme10-2-0-cust305.9-1.cable.virginm.net. [86.3.57.50]) by smtp.gmail.com with ESMTPSA id e6sm2372764wrc.30.2017.02.22.08.37.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 22 Feb 2017 08:37:07 -0800 (PST) From: Robert Bragg To: intel-gfx@lists.freedesktop.org Date: Wed, 22 Feb 2017 16:36:29 +0000 Message-Id: <20170222163634.7079-2-robert@sixbynine.org> X-Mailer: git-send-email 2.11.1 In-Reply-To: <20170222163634.7079-1-robert@sixbynine.org> References: <20170222163634.7079-1-robert@sixbynine.org> Subject: [Intel-gfx] [PATCH 1/6] drm/i915: expose _SLICE_MASK GETPARM 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 Enables userspace to determine the number of slices enabled and also know what specific slices are enabled. This information is required, for example, to be able to analyse some OA counter reports where the counter configuration depends on the HW slice configuration. Signed-off-by: Robert Bragg --- drivers/gpu/drm/i915/i915_drv.c | 5 +++++ include/uapi/drm/i915_drm.h | 1 + 2 files changed, 6 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index b76e8f7ac174..d391768f301b 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -359,6 +359,11 @@ static int i915_getparam(struct drm_device *dev, void *data, */ value = 1; break; + case I915_PARAM_SLICE_MASK: + value = INTEL_INFO(dev_priv)->sseu.slice_mask; + if (!value) + return -ENODEV; + break; default: DRM_DEBUG("Unknown parameter %d\n", param->param); return -EINVAL; diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h index 3554495bef13..f47fb7f26f36 100644 --- a/include/uapi/drm/i915_drm.h +++ b/include/uapi/drm/i915_drm.h @@ -392,6 +392,7 @@ typedef struct drm_i915_irq_wait { #define I915_PARAM_HAS_POOLED_EU 38 #define I915_PARAM_MIN_EU_IN_POOL 39 #define I915_PARAM_MMAP_GTT_VERSION 40 +#define I915_PARAM_SLICE_MASK 45 /* XXX: rebase before landing */ /* Query whether DRM_I915_GEM_EXECBUFFER2 supports user defined execution * priorities and the driver will attempt to execute batches in priority order.