Re: [Intel-gfx] [PATCH 5/9] drm/i915: Enable i915 perf stream for Haswell OA unit

2016-05-04 Thread Daniel Vetter
On Wed, May 04, 2016 at 02:24:14PM +0100, Robert Bragg wrote: > On Wed, May 4, 2016 at 1:24 PM, Daniel Vetter wrote: > > > On Wed, May 04, 2016 at 10:49:53AM +0100, Robert Bragg wrote: > > > On Wed, May 4, 2016 at 10:09 AM, Martin Peres < > > martin.pe...@linux.intel.com> > > >

Re: [Intel-gfx] [PATCH 5/9] drm/i915: Enable i915 perf stream for Haswell OA unit

2016-05-04 Thread Robert Bragg
On Wed, May 4, 2016 at 2:24 PM, Robert Bragg wrote: > > > On Wed, May 4, 2016 at 1:24 PM, Daniel Vetter wrote: > >> On Wed, May 04, 2016 at 10:49:53AM +0100, Robert Bragg wrote: >> > On Wed, May 4, 2016 at 10:09 AM, Martin Peres < >>

Re: [Intel-gfx] [PATCH 5/9] drm/i915: Enable i915 perf stream for Haswell OA unit

2016-05-04 Thread Robert Bragg
On Wed, May 4, 2016 at 1:24 PM, Daniel Vetter wrote: > On Wed, May 04, 2016 at 10:49:53AM +0100, Robert Bragg wrote: > > On Wed, May 4, 2016 at 10:09 AM, Martin Peres < > martin.pe...@linux.intel.com> > > wrote: > > > > > On 03/05/16 23:03, Robert Bragg wrote: > > > > > >> > >

Re: [Intel-gfx] [PATCH 5/9] drm/i915: Enable i915 perf stream for Haswell OA unit

2016-05-04 Thread Daniel Vetter
On Wed, May 04, 2016 at 10:49:53AM +0100, Robert Bragg wrote: > On Wed, May 4, 2016 at 10:09 AM, Martin Peres > wrote: > > > On 03/05/16 23:03, Robert Bragg wrote: > > > >> > >> > >> On Tue, May 3, 2016 at 8:34 PM, Robert Bragg >>

Re: [Intel-gfx] [PATCH 5/9] drm/i915: Enable i915 perf stream for Haswell OA unit

2016-05-04 Thread Robert Bragg
On Wed, May 4, 2016 at 10:04 AM, Martin Peres wrote: > On 03/05/16 22:34, Robert Bragg wrote: > >> Sorry for the delay replying to this, I missed it. >> > > No worries! > > >> On Sat, Apr 23, 2016 at 11:34 AM, Martin Peres >

Re: [Intel-gfx] [PATCH 5/9] drm/i915: Enable i915 perf stream for Haswell OA unit

2016-05-04 Thread Robert Bragg
On Wed, May 4, 2016 at 10:09 AM, Martin Peres wrote: > On 03/05/16 23:03, Robert Bragg wrote: > >> >> >> On Tue, May 3, 2016 at 8:34 PM, Robert Bragg > > wrote: >> >> Sorry for the delay replying to this, I

Re: [Intel-gfx] [PATCH 5/9] drm/i915: Enable i915 perf stream for Haswell OA unit

2016-05-04 Thread Martin Peres
On 03/05/16 23:03, Robert Bragg wrote: On Tue, May 3, 2016 at 8:34 PM, Robert Bragg > wrote: Sorry for the delay replying to this, I missed it. On Sat, Apr 23, 2016 at 11:34 AM, Martin Peres

Re: [Intel-gfx] [PATCH 5/9] drm/i915: Enable i915 perf stream for Haswell OA unit

2016-05-04 Thread Martin Peres
On 03/05/16 22:34, Robert Bragg wrote: Sorry for the delay replying to this, I missed it. No worries! On Sat, Apr 23, 2016 at 11:34 AM, Martin Peres > wrote: On 20/04/16 17:23, Robert Bragg wrote: Gen graphics hardware can be

Re: [Intel-gfx] [PATCH 5/9] drm/i915: Enable i915 perf stream for Haswell OA unit

2016-05-03 Thread Robert Bragg
Sorry for the delay replying to this, I missed it. On Sat, Apr 23, 2016 at 11:34 AM, Martin Peres wrote: > On 20/04/16 17:23, Robert Bragg wrote: > >> Gen graphics hardware can be set up to periodically write snapshots of >> performance counters into a circular buffer via

Re: [Intel-gfx] [PATCH 5/9] drm/i915: Enable i915 perf stream for Haswell OA unit

2016-04-23 Thread Martin Peres
On 20/04/16 17:23, Robert Bragg wrote: Gen graphics hardware can be set up to periodically write snapshots of performance counters into a circular buffer via its Observation Architecture and this patch exposes that capability to userspace via the i915 perf interface. Cc: Chris Wilson

Re: [Intel-gfx] [PATCH 5/9] drm/i915: Enable i915 perf stream for Haswell OA unit

2016-04-23 Thread Chris Wilson
On Thu, Apr 21, 2016 at 05:15:10PM +0100, Robert Bragg wrote: >On Wed, Apr 20, 2016 at 10:11 PM, Chris Wilson ><[1]ch...@chris-wilson.co.uk> wrote: > > On Wed, Apr 20, 2016 at 03:23:10PM +0100, Robert Bragg wrote: > > +static void gen7_update_oacontrol_locked(struct

Re: [Intel-gfx] [PATCH 5/9] drm/i915: Enable i915 perf stream for Haswell OA unit

2016-04-22 Thread Chris Wilson
On Fri, Apr 22, 2016 at 12:04:26PM +0100, Robert Bragg wrote: >On Wed, Apr 20, 2016 at 11:46 PM, Chris Wilson ><[1]ch...@chris-wilson.co.uk> wrote: > > On Wed, Apr 20, 2016 at 03:23:10PM +0100, Robert Bragg wrote: > > +static void gen7_init_oa_buffer(struct drm_i915_private

Re: [Intel-gfx] [PATCH 5/9] drm/i915: Enable i915 perf stream for Haswell OA unit

2016-04-22 Thread Robert Bragg
On Wed, Apr 20, 2016 at 11:46 PM, Chris Wilson wrote: > On Wed, Apr 20, 2016 at 03:23:10PM +0100, Robert Bragg wrote: > > +static void gen7_init_oa_buffer(struct drm_i915_private *dev_priv) > > +{ > > + /* Pre-DevBDW: OABUFFER must be set with counters off, > > +

Re: [Intel-gfx] [PATCH 5/9] drm/i915: Enable i915 perf stream for Haswell OA unit

2016-04-21 Thread Robert Bragg
On Thu, Apr 21, 2016 at 4:18 PM, Robert Bragg wrote: > > > On Thu, Apr 21, 2016 at 12:09 AM, Chris Wilson > wrote: > >> On Wed, Apr 20, 2016 at 03:23:10PM +0100, Robert Bragg wrote: >> > +static void i915_oa_stream_enable(struct i915_perf_stream

Re: [Intel-gfx] [PATCH 5/9] drm/i915: Enable i915 perf stream for Haswell OA unit

2016-04-21 Thread Chris Wilson
On Thu, Apr 21, 2016 at 04:43:19PM +0100, Robert Bragg wrote: >On Wed, Apr 20, 2016 at 11:52 PM, Chris Wilson ><[1]ch...@chris-wilson.co.uk> wrote: > > On Wed, Apr 20, 2016 at 03:23:10PM +0100, Robert Bragg wrote: > > +static int i915_oa_read(struct i915_perf_stream *stream, >

Re: [Intel-gfx] [PATCH 5/9] drm/i915: Enable i915 perf stream for Haswell OA unit

2016-04-21 Thread Robert Bragg
On Wed, Apr 20, 2016 at 10:11 PM, Chris Wilson wrote: > On Wed, Apr 20, 2016 at 03:23:10PM +0100, Robert Bragg wrote: > > +static void gen7_update_oacontrol_locked(struct drm_i915_private > *dev_priv) > > +{ > > + assert_spin_locked(_priv->perf.hook_lock); > > + > >

Re: [Intel-gfx] [PATCH 5/9] drm/i915: Enable i915 perf stream for Haswell OA unit

2016-04-21 Thread Robert Bragg
On Wed, Apr 20, 2016 at 11:52 PM, Chris Wilson wrote: > On Wed, Apr 20, 2016 at 03:23:10PM +0100, Robert Bragg wrote: > > +static int i915_oa_read(struct i915_perf_stream *stream, > > + struct i915_perf_read_state *read_state) > > +{ > > + struct

Re: [Intel-gfx] [PATCH 5/9] drm/i915: Enable i915 perf stream for Haswell OA unit

2016-04-21 Thread Robert Bragg
On Thu, Apr 21, 2016 at 12:09 AM, Chris Wilson wrote: > On Wed, Apr 20, 2016 at 03:23:10PM +0100, Robert Bragg wrote: > > +static void i915_oa_stream_enable(struct i915_perf_stream *stream) > > +{ > > + struct drm_i915_private *dev_priv = stream->dev_priv; > > + > >

Re: [Intel-gfx] [PATCH 5/9] drm/i915: Enable i915 perf stream for Haswell OA unit

2016-04-21 Thread Robert Bragg
On Thu, Apr 21, 2016 at 12:16 AM, Chris Wilson wrote: > On Wed, Apr 20, 2016 at 03:23:10PM +0100, Robert Bragg wrote: > > +static int hsw_enable_metric_set(struct drm_i915_private *dev_priv) > > +{ > > + int ret = i915_oa_select_metric_set_hsw(dev_priv); > > + > > +

Re: [Intel-gfx] [PATCH 5/9] drm/i915: Enable i915 perf stream for Haswell OA unit

2016-04-20 Thread Chris Wilson
On Wed, Apr 20, 2016 at 03:23:10PM +0100, Robert Bragg wrote: > +static int hsw_enable_metric_set(struct drm_i915_private *dev_priv) > +{ > + int ret = i915_oa_select_metric_set_hsw(dev_priv); > + > + if (ret) > + return ret; > + > + I915_WRITE(GDT_CHICKEN_BITS,

Re: [Intel-gfx] [PATCH 5/9] drm/i915: Enable i915 perf stream for Haswell OA unit

2016-04-20 Thread Chris Wilson
On Wed, Apr 20, 2016 at 03:23:10PM +0100, Robert Bragg wrote: > +static void i915_oa_stream_enable(struct i915_perf_stream *stream) > +{ > + struct drm_i915_private *dev_priv = stream->dev_priv; > + > + dev_priv->perf.oa.ops.oa_enable(dev_priv); > + > + if (dev_priv->perf.oa.periodic)

Re: [Intel-gfx] [PATCH 5/9] drm/i915: Enable i915 perf stream for Haswell OA unit

2016-04-20 Thread Chris Wilson
On Wed, Apr 20, 2016 at 03:23:10PM +0100, Robert Bragg wrote: > +static int i915_oa_read(struct i915_perf_stream *stream, > + struct i915_perf_read_state *read_state) > +{ > + struct drm_i915_private *dev_priv = stream->dev_priv; > + > + return

Re: [Intel-gfx] [PATCH 5/9] drm/i915: Enable i915 perf stream for Haswell OA unit

2016-04-20 Thread Chris Wilson
On Wed, Apr 20, 2016 at 03:23:10PM +0100, Robert Bragg wrote: > +static void gen7_init_oa_buffer(struct drm_i915_private *dev_priv) > +{ > + /* Pre-DevBDW: OABUFFER must be set with counters off, > + * before OASTATUS1, but after OASTATUS2 > + */ > + I915_WRITE(GEN7_OASTATUS2,

Re: [Intel-gfx] [PATCH 5/9] drm/i915: Enable i915 perf stream for Haswell OA unit

2016-04-20 Thread Chris Wilson
On Wed, Apr 20, 2016 at 03:23:10PM +0100, Robert Bragg wrote: > +static int alloc_oa_buffer(struct drm_i915_private *dev_priv) > +{ > + struct drm_i915_gem_object *bo; > + int ret; > + > + BUG_ON(dev_priv->perf.oa.oa_buffer.obj); > + > + ret =

Re: [Intel-gfx] [PATCH 5/9] drm/i915: Enable i915 perf stream for Haswell OA unit

2016-04-20 Thread Chris Wilson
On Wed, Apr 20, 2016 at 03:23:10PM +0100, Robert Bragg wrote: > +static void gen7_update_oacontrol_locked(struct drm_i915_private *dev_priv) > +{ > + assert_spin_locked(_priv->perf.hook_lock); > + > + if (dev_priv->perf.oa.exclusive_stream->enabled) { > + unsigned long ctx_id =

Re: [Intel-gfx] [PATCH 5/9] drm/i915: Enable i915 perf stream for Haswell OA unit

2016-04-20 Thread kbuild test robot
Hi, [auto build test ERROR on drm-intel/for-linux-next] [also build test ERROR on next-20160420] [cannot apply to v4.6-rc4] [if your patch is applied to the wrong git tree, please drop us a note to help improving the system] url:

Re: [Intel-gfx] [PATCH 5/9] drm/i915: Enable i915 perf stream for Haswell OA unit

2016-04-20 Thread kbuild test robot
Hi, [auto build test ERROR on drm-intel/for-linux-next] [also build test ERROR on next-20160420] [cannot apply to v4.6-rc4] [if your patch is applied to the wrong git tree, please drop us a note to help improving the system] url:

[Intel-gfx] [PATCH 5/9] drm/i915: Enable i915 perf stream for Haswell OA unit

2016-04-20 Thread Robert Bragg
Gen graphics hardware can be set up to periodically write snapshots of performance counters into a circular buffer via its Observation Architecture and this patch exposes that capability to userspace via the i915 perf interface. Cc: Chris Wilson Signed-off-by: Robert