Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/include Update i915 trace points.
details: https://anonhg.NetBSD.org/src/rev/f72b7ed9c34e
branches: trunk
changeset: 1027975:f72b7ed9c34e
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 01:23:52 2021 +0000
description:
Update i915 trace points.
diffstat:
sys/external/bsd/drm2/include/i915_trace.h | 295 ++++++++++++++++------------
1 files changed, 164 insertions(+), 131 deletions(-)
diffs (truncated from 430 to 300 lines):
diff -r 6126a79d6c25 -r f72b7ed9c34e sys/external/bsd/drm2/include/i915_trace.h
--- a/sys/external/bsd/drm2/include/i915_trace.h Sun Dec 19 01:23:44 2021 +0000
+++ b/sys/external/bsd/drm2/include/i915_trace.h Sun Dec 19 01:23:52 2021 +0000
@@ -1,7 +1,7 @@
-/* $NetBSD: i915_trace.h,v 1.14 2018/08/27 15:25:28 riastradh Exp $ */
+/* $NetBSD: i915_trace.h,v 1.15 2021/12/19 01:23:52 riastradh Exp $ */
/*-
- * Copyright (c) 2013 The NetBSD Foundation, Inc.
+ * Copyright (c) 2013, 2018 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
@@ -35,58 +35,78 @@
#include <sys/types.h>
#include <sys/sdt.h>
+#include "i915_request.h"
#include "intel_drv.h"
/* Must come last. */
#include <drm/drm_trace_netbsd.h>
-DEFINE_TRACE2(i915,, flip__request,
- "enum plane"/*plane*/, "struct drm_i915_gem_object *"/*obj*/);
+DEFINE_TRACE3(i915,, cpu__fifo__underrun,
+ "enum i915_pipe"/*pipe*/,
+ "uint32_t"/*frame*/,
+ "uint32_t"/*scanline*/);
static inline void
-trace_i915_flip_request(enum plane plane, struct drm_i915_gem_object *obj)
+trace_intel_cpu_fifo_underrun(struct drm_i915_private *dev_priv,
+ enum i915_pipe pipe)
{
- TRACE2(i915,, flip__request, plane, obj);
+ TRACE3(i915,, cpu__fifo__underrun,
+ pipe,
+ dev_priv->drm.driver->get_vblank_counter(&dev_priv->drm, pipe),
+ intel_get_crtc_scanline(intel_get_crtc_for_pipe(dev_priv, pipe)));
+}
+
+DEFINE_TRACE3(i915,, pch__fifo__underrun,
+ "enum i915_pipe"/*pipe*/,
+ "uint32_t"/*frame*/,
+ "uint32_t"/*scanline*/);
+static inline void
+trace_intel_pch_fifo_underrun(struct drm_i915_private *dev_priv,
+ enum i915_pipe pipe)
+{
+ TRACE3(i915,, pch__fifo__underrun,
+ pipe,
+ dev_priv->drm.driver->get_vblank_counter(&dev_priv->drm, pipe),
+ intel_get_crtc_scanline(intel_get_crtc_for_pipe(dev_priv, pipe)));
}
-DEFINE_TRACE2(i915,, flip__complete,
- "enum plane"/*plane*/, "struct drm_i915_gem_object *"/*obj*/);
+DEFINE_TRACE5(i915,, gem__evict,
+ "int"/*devno*/,
+ "struct i915_address_space *"/*vm*/,
+ "uint64_t"/*size*/,
+ "uint64_t"/*align*/,
+ "unsigned"/*flags*/);
static inline void
-trace_i915_flip_complete(enum plane plane, struct drm_i915_gem_object *obj)
+trace_i915_gem_evict(struct i915_address_space *vm,
+ uint64_t size, uint64_t align, unsigned flags)
{
- TRACE2(i915,, flip__complete, plane, obj);
+ TRACE5(i915,, gem__evict,
+ vm->i915->drm.primary->index, vm, size, align, flags);
}
-DEFINE_TRACE4(i915,, gem__evict,
+DEFINE_TRACE6(i915,, gem__evict__node,
"int"/*devno*/,
- "int"/*min_size*/, "unsigned"/*alignment*/, "unsigned"/*flags*/);
+ "struct i915_address_space *"/*vm*/,
+ "uint64_t"/*start*/,
+ "uint64_t"/*size*/,
+ "unsigned long"/*color*/,
+ "unsigned"/*flags*/);
static inline void
-trace_i915_gem_evict(struct drm_device *dev, int min_size, unsigned alignment,
- unsigned flags)
+trace_i915_gem_evict_node(struct i915_address_space *vm,
+ struct drm_mm_node *node, unsigned flags)
{
- TRACE4(i915,, gem__evict,
- dev->primary->index, min_size, alignment, flags);
+ TRACE6(i915,, gem__evict__node,
+ vm->i915->drm.primary->index, vm,
+ node->start, node->size, node->color,
+ flags);
}
DEFINE_TRACE2(i915,, gem__evict__vm,
- "int"/*devno*/, "struct i915_address_space *"/*vm*/);
+ "int"/*devno*/,
+ "struct i915_address_space *"/*vm*/);
static inline void
trace_i915_gem_evict_vm(struct i915_address_space *vm)
{
- TRACE2(i915,, gem__evict__vm, vm->dev->primary->index, vm);
-}
-
-DEFINE_TRACE3(i915,, gem__object__change__domain,
- "struct drm_i915_gem_object *"/*obj*/,
- "uint32_t"/*read_domains*/,
- "uint32_t"/*write_domain*/);
-static inline void
-trace_i915_gem_object_change_domain(struct drm_i915_gem_object *obj,
- uint32_t old_read_domains, uint32_t old_write_domain)
-{
- TRACE3(i915,, gem__object__change__domain,
- obj,
- obj->base.read_domains | (old_read_domains << 16),
- obj->base.write_domain | (old_write_domain << 16));
+ TRACE2(i915,, gem__evict__vm, vm->i915->drm.primary->index, vm);
}
DEFINE_TRACE1(i915,, gem__object__clflush,
@@ -149,104 +169,126 @@
TRACE3(i915,, gem__object__write, obj, offset, size);
}
-DEFINE_TRACE3(i915,, gem__request__add,
- "int"/*devno*/, "int"/*ringid*/, "uint32_t"/*seqno*/);
+#define I915_DEFINE_TRACE_REQ(M, F, N) \
+ DEFINE_TRACE7(M, F, N, \
+ "int"/*devno*/, \
+ "unsigned"/*hw_id*/, \
+ "uint8_t"/*uabi_class*/, \
+ "uint8_t"/*instance*/, \
+ "unsigned"/*context*/, \
+ "unsigned"/*seqno*/, \
+ "unsigned"/*global*/)
+
+#define I915_TRACE_REQ(M, F, N, R) \
+ TRACE7(M, F, N, \
+ (R)->i915->drm.primary->index, \
+ (R)->gem_context->hw_id, \
+ (R)->engine->uabi_class, \
+ (R)->engine->instance, \
+ (R)->fence.context, \
+ (R)->fence.seqno, \
+ (R)->global_seqno)
+
+I915_DEFINE_TRACE_REQ(i915,, request__queue);
static inline void
-trace_i915_gem_request_add(struct drm_i915_gem_request *request)
+trace_i915_request_queue(struct i915_request *request, uint32_t flags)
{
- TRACE3(i915,, gem__request__add,
- request->ring->dev->primary->index,
- request->ring->id,
- request->seqno);
+ __USE(flags); /* XXX too many trace operands */
+ I915_TRACE_REQ(i915,, request__queue, request);
}
-DEFINE_TRACE3(i915,, gem__request__retire,
- "int"/*devno*/, "int"/*ringid*/, "uint32_t"/*seqno*/);
+I915_DEFINE_TRACE_REQ(i915,, request__add);
static inline void
-trace_i915_gem_request_retire(struct drm_i915_gem_request *request)
+trace_i915_request_add(struct i915_request *request)
{
- TRACE3(i915,, gem__request__retire,
- request->ring->dev->primary->index,
- request->ring->id,
- request->seqno);
+ I915_TRACE_REQ(i915,, request__add, request);
+}
+
+I915_DEFINE_TRACE_REQ(i915,, request__submit);
+static inline void
+trace_i915_request_submit(struct i915_request *request)
+{
+ I915_TRACE_REQ(i915,, request__submit, request);
}
-DEFINE_TRACE3(i915,, gem__request__wait__begin,
- "int"/*devno*/, "int"/*ringid*/, "uint32_t"/*seqno*/);
+I915_DEFINE_TRACE_REQ(i915,, request__execute);
static inline void
-trace_i915_gem_request_wait_begin(struct drm_i915_gem_request *request)
+trace_i915_request_execute(struct i915_request *request)
{
- TRACE3(i915,, gem__request__wait__begin,
- request->ring->dev->primary->index,
- request->ring->id,
- request->seqno);
+ I915_TRACE_REQ(i915,, request__execute, request);
}
-DEFINE_TRACE3(i915,, gem__request__wait__end,
- "int"/*devno*/, "int"/*ringid*/, "uint32_t"/*seqno*/);
+I915_DEFINE_TRACE_REQ(i915,, request__in);
static inline void
-trace_i915_gem_request_wait_end(struct drm_i915_gem_request *request)
+trace_i915_request_in(struct i915_request *request, unsigned port)
{
- TRACE3(i915,, gem__request__wait__end,
- request->ring->dev->primary->index,
- request->ring->id,
- request->seqno);
+ __USE(port); /* XXX too many trace operands */
+ I915_TRACE_REQ(i915,, request__in, request);
}
-DEFINE_TRACE3(i915,, gem__request__notify,
- "int"/*devno*/, "int"/*ringid*/, "uint32_t"/*seqno*/);
+I915_DEFINE_TRACE_REQ(i915,, request__out);
static inline void
-trace_i915_gem_request_notify(struct intel_engine_cs *ring)
+trace_i915_request_out(struct i915_request *request)
{
- TRACE3(i915,, gem__request__notify,
- ring->dev->primary->index, ring->id, ring->get_seqno(ring, false));
+ /* XXX i915_request_completed(request) */
+ I915_TRACE_REQ(i915,, request__out, request);
}
-/* XXX Why no request in the trace upstream? */
-DEFINE_TRACE4(i915,, gem__ring__dispatch,
- "int"/*devno*/, "int"/*ringid*/, "uint32_t"/*seqno*/, "uint32_t"/*flags*/);
+I915_DEFINE_TRACE_REQ(i915,, request__retire);
static inline void
-trace_i915_gem_ring_dispatch(struct drm_i915_gem_request *request,
- uint32_t flags)
+trace_i915_request_retire(struct i915_request *request)
{
- TRACE4(i915,, gem__ring__dispatch,
- request->ring->dev->primary->index,
- request->ring->id,
- request->seqno,
- flags);
- /* XXX i915_trace_irq_get? Doesn't seem to be used. */
+ I915_TRACE_REQ(i915,, request__retire, request);
+}
+
+I915_DEFINE_TRACE_REQ(i915,, request__wait__begin);
+static inline void
+trace_i915_request_wait_begin(struct i915_request *request)
+{
+ I915_TRACE_REQ(i915,, request__wait__begin, request);
+}
+
+I915_DEFINE_TRACE_REQ(i915,, request__wait__end);
+static inline void
+trace_i915_request_wait_end(struct i915_request *request)
+{
+ I915_TRACE_REQ(i915,, request__wait__end, request);
}
-DEFINE_TRACE4(i915,, gem__ring__flush,
+DEFINE_TRACE5(i915,, engine__notify,
"int"/*devno*/,
- "int"/*ringid*/,
- "uint32_t"/*invalidate*/,
- "uint32_t"/*flags*/);
+ "uint8_t"/*uabi_class*/,
+ "uint8_t"/*instance*/,
+ "unsigned"/*seqno*/,
+ "bool"/*waiters*/);
static inline void
-trace_i915_gem_ring_flush(struct drm_i915_gem_request *request,
- uint32_t invalidate, uint32_t flags)
+trace_intel_engine_notify(struct intel_engine_cs *engine, bool waiters)
{
- TRACE4(i915,, gem__ring__flush,
- request->ring->dev->primary->index,
- request->ring->id,
- invalidate,
- flags);
+ TRACE5(i915,, engine__notify,
+ engine->i915->drm.primary->index,
+ engine->uabi_class,
+ engine->instance,
+ intel_engine_get_seqno(engine),
+ waiters);
}
-DEFINE_TRACE4(i915,, gem__ring__sync__to,
+DEFINE_TRACE6(i915,, gem__ring__sync__to,
"int"/*devno*/,
- "int"/*from_ringid*/,
- "int"/*to_ringid*/,
- "uint32_t"/*seqno*/);
+ "uint8_t"/*from_class*/,
+ "uint8_t"/*from_instance*/,
+ "uint8_t"/*to_class*/,
+ "uint8_t"/*to_instance*/,
+ "unsigned"/*seqno*/);
static inline void
-trace_i915_gem_ring_sync_to(struct drm_i915_gem_request *to_req,
- struct intel_engine_cs *from, struct drm_i915_gem_request *from_req)
+trace_i915_gem_ring_sync_to(struct i915_request *to, struct i915_request *from)
{
Home |
Main Index |
Thread Index |
Old Index