From patchwork Wed Apr 5 16:23:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Bragg X-Patchwork-Id: 9664651 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 754F3602B8 for ; Wed, 5 Apr 2017 16:23:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6873928159 for ; Wed, 5 Apr 2017 16:23:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5BE7428395; Wed, 5 Apr 2017 16:23:40 +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 0459628159 for ; Wed, 5 Apr 2017 16:23:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8370A6E83B; Wed, 5 Apr 2017 16:23:39 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wr0-x244.google.com (mail-wr0-x244.google.com [IPv6:2a00:1450:400c:c0c::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id D8A2D6E83B for ; Wed, 5 Apr 2017 16:23:37 +0000 (UTC) Received: by mail-wr0-x244.google.com with SMTP id w43so4106723wrb.1 for ; Wed, 05 Apr 2017 09:23:37 -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=EtAaj2KAdRxzSHaFW8smoweHqX/ze3TxDI1RUomyMxg=; b=k3QT5UoAc+yyMxJ6xbKJnSBuBjS3FNgRypIum/oIiio3l/58ytWXEyK/BUnYnYrBGd 6G5Qhfwo7mW2wjanrpuLkuHqSmMZH9Duw2kVuU4VM+bCyfy2DL/3k7Liy0nuDDAUUnmg pcjpf8vLTTJ1j3OMmjGCiVRoRpxsCSbUSik1we4zjqCwxIYL7S5x/DIDSy0Z/8HuQE1a KlOWd1VPB3v/sg4cHiXFn/X71FriE4+fZhv1im/dT+J0Qr7UNFINVzxTv3iXfn5QuQGp /cuox0Mi+p2tvUnOEsIcFNZ6TXoahRZ+Ua/CFP+DYrMJbE6gqnLN6yc8i1F4Ux869Rs6 TxHA== 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=EtAaj2KAdRxzSHaFW8smoweHqX/ze3TxDI1RUomyMxg=; b=FfvLloqCAZrBIkAkujlsCJO66ayT4Tk7AOrjxo47ezqXm5xLQmmr7GfJqSdbgbW++a Ra82JSg1UvmbpBdw/TQDmuqjC07oQLj3oT7yyetw62b/m4ROL9KJJBBikV/HdGFYcr+N vrS8zQwKbPK/A5RPG1HDf3TQ884BifEjXPOTPgX/lnw80rqDoFZEQBdhROs00BJPghPU vTjOQ2Mp5gUv2kFifr9Iq/mimNIntCxN5UyKlnPnf/gCfnkrwZ4kzTRIa7DVyn7YoayQ 9yTUwJQ8AGzWMBqcrfwK+IzpShy8y3ZN+kg8asDUwdsV2xvVpw8cNTrwjEK4HO7zStkd MobA== X-Gm-Message-State: AFeK/H352zP/YlnuBc4ODqrQBCWBaRoU0HhPX5SB0VVI7la9QMhDH4ratIMBN5U/Uz0yjg== X-Received: by 10.28.58.15 with SMTP id h15mr10194328wma.60.1491409416381; Wed, 05 Apr 2017 09:23:36 -0700 (PDT) Received: from sixbynine.org (host-78-151-19-25.as13285.net. [78.151.19.25]) by smtp.gmail.com with ESMTPSA id s27sm22116534wra.69.2017.04.05.09.23.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Apr 2017 09:23:35 -0700 (PDT) From: Robert Bragg To: intel-gfx@lists.freedesktop.org Date: Wed, 5 Apr 2017 17:23:15 +0100 Message-Id: <20170405162320.30094-3-robert@sixbynine.org> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170405162320.30094-1-robert@sixbynine.org> References: <20170405162320.30094-1-robert@sixbynine.org> Subject: [Intel-gfx] [PATCH v3 2/7] 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 337acf034d36..e4ed70d21e91 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.