[Intel-gfx] [PATCH 1/8] drm/i915: Add frontbuffer tracking tracepoints

Jani Nikula jani.nikula at linux.intel.com
Wed Apr 21 13:01:25 UTC 2021


On Wed, 14 Apr 2021, Ville Syrjala <ville.syrjala at linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> Add some tracpoints for frontbuffer tracking so we can
> try to figure out what's going on.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

Acked-by: Jani Nikula <jani.nikula at intel.com>

> ---
>  .../gpu/drm/i915/display/intel_frontbuffer.c  |  5 +++
>  drivers/gpu/drm/i915/i915_trace.h             | 38 +++++++++++++++++++
>  2 files changed, 43 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_frontbuffer.c b/drivers/gpu/drm/i915/display/intel_frontbuffer.c
> index 6fc6965b6133..8161d49e78ba 100644
> --- a/drivers/gpu/drm/i915/display/intel_frontbuffer.c
> +++ b/drivers/gpu/drm/i915/display/intel_frontbuffer.c
> @@ -58,6 +58,7 @@
>  #include "display/intel_dp.h"
>  
>  #include "i915_drv.h"
> +#include "i915_trace.h"
>  #include "intel_display_types.h"
>  #include "intel_fbc.h"
>  #include "intel_frontbuffer.h"
> @@ -87,6 +88,8 @@ static void frontbuffer_flush(struct drm_i915_private *i915,
>  	if (!frontbuffer_bits)
>  		return;
>  
> +	trace_intel_frontbuffer_flush(frontbuffer_bits, origin);
> +
>  	might_sleep();
>  	intel_edp_drrs_flush(i915, frontbuffer_bits);
>  	intel_psr_flush(i915, frontbuffer_bits, origin);
> @@ -173,6 +176,8 @@ void __intel_fb_invalidate(struct intel_frontbuffer *front,
>  		spin_unlock(&i915->fb_tracking.lock);
>  	}
>  
> +	trace_intel_frontbuffer_invalidate(frontbuffer_bits, origin);
> +
>  	might_sleep();
>  	intel_psr_invalidate(i915, frontbuffer_bits, origin);
>  	intel_edp_drrs_invalidate(i915, frontbuffer_bits);
> diff --git a/drivers/gpu/drm/i915/i915_trace.h b/drivers/gpu/drm/i915/i915_trace.h
> index a4addcc64978..81f5e1721180 100644
> --- a/drivers/gpu/drm/i915/i915_trace.h
> +++ b/drivers/gpu/drm/i915/i915_trace.h
> @@ -474,6 +474,44 @@ TRACE_EVENT(intel_pipe_update_end,
>  		      __entry->scanline)
>  );
>  
> +/* frontbuffer tracking */
> +
> +TRACE_EVENT(intel_frontbuffer_invalidate,
> +	    TP_PROTO(unsigned int frontbuffer_bits, unsigned int origin),
> +	    TP_ARGS(frontbuffer_bits, origin),
> +
> +	    TP_STRUCT__entry(
> +			     __field(unsigned int, frontbuffer_bits)
> +			     __field(unsigned int, origin)
> +			     ),
> +
> +	    TP_fast_assign(
> +			   __entry->frontbuffer_bits = frontbuffer_bits;
> +			   __entry->origin = origin;
> +			   ),
> +
> +	    TP_printk("frontbuffer_bits=0x%08x, origin=%u",
> +		      __entry->frontbuffer_bits, __entry->origin)
> +);
> +
> +TRACE_EVENT(intel_frontbuffer_flush,
> +	    TP_PROTO(unsigned int frontbuffer_bits, unsigned int origin),
> +	    TP_ARGS(frontbuffer_bits, origin),
> +
> +	    TP_STRUCT__entry(
> +			     __field(unsigned int, frontbuffer_bits)
> +			     __field(unsigned int, origin)
> +			     ),
> +
> +	    TP_fast_assign(
> +			   __entry->frontbuffer_bits = frontbuffer_bits;
> +			   __entry->origin = origin;
> +			   ),
> +
> +	    TP_printk("frontbuffer_bits=0x%08x, origin=%u",
> +		      __entry->frontbuffer_bits, __entry->origin)
> +);
> +
>  /* object tracking */
>  
>  TRACE_EVENT(i915_gem_object_create,

-- 
Jani Nikula, Intel Open Source Graphics Center


More information about the Intel-gfx mailing list