[Intel-gfx] [RFC PATCH 07/11] drm/i915: Expose PMU for Observation Architecture

2015-05-18 Thread Robert Bragg
On 7 May 2015 15:58, "Chris Wilson" wrote: > > On Thu, May 07, 2015 at 03:15:50PM +0100, Robert Bragg wrote: > > + /* We bypass the default perf core perf_paranoid_cpu() || > > + * CAP_SYS_ADMIN check by using the PERF_PMU_CAP_IS_DEVICE > > + * flag and instead authenticate based on

[Intel-gfx] [RFC PATCH 07/11] drm/i915: Expose PMU for Observation Architecture

2015-05-18 Thread Robert Bragg
On 7 May 2015 15:37, "Chris Wilson" wrote: > > On Thu, May 07, 2015 at 03:15:50PM +0100, Robert Bragg wrote: > > +static int init_oa_buffer(struct perf_event *event) > > +{ > > + struct drm_i915_private *dev_priv = > > + container_of(event->pmu, typeof(*dev_priv), oa_pmu.pmu); > >

[Intel-gfx] [RFC PATCH 07/11] drm/i915: Expose PMU for Observation Architecture

2015-05-07 Thread Chris Wilson
On Thu, May 07, 2015 at 03:15:50PM +0100, Robert Bragg wrote: > + /* We bypass the default perf core perf_paranoid_cpu() || > + * CAP_SYS_ADMIN check by using the PERF_PMU_CAP_IS_DEVICE > + * flag and instead authenticate based on whether the current > + * pid owns the specified

[Intel-gfx] [RFC PATCH 07/11] drm/i915: Expose PMU for Observation Architecture

2015-05-07 Thread Chris Wilson
On Thu, May 07, 2015 at 03:15:50PM +0100, Robert Bragg wrote: > +static int init_oa_buffer(struct perf_event *event) > +{ > + struct drm_i915_private *dev_priv = > + container_of(event->pmu, typeof(*dev_priv), oa_pmu.pmu); > + struct drm_i915_gem_object *bo; > + int ret; >