Skip to content

Commit 85be763

Browse files
committed
drm/i915: expose _SUBSLICE_MASK GETPARM
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 <[email protected]>
1 parent c9e71d5 commit 85be763

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

drivers/gpu/drm/i915/i915_dma.c

+5
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,11 @@ static int i915_getparam(struct drm_device *dev, void *data,
175175
if (!value)
176176
return -ENODEV;
177177
break;
178+
case I915_PARAM_SUBSLICE_MASK:
179+
value = INTEL_INFO(dev_priv)->subslice_mask;
180+
if (!value)
181+
return -ENODEV;
182+
break;
178183
default:
179184
DRM_DEBUG("Unknown parameter %d\n", param->param);
180185
return -EINVAL;

include/uapi/drm/i915_drm.h

+1
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ typedef struct drm_i915_irq_wait {
359359
#define I915_PARAM_HAS_GPU_RESET 35
360360
#define I915_PARAM_HAS_RESOURCE_STREAMER 36
361361
#define I915_PARAM_SLICE_MASK 45 /* XXX: rebase before landing */
362+
#define I915_PARAM_SUBSLICE_MASK 46
362363

363364
typedef struct drm_i915_getparam {
364365
__s32 param;

0 commit comments

Comments
 (0)