Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Bragg <robert@sixbynine.org>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH v3 1/7] drm/i915: expose _SLICE_MASK GETPARM
Date: Wed,  5 Apr 2017 17:23:14 +0100	[thread overview]
Message-ID: <20170405162320.30094-2-robert@sixbynine.org> (raw)
In-Reply-To: <20170405162320.30094-1-robert@sixbynine.org>

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 <robert@sixbynine.org>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
---
 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 5852eed2a867..337acf034d36 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.
-- 
2.12.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-04-05 16:23 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-05 16:23 [PATCH v3 0/7] Enable OA unit for Gen 8 and 9 in i915 perf Robert Bragg
2017-04-05 16:23 ` Robert Bragg [this message]
2017-04-05 16:23 ` [PATCH v3 2/7] drm/i915: expose _SUBSLICE_MASK GETPARM Robert Bragg
2017-04-05 16:23 ` [PATCH v3 3/7] drm/i915/perf: Add 'render basic' Gen8+ OA unit configs Robert Bragg
2017-04-05 16:23 ` [PATCH v3 4/7] drm/i915/perf: Add OA unit support for Gen 8+ Robert Bragg
2017-04-06 16:56   ` Lionel Landwerlin
2017-04-12 11:33   ` Matthew Auld
2017-04-12 14:57     ` Robert Bragg
2017-04-05 16:23 ` [PATCH v3 5/7] drm/i915/perf: Add more OA configs for BDW, CHV, SKL + BXT Robert Bragg
2017-04-05 16:23 ` [PATCH v3 6/7] drm/i915/perf: per-gen timebase for checking sample freq Robert Bragg
2017-04-05 16:49   ` Lionel Landwerlin
2017-04-05 17:06   ` Ville Syrjälä
2017-04-05 17:17     ` Lionel Landwerlin
2017-04-05 17:26       ` Ville Syrjälä
2017-04-05 17:59         ` Robert Bragg
2017-04-05 19:05   ` [PATCH v2] " Robert Bragg
2017-04-12 12:34     ` Matthew Auld
2017-04-12 15:07       ` Robert Bragg
2017-04-05 16:23 ` [PATCH v3 7/7] drm/i915/perf: remove perf.hook_lock Robert Bragg
2017-04-12 11:36   ` Matthew Auld
2017-04-05 16:42 ` ✓ Fi.CI.BAT: success for Enable OA unit for Gen 8 and 9 in i915 perf (rev4) Patchwork
2017-04-05 19:21 ` ✓ Fi.CI.BAT: success for Enable OA unit for Gen 8 and 9 in i915 perf (rev5) Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170405162320.30094-2-robert@sixbynine.org \
    --to=robert@sixbynine.org \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox