Re: [PATCH] drm/i915: add a tracepoint for gpu frequency changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Donnerstag, den 30.08.2012, 13:26 +0200 schrieb Daniel Vetter:
> We've had and still have too many issues where the gpu turbot doesn't

s,turbot,turbo,

> quite to what it's supposed to do (or what we want it to do).

s,to,do,

> Adding a tracepoint to track when the desired gpu frequence changes

frequenc*y*

> should help a lot in characterizing and understanding problematic
> workloads.
> 
> Also, this should be fairly interesting for power tuning (and
> especially noticing when the gpu is stuck in high frequencies, as has
> happened in the past) and hence for integration into powertop and
> similar tools.

If this can be used from user space already, it would be nice to add
some notes to the commit how this can be done.

> Cc: Arjan van de Ven <arjan@xxxxxxxxxxxxxxx>
> Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxx>
> ---
>  drivers/gpu/drm/i915/i915_trace.h |   15 +++++++++++++++
>  drivers/gpu/drm/i915/intel_pm.c   |    2 ++
>  2 files changed, 17 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_trace.h b/drivers/gpu/drm/i915/i915_trace.h
> index 3c4093d..8134421 100644
> --- a/drivers/gpu/drm/i915/i915_trace.h
> +++ b/drivers/gpu/drm/i915/i915_trace.h
> @@ -430,6 +430,21 @@ TRACE_EVENT(i915_reg_rw,
>  		(u32)(__entry->val >> 32))
>  );
>  
> +TRACE_EVENT(intel_gpu_freq_change,
> +	    TP_PROTO(u32 freq),
> +	    TP_ARGS(freq),
> +
> +	    TP_STRUCT__entry(
> +			     __field(u32, freq)
> +			     ),
> +
> +	    TP_fast_assign(
> +			   __entry->freq = freq;
> +			   ),
> +
> +	    TP_printk("new_freq=%u", __entry->freq)
> +);
> +
>  #endif /* _I915_TRACE_H_ */
>  
>  /* This part must be outside protection */
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index ebe3498..194a72f 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -2343,6 +2343,8 @@ void gen6_set_rps(struct drm_device *dev, u8 val)
>  	I915_WRITE(GEN6_RP_INTERRUPT_LIMITS, limits);
>  
>  	dev_priv->rps.cur_delay = val;
> +
> +	trace_intel_gpu_freq_change(val * 50);
>  }
>  
>  static void gen6_disable_rps(struct drm_device *dev)

Acked-by: Paul Menzel <paulepanter@xxxxxxxxxxxxxxxxxxxxx>


Thanks,

Paul

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux