Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sourab gupta <sourab.gupta@intel.com>
To: Matthew Auld <matthew.william.auld@gmail.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	"Auld, Matthew" <matthew.auld@intel.com>
Subject: Re: [PATCH 05/15] drm/i915: Handle the overflow condition for command stream buf
Date: Mon, 07 Nov 2016 20:05:03 +0530	[thread overview]
Message-ID: <1478529303.18863.34.camel@sourab-desktop> (raw)
In-Reply-To: <CAM0jSHPko=4jowV8PXJBQq8iGZcGGxyNNEhExE2+VM885pNJ=g@mail.gmail.com>


On Mon, 2016-11-07 at 03:10 -0800, Matthew Auld wrote:
> On 4 November 2016 at 09:30,  <sourab.gupta@intel.com> wrote:
> > From: Sourab Gupta <sourab.gupta@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.gupta@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	other threads:[~2016-11-07 14:32 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-04  9:30 [PATCH 00/15] Framework to collect command stream gpu metrics using i915 perf sourab.gupta
2016-11-04  9:30 ` [PATCH 01/15] drm/i915: Add ctx getparam ioctl parameter to retrieve ctx unique id sourab.gupta
2016-11-04  9:30 ` [PATCH 02/15] drm/i915: Expose OA sample source to userspace sourab.gupta
2016-11-04  9:30 ` [PATCH 03/15] drm/i915: Framework for capturing command stream based OA reports sourab.gupta
2016-11-04  9:30 ` [PATCH 04/15] drm/i915: flush periodic samples, in case of no pending CS sample requests sourab.gupta
2016-11-04  9:30 ` [PATCH 05/15] drm/i915: Handle the overflow condition for command stream buf sourab.gupta
2016-11-07 11:10   ` Matthew Auld
2016-11-07 14:35     ` sourab gupta [this message]
2016-11-04  9:30 ` [PATCH 06/15] drm/i915: Populate ctx ID for periodic OA reports sourab.gupta
2016-11-04 10:01   ` Chris Wilson
2016-11-07 10:28     ` [PATCH v2 " sourab.gupta
2016-11-04  9:30 ` [PATCH 07/15] drm/i915: Add support for having pid output with OA report sourab.gupta
2016-11-04  9:30 ` [PATCH 08/15] drm/i915: Add support for emitting execbuffer tags through OA counter reports sourab.gupta
2016-11-04 10:04   ` Chris Wilson
2016-11-07 10:30     ` [PATCH v2 " sourab.gupta
2016-11-04  9:30 ` [PATCH 09/15] drm/i915: Extend i915 perf framework for collecting timestamps on all gpu engines sourab.gupta
2016-11-04  9:30 ` [PATCH 10/15] drm/i915: Extract raw GPU timestamps from OA reports to forward in perf samples sourab.gupta
2016-11-04  9:30 ` [PATCH 11/15] drm/i915: Support opening multiple concurrent perf streams sourab.gupta
2016-11-04  9:30 ` [PATCH 12/15] time: Expose current clocksource in use by timekeeping framework sourab.gupta
2016-11-04  9:30 ` [PATCH 13/15] time: export clocks_calc_mult_shift sourab.gupta
2016-11-04  9:30 ` [PATCH 14/15] drm/i915: Mechanism to forward clock monotonic raw time in perf samples sourab.gupta
2016-11-04  9:42   ` Chris Wilson
2016-11-07 10:32     ` [PATCH v2 " sourab.gupta
2016-11-04  9:30 ` [PATCH 15/15] drm/i915: Support for capturing MMIO register values sourab.gupta
  -- strict thread matches above, loose matches on Subject: below --
2016-06-02  5:18 [PATCH 00/15] Framework to collect command stream gpu metrics using i915 perf sourab.gupta
2016-06-02  5:18 ` [PATCH 05/15] drm/i915: Handle the overflow condition for command stream buf sourab.gupta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1478529303.18863.34.camel@sourab-desktop \
    --to=sourab.gupta@intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.auld@intel.com \
    --cc=matthew.william.auld@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox