From: Daniel Vetter Subject: Re: [PATCH v4 5/9] drm/i915: Add pipe update trace points Date: Tue, 29 Apr 2014 13:17:12 +0200 Message-ID: <20140429111712.GO32404@phenom.ffwll.local> References: <1398767752-619-1-git-send-email-ville.syrjala@linux.intel.com> <1398767752-619-6-git-send-email-ville.syrjala@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail-ee0-f48.google.com (mail-ee0-f48.google.com [74.125.83.48]) by gabe.freedesktop.org (Postfix) with ESMTP id 693A4892B9 for ; Tue, 29 Apr 2014 04:17:17 -0700 (PDT) Received: by mail-ee0-f48.google.com with SMTP id b57so193403eek.35 for ; Tue, 29 Apr 2014 04:17:16 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1398767752-619-6-git-send-email-ville.syrjala@linux.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: ville.syrjala@linux.intel.com Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Tue, Apr 29, 2014 at 01:35:48PM +0300, ville.syrjala@linux.intel.com wro= te: > From: Ville Syrj=E4l=E4 > = > Add trace points for observing the atomic pipe update mechanism. > = > v2: Rebased due to earlier changes > v3: Pass intel_crtc instead of drm_crtc (Daniel) > v4: Pass frame counter from the caller to evaded/end since > the caller now always has that ready > = > Reviewed-by: Jesse Barnes > Reviewed-by: Sourab Gupta > Reviewed-by: Akash Goel > Signed-off-by: Ville Syrj=E4l=E4 Merged up to this one here. Can you please update the review-AR for Akash and Sourab for the remaining patches? Thanks, Daniel > --- > drivers/gpu/drm/i915/i915_trace.h | 75 +++++++++++++++++++++++++++++++= ++++++ > drivers/gpu/drm/i915/intel_sprite.c | 6 +++ > 2 files changed, 81 insertions(+) > = > diff --git a/drivers/gpu/drm/i915/i915_trace.h b/drivers/gpu/drm/i915/i91= 5_trace.h > index 23c26f1..b29d7b1 100644 > --- a/drivers/gpu/drm/i915/i915_trace.h > +++ b/drivers/gpu/drm/i915/i915_trace.h > @@ -7,6 +7,7 @@ > = > #include > #include "i915_drv.h" > +#include "intel_drv.h" > #include "intel_ringbuffer.h" > = > #undef TRACE_SYSTEM > @@ -14,6 +15,80 @@ > #define TRACE_SYSTEM_STRING __stringify(TRACE_SYSTEM) > #define TRACE_INCLUDE_FILE i915_trace > = > +/* pipe updates */ > + > +TRACE_EVENT(i915_pipe_update_start, > + TP_PROTO(struct intel_crtc *crtc, u32 min, u32 max), > + TP_ARGS(crtc, min, max), > + > + TP_STRUCT__entry( > + __field(enum pipe, pipe) > + __field(u32, frame) > + __field(u32, scanline) > + __field(u32, min) > + __field(u32, max) > + ), > + > + TP_fast_assign( > + __entry->pipe =3D crtc->pipe; > + __entry->frame =3D crtc->base.dev->driver->get_vblank_counter(crtc= ->base.dev, > + crtc->pipe); > + __entry->scanline =3D intel_get_crtc_scanline(crtc); > + __entry->min =3D min; > + __entry->max =3D max; > + ), > + > + TP_printk("pipe %c, frame=3D%u, scanline=3D%u, min=3D%u, max=3D%u", > + pipe_name(__entry->pipe), __entry->frame, > + __entry->scanline, __entry->min, __entry->max) > +); > + > +TRACE_EVENT(i915_pipe_update_vblank_evaded, > + TP_PROTO(struct intel_crtc *crtc, u32 min, u32 max, u32 frame), > + TP_ARGS(crtc, min, max, frame), > + > + TP_STRUCT__entry( > + __field(enum pipe, pipe) > + __field(u32, frame) > + __field(u32, scanline) > + __field(u32, min) > + __field(u32, max) > + ), > + > + TP_fast_assign( > + __entry->pipe =3D crtc->pipe; > + __entry->frame =3D frame; > + __entry->scanline =3D intel_get_crtc_scanline(crtc); > + __entry->min =3D min; > + __entry->max =3D max; > + ), > + > + TP_printk("pipe %c, frame=3D%u, scanline=3D%u, min=3D%u, max=3D%u", > + pipe_name(__entry->pipe), __entry->frame, > + __entry->scanline, __entry->min, __entry->max) > +); > + > +TRACE_EVENT(i915_pipe_update_end, > + TP_PROTO(struct intel_crtc *crtc, u32 frame), > + TP_ARGS(crtc, frame), > + > + TP_STRUCT__entry( > + __field(enum pipe, pipe) > + __field(u32, frame) > + __field(u32, scanline) > + ), > + > + TP_fast_assign( > + __entry->pipe =3D crtc->pipe; > + __entry->frame =3D frame; > + __entry->scanline =3D intel_get_crtc_scanline(crtc); > + ), > + > + TP_printk("pipe %c, frame=3D%u, scanline=3D%u", > + pipe_name(__entry->pipe), __entry->frame, > + __entry->scanline) > +); > + > /* object tracking */ > = > TRACE_EVENT(i915_gem_object_create, > diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/i= ntel_sprite.c > index 6192e58..213cd58 100644 > --- a/drivers/gpu/drm/i915/intel_sprite.c > +++ b/drivers/gpu/drm/i915/intel_sprite.c > @@ -73,6 +73,8 @@ static bool intel_pipe_update_start(struct intel_crtc *= crtc, uint32_t *start_vbl > = > local_irq_disable(); > = > + trace_i915_pipe_update_start(crtc, min, max); > + > for (;;) { > /* > * prepare_to_wait() has a memory barrier, which guarantees > @@ -104,6 +106,8 @@ static bool intel_pipe_update_start(struct intel_crtc= *crtc, uint32_t *start_vbl > = > *start_vbl_count =3D dev->driver->get_vblank_counter(dev, pipe); > = > + trace_i915_pipe_update_vblank_evaded(crtc, min, max, *start_vbl_count); > + > return true; > } > = > @@ -113,6 +117,8 @@ static void intel_pipe_update_end(struct intel_crtc *= crtc, u32 start_vbl_count) > enum pipe pipe =3D crtc->pipe; > u32 end_vbl_count =3D dev->driver->get_vblank_counter(dev, pipe); > = > + trace_i915_pipe_update_end(crtc, end_vbl_count); > + > local_irq_enable(); > = > if (start_vbl_count !=3D end_vbl_count) > -- = > 1.8.3.2 > = > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- = Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch