On Mon, 2016-11-07 at 03:10 -0800, Matthew Auld wrote:
> On 4 November 2016 at 09:30,  <sourab.gu...@intel.com> wrote:
> > From: Sourab Gupta <sourab.gu...@intel.com>
> >
> > Add a compile time option for detecting the overflow condition of command
> > stream buffer, and not overwriting the old entries in such a case.
> > Also, set a status flag to forward the overflow condition to userspace if
> > overflow is detected.
> >
> > Signed-off-by: Sourab Gupta <sourab.gu...@intel.com>
> > ---
> >  drivers/gpu/drm/i915/i915_drv.h  |  2 ++
> >  drivers/gpu/drm/i915/i915_perf.c | 75 
> > ++++++++++++++++++++++++++++++++--------
> >  2 files changed, 62 insertions(+), 15 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_drv.h 
> > b/drivers/gpu/drm/i915/i915_drv.h
> > index dedb7f8..e9cf939 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.h
> > +++ b/drivers/gpu/drm/i915/i915_drv.h
> > @@ -2235,6 +2235,8 @@ struct drm_i915_private {
> >                         struct drm_i915_gem_object *obj;
> >                         struct i915_vma *vma;
> >                         u8 *addr;
> > +#define I915_PERF_CMD_STREAM_BUF_STATUS_OVERFLOW (1<<0)
> > +                       u32 status;
> >                 } command_stream_buf;
> >
> >                 struct list_head node_list;
> > diff --git a/drivers/gpu/drm/i915/i915_perf.c 
> > b/drivers/gpu/drm/i915/i915_perf.c
> > index 2ee4711..e10e78f 100644
> > --- a/drivers/gpu/drm/i915/i915_perf.c
> > +++ b/drivers/gpu/drm/i915/i915_perf.c
> > @@ -247,6 +247,9 @@ static u32 i915_perf_stream_paranoid = true;
> >  #define GEN8_OAREPORT_REASON_GO_TRANSITION  (1<<23)
> >  #define GEN9_OAREPORT_REASON_CLK_RATIO      (1<<24)
> >
> > +/* For determining the behavior on overflow of command stream samples */
> > +#define CMD_STREAM_BUF_OVERFLOW_ALLOWED
> By compile time option I sort of imagined this would be a kconfig
> option, otherwise I would be expected to manually hack at this file
> and carry around the local change ?

Well, I intend to remove the compile time option and have the behavior so as to
allow the overflow of buffer. It has to be in compliance with the behavior of 
periodic
OA stream (Robert's patchset).
Robert,
What are your views here. Should default behavior be allow overflow?
(and possibly set a status flag informing userspace of overflow?)


_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to