[Intel-gfx] [RFC 7/8] drm/i915: Add support for forwarding execbuffer tags in timestamp sample metadata

Chris Wilson chris at chris-wilson.co.uk
Wed Aug 5 02:17:55 PDT 2015


On Wed, Aug 05, 2015 at 11:25:43AM +0530, sourab.gupta at intel.com wrote:
> @@ -555,10 +558,12 @@ static void forward_one_gen_pmu_sample(struct drm_i915_private *dev_priv,
>  	struct drm_i915_ts_node_ctx_id *ctx_info;
>  	struct drm_i915_ts_node_ring_id *ring_info;
>  	struct drm_i915_ts_node_pid *pid_info;
> +	struct drm_i915_ts_node_tag *tag_info;
>  	struct perf_raw_record raw;
>  
>  	BUILD_BUG_ON((TS_DATA_SIZE != 8) || (CTX_INFO_SIZE != 8) ||
> -			(RING_INFO_SIZE != 8) || (PID_INFO_SIZE != 8));
> +			(RING_INFO_SIZE != 8) || (PID_INFO_SIZE != 8) ||
> +			(TAG_INFO_SIZE != 8));

This is much more useful if each clause is independent. The error
message is then unambiguous and it looks neater.

>  	snapshot = dev_priv->gen_pmu.buffer.addr + node->offset;
>  	snapshot_size = TS_DATA_SIZE + CTX_INFO_SIZE;

> diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
> index 3dcc862..db91098 100644
> --- a/include/uapi/drm/i915_drm.h
> +++ b/include/uapi/drm/i915_drm.h
> @@ -104,7 +104,8 @@ struct drm_i915_gen_pmu_attr {
>  	__u32 size;
>  	__u32 sample_ring:1,
>  		sample_pid:1,
> -		__reserved_1:30;
> +		sample_tag:1,
> +		__reserved_1:29;

Start each bitfield entry on its own line with __u32;
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list