From patchwork Thu Mar 23 20:18:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Bragg X-Patchwork-Id: 9641903 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 5F594601E9 for ; Thu, 23 Mar 2017 20:18:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4F36F2840E for ; Thu, 23 Mar 2017 20:18:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 43FE028446; Thu, 23 Mar 2017 20:18:51 +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 CB2EF2846B for ; Thu, 23 Mar 2017 20:18:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E02716EB49; Thu, 23 Mar 2017 20:18:48 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id E645C6E29B for ; Thu, 23 Mar 2017 20:18:47 +0000 (UTC) Received: by mail-wm0-x241.google.com with SMTP id z133so1498934wmb.2 for ; Thu, 23 Mar 2017 13:18:47 -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=9d43JOsQcu9Grbw2JvXBd/5amEWWaEE7zmzwaDApp5k=; b=b3XVnw0lUxOKmUNdpRRPnpqWhM/gXKkT0NopWii3GFLK3mUQ5ask0GlQ+AbzTfZYwR LwLOTd5U3ZVyGgADodLyONXxuog2xfhwHFik7mL41bAUsMhot7I5zENQHm+eCMFCzl2U iCv2GoWNyXgu4MpF2GsYvD0fprgGJjrUHO2BP4E4qXwqkQ53Pioj1Or/ANGouKfi+kVF Jc3KSKYexxLSQPZOiaYqKci6yuVllL821QzxLh0m4Eg3lvHb5x4YbTHxFUeVD6lI4wcJ qRUggOBpy7UlnqYFYlcW0gfBBXrKRdSnTpq91IXshfre8hAmk+5mUUQIpmSGUn54yLOJ 20Sw== 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=9d43JOsQcu9Grbw2JvXBd/5amEWWaEE7zmzwaDApp5k=; b=EjNcywBUTMfSAabV4H+UzmB/kdFmS6Mscu2oTqUtj/8K6LoR4ltMt+5GpvLntGu3ii QklTMjm90IUHvsPR32itHg9Ifgs+xH0TC2fZRS1a5QgRxpFqeuJTOFDqRukF2H96ayAI gPmhUOCUjLWT+YNqhVQzQFdEe2k9R1T6BgaPp3JaAcKFL10Qo8qSMjf3sn4hJ+4M4P/L yZggsekzXbe5unNqCRtBRBdvMkQWK8VytN4wBCjwIMKs8F5zNqBB1/6RkWEyHQZMncW5 Pmyh71jIivuqDAfI0fV6WOkyj36DfP10Mf/x6pCRi5klCtL23a5XwN3kK1R321N2hsbb Xypw== X-Gm-Message-State: AFeK/H3Md45oJPznMD8GW6WTqWtcyycC41FFmKPBHO1M7e9OUnc5xBgkw08Pwl8N3Oo3Qw== X-Received: by 10.28.98.66 with SMTP id w63mr4578749wmb.33.1490300326487; Thu, 23 Mar 2017 13:18:46 -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 81sm115783wmj.9.2017.03.23.13.18.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 23 Mar 2017 13:18:45 -0700 (PDT) From: Robert Bragg To: intel-gfx@lists.freedesktop.org Date: Thu, 23 Mar 2017 20:18:33 +0000 Message-Id: <20170323201837.4683-2-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 1/5] 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 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 6d9944a00b7d..ad12ffc356be 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -357,6 +357,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.