From patchwork Thu Mar 23 20:18:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Bragg X-Patchwork-Id: 9641905 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 A8235601E9 for ; Thu, 23 Mar 2017 20:18:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 984812840E for ; Thu, 23 Mar 2017 20:18:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8D3412846B; Thu, 23 Mar 2017 20:18:53 +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 54EBF2840E for ; Thu, 23 Mar 2017 20:18:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DE2916EB48; Thu, 23 Mar 2017 20:18:52 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 189D66EB48 for ; Thu, 23 Mar 2017 20:18:49 +0000 (UTC) Received: by mail-wm0-x242.google.com with SMTP id u132so1496647wmg.1 for ; Thu, 23 Mar 2017 13:18:49 -0700 (PDT) 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=o/amLItDRJJY/bWE3L3kmzpONsqX3eQTx9ABpUQ86+g=; b=QsPPhmdpzzepPo4Gc3Ac1xJtwolvLBN7sssMR0Xj1ZDQLuouzHoyb/ypW5pT13KOyZ TTLAxj6wfp58+nr+wKSnA5y26GrO9jN8XUjQYmbRc6KB3oMxhAXa24/EeLcsdvjM6Jf5 Hve8GNczUWuvB/Qps05fEkoLt0ik1nmFjYjaaQ8tK4PSIkgXbeq0LwrsGK6F3/ZhUldr m5IPUV0HOOATgbsZtQSFfuino3zEfMIdKtVo1bQUJME1fCQmnQt7q40rOfDgyLO1NFp1 1Vs7Z7JwxBJ1bbYqNXGHkQKtlhFzOHXyJPYLFy8kubyGcmnvseFae2jEdC0s38/yNjqP hYPg== 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=o/amLItDRJJY/bWE3L3kmzpONsqX3eQTx9ABpUQ86+g=; b=Bd/x2kx2iv175cCeu3G3pmfB+qbFUsRtD/FYRSRo0rw9V8BbTczlYlZrbqDTS6B3pb IJQ9/JJj5cyppP2lKrwT8EdXbmQjPXQnx6haaN9z2Ja3TSNY/JGSA2wbxhxpz6551P8a paVlGxOXkGja1nxPBuGWnRB9i0poGYcbsO0N87oJN6uy/VFjYTKneN0KBvEmyyr8mATP Pj98ivty81zKtSTVmf4Q4oTwhRgCfTw0WuOK3J3kVX2/0Dm4OUnKq/BbZzn6rGkIaxAf GvqbrSPnkyfAw0rZWfkZ6IUND9S6pdWj0vdZ3MnDqw/n3r7AsDO+6j7m7Lot7b0695ni ilfQ== X-Gm-Message-State: AFeK/H3pQnuxnSdAfBBW+xVq7faXNt7wOTehsDIOmlin295Zn+o9bNKKU/5P+rX1szhG8w== X-Received: by 10.28.84.18 with SMTP id i18mr14281398wmb.130.1490300327765; Thu, 23 Mar 2017 13:18:47 -0700 (PDT) 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 u41sm114763wrc.24.2017.03.23.13.18.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 23 Mar 2017 13:18:47 -0700 (PDT) From: Robert Bragg To: intel-gfx@lists.freedesktop.org Date: Thu, 23 Mar 2017 20:18:34 +0000 Message-Id: <20170323201837.4683-3-robert@sixbynine.org> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170323201837.4683-1-robert@sixbynine.org> References: <20170323201837.4683-1-robert@sixbynine.org> Subject: [Intel-gfx] [PATCH v2 2/5] drm/i915: expose _SUBSLICE_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 Assuming a uniform mask across all slices, this enables userspace to determine the specific sub slices enabled. This information is required, for example, to be able to analyse some OA counter reports where the counter configuration depends on the HW sub slice configuration. Signed-off-by: Robert Bragg Reviewed-by: Matthew Auld --- 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 ad12ffc356be..c39a03c1f78d 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -362,6 +362,11 @@ static int i915_getparam(struct drm_device *dev, void *data, if (!value) return -ENODEV; break; + case I915_PARAM_SUBSLICE_MASK: + value = INTEL_INFO(dev_priv)->sseu.subslice_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 f47fb7f26f36..e0599e729e68 100644 --- a/include/uapi/drm/i915_drm.h +++ b/include/uapi/drm/i915_drm.h @@ -393,6 +393,7 @@ typedef struct drm_i915_irq_wait { #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 */ +#define I915_PARAM_SUBSLICE_MASK 46 /* Query whether DRM_I915_GEM_EXECBUFFER2 supports user defined execution * priorities and the driver will attempt to execute batches in priority order.