Re: [RFC 8/8] drm/i915: Add support to add execbuffer tags to OA counter reports

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

 



On Wed, Jul 15, 2015 at 02:17:03PM +0530, sourab.gupta@xxxxxxxxx wrote:
> From: Sourab Gupta <sourab.gupta@xxxxxxxxx>
> 
> This patch enables userspace to specify tags (per workload), provided via
> execbuffer ioctl, which could be added to OA reports, to help associate
> reports with the corresponding workloads.
> 
> There may be multiple stages within a single context, from a userspace
> perspective. An ability is needed to individually associate the OA reports
> with their corresponding workloads(execbuffers), which may not be possible
> solely with ctx_id or pid information. This patch enables such a mechanism.
> 
> In this patch, rsvd2 field of execbuffer arguments is being utilized for
> passing the tag. A new bitfield in execbuffer flags is introduced in order
> to inform kernel of the tag being passed in execbuffer arguments.
> 
> Signed-off-by: Sourab Gupta <sourab.gupta@xxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/i915_drv.h            |  9 ++++++---
>  drivers/gpu/drm/i915/i915_gem_execbuffer.c |  8 ++++++--
>  drivers/gpu/drm/i915/i915_oa_perf.c        | 23 ++++++++++++++++++++---
>  include/uapi/drm/i915_drm.h                | 21 ++++++++++++++++++---
>  4 files changed, 50 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 337a721..9409b4a 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -1672,6 +1672,7 @@ struct i915_oa_rcs_node {
>  	bool discard;
>  	u32 ctx_id;
>  	u32 pid;
> +	u32 tag;
>  };
>  
> @@ -3165,7 +3167,8 @@ void i915_oa_context_pin_notify(struct drm_i915_private *dev_priv,
>  				struct intel_context *context);
>  void i915_oa_context_unpin_notify(struct drm_i915_private *dev_priv,
>  				  struct intel_context *context);
> -void i915_insert_profiling_cmd(struct intel_ringbuffer *ringbuf, u32 ctx_id);
> +void i915_insert_profiling_cmd(struct intel_ringbuffer *ringbuf, u32 ctx_id,
> +				int tag);

Sloppy. Is the ABI signed or unsigned? Arbitrary width or fixed?
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux