[Intel-gfx] [PATCH 06/15] drm/i915: Populate ctx ID for periodic OA reports

Chris Wilson chris at chris-wilson.co.uk
Fri Nov 4 10:01:08 UTC 2016


On Fri, Nov 04, 2016 at 03:00:35PM +0530, sourab.gupta at intel.com wrote:
> +static u32 gen8_oa_buffer_get_ctx_id(struct i915_perf_stream *stream,
> +				    const u8 *report)
> +{
> +	struct drm_i915_private *dev_priv = stream->dev_priv;
> +
> +	/* The ctx ID present in the OA reports have intel_context::global_id
> +	 * present, since this is programmed into the ELSP in execlist mode.
> +	 * In non-execlist mode, fall back to retrieving the ctx ID from the
> +	 * last saved ctx ID from command stream mode.
> +	 */
> +	if (i915.enable_execlists) {
> +		u32 ctx_id = *(u32 *)(report + 12);
> +		ctx_id &= 0xfffff;

This does not match the hw maximum. Please check to see who is correct.

> +		return ctx_id;
> +	} else {
> +		if (!stream->cs_mode)
> +		WARN_ONCE(1,
> +			"CTX ID can't be retrieved if command stream mode not enabled");

All these WARNs appear to be user triggerable.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list