[PATCH v3 06/11] drm/i915: Enable i915 perf stream for Haswell OA unit

Chris Wilson chris at chris-wilson.co.uk
Mon Aug 15 15:47:59 UTC 2016


On Mon, Aug 15, 2016 at 03:41:23PM +0100, Robert Bragg wrote:
>  int __must_check i915_gem_evict_something(struct drm_device *dev,
> diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
> index bd13d08..b4de357 100644
> --- a/drivers/gpu/drm/i915/i915_gem_context.c
> +++ b/drivers/gpu/drm/i915/i915_gem_context.c
> @@ -134,6 +134,24 @@ static int get_context_size(struct drm_i915_private *dev_priv)
>  	return ret;
>  }
>  
> +int i915_gem_context_pin_legacy_rcs_state(struct drm_i915_private *dev_priv,
> +					  struct i915_gem_context *ctx)
> +{
> +	int ret;
> +
> +	lockdep_assert_held(&ctx->i915->drm.struct_mutex);
> +
> +	ret = i915_gem_obj_ggtt_pin(ctx->engine[RCS].state,
> +				    ctx->ggtt_alignment,
> +				    0);
> +	if (ret)
> +		return ret;
> +
> +	i915_oa_legacy_context_pin_notify(dev_priv, ctx);
> +
> +	return 0;
> +}

I am still not all at all happy with this. I hope the recent changes to
do the vma tracking make it clear.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the dri-devel mailing list