[Intel-gfx] [PATCH] drm/i915: add turbo boost trace point
Jesse Barnes
jbarnes at virtuousgeek.org
Wed Nov 19 16:39:17 CET 2014
On Wed, 19 Nov 2014 15:00:04 +0100
Daniel Vetter <daniel at ffwll.ch> wrote:
> On Tue, Nov 18, 2014 at 01:12:29PM -0800, Jesse Barnes wrote:
> > Might be helpful for debugging places where userspace ends up boosting
> > or waiting where it doesn't intend to.
>
> Might be feels a bit weak justification for a new tracepoint imo. Please
> drum up more support.
I put it together for some media playback debugging we're doing on
Chrome, where I suspect we're boosting when we don't want to (possibly
due to userspace waits).
>
> > Signed-off-by: Jesse Barnes <jbarnes at virtuousgeek.org>
> > ---
> > drivers/gpu/drm/i915/i915_gem.c | 6 ++++--
> > drivers/gpu/drm/i915/i915_trace.h | 15 +++++++++++++++
> > drivers/gpu/drm/i915/intel_pm.c | 9 +++++++--
> > 3 files changed, 26 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> > index 86cf428..b03cb07 100644
> > --- a/drivers/gpu/drm/i915/i915_gem.c
> > +++ b/drivers/gpu/drm/i915/i915_gem.c
> > @@ -4209,8 +4209,10 @@ i915_gem_object_ggtt_unpin(struct drm_i915_gem_object *obj)
> > struct i915_vma *vma = i915_gem_obj_to_ggtt(obj);
> >
> > BUG_ON(!vma);
> > - BUG_ON(vma->pin_count == 0);
> > - BUG_ON(!i915_gem_obj_ggtt_bound(obj));
> > + if (WARN(vma->pin_count == 0, "bad pin count\n"))
> > + return;
> > + if (WARN(!i915_gem_obj_ggtt_bound(obj), "obj not bound\n"))
> > + return;
>
> Separate patch. Can you please split it out with the usual "BUG_ON
> considered harmful" commit message?
Oops forgot about that hunk. Yeah I was debugging a mode setting
failure and ran into this BUG, which made things a little tougher when
I only had one machine... But this hunk can be ignored.
--
Jesse Barnes, Intel Open Source Technology Center
More information about the Intel-gfx
mailing list