forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-09 95099d4622f8cb224d94e314c7a8e0df60b13f87
kernel/drivers/gpu/drm/i915/i915_trace.h
....@@ -2,20 +2,104 @@
22 #if !defined(_I915_TRACE_H_) || defined(TRACE_HEADER_MULTI_READ)
33 #define _I915_TRACE_H_
44
5
+#ifdef CONFIG_PREEMPT_RT
6
+#define NOTRACE
7
+#endif
8
+
59 #include <linux/stringify.h>
610 #include <linux/types.h>
711 #include <linux/tracepoint.h>
812
9
-#include <drm/drmP.h>
13
+#include <drm/drm_drv.h>
14
+
15
+#include "display/intel_display_types.h"
16
+#include "gt/intel_engine.h"
17
+
1018 #include "i915_drv.h"
11
-#include "intel_drv.h"
12
-#include "intel_ringbuffer.h"
19
+#include "i915_irq.h"
1320
1421 #undef TRACE_SYSTEM
1522 #define TRACE_SYSTEM i915
1623 #define TRACE_INCLUDE_FILE i915_trace
1724
1825 /* watermark/fifo updates */
26
+
27
+TRACE_EVENT(intel_pipe_enable,
28
+ TP_PROTO(struct intel_crtc *crtc),
29
+ TP_ARGS(crtc),
30
+
31
+ TP_STRUCT__entry(
32
+ __array(u32, frame, 3)
33
+ __array(u32, scanline, 3)
34
+ __field(enum pipe, pipe)
35
+ ),
36
+ TP_fast_assign(
37
+ struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
38
+ struct intel_crtc *it__;
39
+ for_each_intel_crtc(&dev_priv->drm, it__) {
40
+ __entry->frame[it__->pipe] = intel_crtc_get_vblank_counter(it__);
41
+ __entry->scanline[it__->pipe] = intel_get_crtc_scanline(it__);
42
+ }
43
+ __entry->pipe = crtc->pipe;
44
+ ),
45
+
46
+ TP_printk("pipe %c enable, pipe A: frame=%u, scanline=%u, pipe B: frame=%u, scanline=%u, pipe C: frame=%u, scanline=%u",
47
+ pipe_name(__entry->pipe),
48
+ __entry->frame[PIPE_A], __entry->scanline[PIPE_A],
49
+ __entry->frame[PIPE_B], __entry->scanline[PIPE_B],
50
+ __entry->frame[PIPE_C], __entry->scanline[PIPE_C])
51
+);
52
+
53
+TRACE_EVENT(intel_pipe_disable,
54
+ TP_PROTO(struct intel_crtc *crtc),
55
+ TP_ARGS(crtc),
56
+
57
+ TP_STRUCT__entry(
58
+ __array(u32, frame, 3)
59
+ __array(u32, scanline, 3)
60
+ __field(enum pipe, pipe)
61
+ ),
62
+
63
+ TP_fast_assign(
64
+ struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
65
+ struct intel_crtc *it__;
66
+ for_each_intel_crtc(&dev_priv->drm, it__) {
67
+ __entry->frame[it__->pipe] = intel_crtc_get_vblank_counter(it__);
68
+ __entry->scanline[it__->pipe] = intel_get_crtc_scanline(it__);
69
+ }
70
+ __entry->pipe = crtc->pipe;
71
+ ),
72
+
73
+ TP_printk("pipe %c disable, pipe A: frame=%u, scanline=%u, pipe B: frame=%u, scanline=%u, pipe C: frame=%u, scanline=%u",
74
+ pipe_name(__entry->pipe),
75
+ __entry->frame[PIPE_A], __entry->scanline[PIPE_A],
76
+ __entry->frame[PIPE_B], __entry->scanline[PIPE_B],
77
+ __entry->frame[PIPE_C], __entry->scanline[PIPE_C])
78
+);
79
+
80
+TRACE_EVENT(intel_pipe_crc,
81
+ TP_PROTO(struct intel_crtc *crtc, const u32 *crcs),
82
+ TP_ARGS(crtc, crcs),
83
+
84
+ TP_STRUCT__entry(
85
+ __field(enum pipe, pipe)
86
+ __field(u32, frame)
87
+ __field(u32, scanline)
88
+ __array(u32, crcs, 5)
89
+ ),
90
+
91
+ TP_fast_assign(
92
+ __entry->pipe = crtc->pipe;
93
+ __entry->frame = intel_crtc_get_vblank_counter(crtc);
94
+ __entry->scanline = intel_get_crtc_scanline(crtc);
95
+ memcpy(__entry->crcs, crcs, sizeof(__entry->crcs));
96
+ ),
97
+
98
+ TP_printk("pipe %c, frame=%u, scanline=%u crc=%08x %08x %08x %08x %08x",
99
+ pipe_name(__entry->pipe), __entry->frame, __entry->scanline,
100
+ __entry->crcs[0], __entry->crcs[1], __entry->crcs[2],
101
+ __entry->crcs[3], __entry->crcs[4])
102
+);
19103
20104 TRACE_EVENT(intel_cpu_fifo_underrun,
21105 TP_PROTO(struct drm_i915_private *dev_priv, enum pipe pipe),
....@@ -28,9 +112,10 @@
28112 ),
29113
30114 TP_fast_assign(
115
+ struct intel_crtc *crtc = intel_get_crtc_for_pipe(dev_priv, pipe);
31116 __entry->pipe = pipe;
32
- __entry->frame = dev_priv->drm.driver->get_vblank_counter(&dev_priv->drm, pipe);
33
- __entry->scanline = intel_get_crtc_scanline(intel_get_crtc_for_pipe(dev_priv, pipe));
117
+ __entry->frame = intel_crtc_get_vblank_counter(crtc);
118
+ __entry->scanline = intel_get_crtc_scanline(crtc);
34119 ),
35120
36121 TP_printk("pipe %c, frame=%u, scanline=%u",
....@@ -50,9 +135,10 @@
50135
51136 TP_fast_assign(
52137 enum pipe pipe = pch_transcoder;
138
+ struct intel_crtc *crtc = intel_get_crtc_for_pipe(dev_priv, pipe);
53139 __entry->pipe = pipe;
54
- __entry->frame = dev_priv->drm.driver->get_vblank_counter(&dev_priv->drm, pipe);
55
- __entry->scanline = intel_get_crtc_scanline(intel_get_crtc_for_pipe(dev_priv, pipe));
140
+ __entry->frame = intel_crtc_get_vblank_counter(crtc);
141
+ __entry->scanline = intel_get_crtc_scanline(crtc);
56142 ),
57143
58144 TP_printk("pch transcoder %c, frame=%u, scanline=%u",
....@@ -72,12 +158,10 @@
72158 ),
73159
74160 TP_fast_assign(
75
- enum pipe pipe;
76
- for_each_pipe(dev_priv, pipe) {
77
- __entry->frame[pipe] =
78
- dev_priv->drm.driver->get_vblank_counter(&dev_priv->drm, pipe);
79
- __entry->scanline[pipe] =
80
- intel_get_crtc_scanline(intel_get_crtc_for_pipe(dev_priv, pipe));
161
+ struct intel_crtc *crtc;
162
+ for_each_intel_crtc(&dev_priv->drm, crtc) {
163
+ __entry->frame[crtc->pipe] = intel_crtc_get_vblank_counter(crtc);
164
+ __entry->scanline[crtc->pipe] = intel_get_crtc_scanline(crtc);
81165 }
82166 __entry->old = old;
83167 __entry->new = new;
....@@ -114,8 +198,7 @@
114198
115199 TP_fast_assign(
116200 __entry->pipe = crtc->pipe;
117
- __entry->frame = crtc->base.dev->driver->get_vblank_counter(crtc->base.dev,
118
- crtc->pipe);
201
+ __entry->frame = intel_crtc_get_vblank_counter(crtc);
119202 __entry->scanline = intel_get_crtc_scanline(crtc);
120203 __entry->primary = wm->pipe[crtc->pipe].plane[PLANE_PRIMARY];
121204 __entry->sprite = wm->pipe[crtc->pipe].plane[PLANE_SPRITE0];
....@@ -159,8 +242,7 @@
159242
160243 TP_fast_assign(
161244 __entry->pipe = crtc->pipe;
162
- __entry->frame = crtc->base.dev->driver->get_vblank_counter(crtc->base.dev,
163
- crtc->pipe);
245
+ __entry->frame = intel_crtc_get_vblank_counter(crtc);
164246 __entry->scanline = intel_get_crtc_scanline(crtc);
165247 __entry->level = wm->level;
166248 __entry->cxsr = wm->cxsr;
....@@ -194,8 +276,7 @@
194276
195277 TP_fast_assign(
196278 __entry->pipe = crtc->pipe;
197
- __entry->frame = crtc->base.dev->driver->get_vblank_counter(crtc->base.dev,
198
- crtc->pipe);
279
+ __entry->frame = intel_crtc_get_vblank_counter(crtc);
199280 __entry->scanline = intel_get_crtc_scanline(crtc);
200281 __entry->sprite0_start = sprite0_start;
201282 __entry->sprite1_start = sprite1_start;
....@@ -216,25 +297,24 @@
216297
217298 TP_STRUCT__entry(
218299 __field(enum pipe, pipe)
219
- __field(const char *, name)
220300 __field(u32, frame)
221301 __field(u32, scanline)
222302 __array(int, src, 4)
223303 __array(int, dst, 4)
304
+ __string(name, plane->name)
224305 ),
225306
226307 TP_fast_assign(
308
+ __assign_str(name, plane->name);
227309 __entry->pipe = crtc->pipe;
228
- __entry->name = plane->name;
229
- __entry->frame = crtc->base.dev->driver->get_vblank_counter(crtc->base.dev,
230
- crtc->pipe);
310
+ __entry->frame = intel_crtc_get_vblank_counter(crtc);
231311 __entry->scanline = intel_get_crtc_scanline(crtc);
232312 memcpy(__entry->src, &plane->state->src, sizeof(__entry->src));
233313 memcpy(__entry->dst, &plane->state->dst, sizeof(__entry->dst));
234314 ),
235315
236316 TP_printk("pipe %c, plane %s, frame=%u, scanline=%u, " DRM_RECT_FP_FMT " -> " DRM_RECT_FMT,
237
- pipe_name(__entry->pipe), __entry->name,
317
+ pipe_name(__entry->pipe), __get_str(name),
238318 __entry->frame, __entry->scanline,
239319 DRM_RECT_FP_ARG((const struct drm_rect *)__entry->src),
240320 DRM_RECT_ARG((const struct drm_rect *)__entry->dst))
....@@ -246,27 +326,88 @@
246326
247327 TP_STRUCT__entry(
248328 __field(enum pipe, pipe)
249
- __field(const char *, name)
329
+ __field(u32, frame)
330
+ __field(u32, scanline)
331
+ __string(name, plane->name)
332
+ ),
333
+
334
+ TP_fast_assign(
335
+ __assign_str(name, plane->name);
336
+ __entry->pipe = crtc->pipe;
337
+ __entry->frame = intel_crtc_get_vblank_counter(crtc);
338
+ __entry->scanline = intel_get_crtc_scanline(crtc);
339
+ ),
340
+
341
+ TP_printk("pipe %c, plane %s, frame=%u, scanline=%u",
342
+ pipe_name(__entry->pipe), __get_str(name),
343
+ __entry->frame, __entry->scanline)
344
+);
345
+
346
+/* fbc */
347
+
348
+TRACE_EVENT(intel_fbc_activate,
349
+ TP_PROTO(struct intel_crtc *crtc),
350
+ TP_ARGS(crtc),
351
+
352
+ TP_STRUCT__entry(
353
+ __field(enum pipe, pipe)
250354 __field(u32, frame)
251355 __field(u32, scanline)
252356 ),
253357
254358 TP_fast_assign(
255359 __entry->pipe = crtc->pipe;
256
- __entry->name = plane->name;
257
- __entry->frame = crtc->base.dev->driver->get_vblank_counter(crtc->base.dev,
258
- crtc->pipe);
360
+ __entry->frame = intel_crtc_get_vblank_counter(crtc);
259361 __entry->scanline = intel_get_crtc_scanline(crtc);
260362 ),
261363
262
- TP_printk("pipe %c, plane %s, frame=%u, scanline=%u",
263
- pipe_name(__entry->pipe), __entry->name,
264
- __entry->frame, __entry->scanline)
364
+ TP_printk("pipe %c, frame=%u, scanline=%u",
365
+ pipe_name(__entry->pipe), __entry->frame, __entry->scanline)
366
+);
367
+
368
+TRACE_EVENT(intel_fbc_deactivate,
369
+ TP_PROTO(struct intel_crtc *crtc),
370
+ TP_ARGS(crtc),
371
+
372
+ TP_STRUCT__entry(
373
+ __field(enum pipe, pipe)
374
+ __field(u32, frame)
375
+ __field(u32, scanline)
376
+ ),
377
+
378
+ TP_fast_assign(
379
+ __entry->pipe = crtc->pipe;
380
+ __entry->frame = intel_crtc_get_vblank_counter(crtc);
381
+ __entry->scanline = intel_get_crtc_scanline(crtc);
382
+ ),
383
+
384
+ TP_printk("pipe %c, frame=%u, scanline=%u",
385
+ pipe_name(__entry->pipe), __entry->frame, __entry->scanline)
386
+);
387
+
388
+TRACE_EVENT(intel_fbc_nuke,
389
+ TP_PROTO(struct intel_crtc *crtc),
390
+ TP_ARGS(crtc),
391
+
392
+ TP_STRUCT__entry(
393
+ __field(enum pipe, pipe)
394
+ __field(u32, frame)
395
+ __field(u32, scanline)
396
+ ),
397
+
398
+ TP_fast_assign(
399
+ __entry->pipe = crtc->pipe;
400
+ __entry->frame = intel_crtc_get_vblank_counter(crtc);
401
+ __entry->scanline = intel_get_crtc_scanline(crtc);
402
+ ),
403
+
404
+ TP_printk("pipe %c, frame=%u, scanline=%u",
405
+ pipe_name(__entry->pipe), __entry->frame, __entry->scanline)
265406 );
266407
267408 /* pipe updates */
268409
269
-TRACE_EVENT(i915_pipe_update_start,
410
+TRACE_EVENT(intel_pipe_update_start,
270411 TP_PROTO(struct intel_crtc *crtc),
271412 TP_ARGS(crtc),
272413
....@@ -280,8 +421,7 @@
280421
281422 TP_fast_assign(
282423 __entry->pipe = crtc->pipe;
283
- __entry->frame = crtc->base.dev->driver->get_vblank_counter(crtc->base.dev,
284
- crtc->pipe);
424
+ __entry->frame = intel_crtc_get_vblank_counter(crtc);
285425 __entry->scanline = intel_get_crtc_scanline(crtc);
286426 __entry->min = crtc->debug.min_vbl;
287427 __entry->max = crtc->debug.max_vbl;
....@@ -292,7 +432,7 @@
292432 __entry->scanline, __entry->min, __entry->max)
293433 );
294434
295
-TRACE_EVENT(i915_pipe_update_vblank_evaded,
435
+TRACE_EVENT(intel_pipe_update_vblank_evaded,
296436 TP_PROTO(struct intel_crtc *crtc),
297437 TP_ARGS(crtc),
298438
....@@ -317,7 +457,7 @@
317457 __entry->scanline, __entry->min, __entry->max)
318458 );
319459
320
-TRACE_EVENT(i915_pipe_update_end,
460
+TRACE_EVENT(intel_pipe_update_end,
321461 TP_PROTO(struct intel_crtc *crtc, u32 frame, int scanline_end),
322462 TP_ARGS(crtc, frame, scanline_end),
323463
....@@ -585,42 +725,12 @@
585725 TP_printk("dev=%d, vm=%p", __entry->dev, __entry->vm)
586726 );
587727
588
-TRACE_EVENT(i915_gem_ring_sync_to,
589
- TP_PROTO(struct i915_request *to, struct i915_request *from),
590
- TP_ARGS(to, from),
591
-
592
- TP_STRUCT__entry(
593
- __field(u32, dev)
594
- __field(u32, from_class)
595
- __field(u32, from_instance)
596
- __field(u32, to_class)
597
- __field(u32, to_instance)
598
- __field(u32, seqno)
599
- ),
600
-
601
- TP_fast_assign(
602
- __entry->dev = from->i915->drm.primary->index;
603
- __entry->from_class = from->engine->uabi_class;
604
- __entry->from_instance = from->engine->instance;
605
- __entry->to_class = to->engine->uabi_class;
606
- __entry->to_instance = to->engine->instance;
607
- __entry->seqno = from->global_seqno;
608
- ),
609
-
610
- TP_printk("dev=%u, sync-from=%u:%u, sync-to=%u:%u, seqno=%u",
611
- __entry->dev,
612
- __entry->from_class, __entry->from_instance,
613
- __entry->to_class, __entry->to_instance,
614
- __entry->seqno)
615
-);
616
-
617728 TRACE_EVENT(i915_request_queue,
618729 TP_PROTO(struct i915_request *rq, u32 flags),
619730 TP_ARGS(rq, flags),
620731
621732 TP_STRUCT__entry(
622733 __field(u32, dev)
623
- __field(u32, hw_id)
624734 __field(u64, ctx)
625735 __field(u16, class)
626736 __field(u16, instance)
....@@ -629,19 +739,17 @@
629739 ),
630740
631741 TP_fast_assign(
632
- __entry->dev = rq->i915->drm.primary->index;
633
- __entry->hw_id = rq->gem_context->hw_id;
742
+ __entry->dev = rq->engine->i915->drm.primary->index;
634743 __entry->class = rq->engine->uabi_class;
635
- __entry->instance = rq->engine->instance;
744
+ __entry->instance = rq->engine->uabi_instance;
636745 __entry->ctx = rq->fence.context;
637746 __entry->seqno = rq->fence.seqno;
638747 __entry->flags = flags;
639748 ),
640749
641
- TP_printk("dev=%u, engine=%u:%u, hw_id=%u, ctx=%llu, seqno=%u, flags=0x%x",
750
+ TP_printk("dev=%u, engine=%u:%u, ctx=%llu, seqno=%u, flags=0x%x",
642751 __entry->dev, __entry->class, __entry->instance,
643
- __entry->hw_id, __entry->ctx, __entry->seqno,
644
- __entry->flags)
752
+ __entry->ctx, __entry->seqno, __entry->flags)
645753 );
646754
647755 DECLARE_EVENT_CLASS(i915_request,
....@@ -650,28 +758,23 @@
650758
651759 TP_STRUCT__entry(
652760 __field(u32, dev)
653
- __field(u32, hw_id)
654761 __field(u64, ctx)
655762 __field(u16, class)
656763 __field(u16, instance)
657764 __field(u32, seqno)
658
- __field(u32, global)
659765 ),
660766
661767 TP_fast_assign(
662
- __entry->dev = rq->i915->drm.primary->index;
663
- __entry->hw_id = rq->gem_context->hw_id;
768
+ __entry->dev = rq->engine->i915->drm.primary->index;
664769 __entry->class = rq->engine->uabi_class;
665
- __entry->instance = rq->engine->instance;
770
+ __entry->instance = rq->engine->uabi_instance;
666771 __entry->ctx = rq->fence.context;
667772 __entry->seqno = rq->fence.seqno;
668
- __entry->global = rq->global_seqno;
669773 ),
670774
671
- TP_printk("dev=%u, engine=%u:%u, hw_id=%u, ctx=%llu, seqno=%u, global=%u",
775
+ TP_printk("dev=%u, engine=%u:%u, ctx=%llu, seqno=%u",
672776 __entry->dev, __entry->class, __entry->instance,
673
- __entry->hw_id, __entry->ctx, __entry->seqno,
674
- __entry->global)
777
+ __entry->ctx, __entry->seqno)
675778 );
676779
677780 DEFINE_EVENT(i915_request, i915_request_add,
....@@ -679,7 +782,7 @@
679782 TP_ARGS(rq)
680783 );
681784
682
-#if defined(CONFIG_DRM_I915_LOW_LEVEL_TRACEPOINTS)
785
+#if defined(CONFIG_DRM_I915_LOW_LEVEL_TRACEPOINTS) && !defined(NOTRACE)
683786 DEFINE_EVENT(i915_request, i915_request_submit,
684787 TP_PROTO(struct i915_request *rq),
685788 TP_ARGS(rq)
....@@ -696,32 +799,28 @@
696799
697800 TP_STRUCT__entry(
698801 __field(u32, dev)
699
- __field(u32, hw_id)
700802 __field(u64, ctx)
701803 __field(u16, class)
702804 __field(u16, instance)
703805 __field(u32, seqno)
704
- __field(u32, global_seqno)
705806 __field(u32, port)
706
- __field(u32, prio)
807
+ __field(s32, prio)
707808 ),
708809
709810 TP_fast_assign(
710
- __entry->dev = rq->i915->drm.primary->index;
711
- __entry->hw_id = rq->gem_context->hw_id;
811
+ __entry->dev = rq->engine->i915->drm.primary->index;
712812 __entry->class = rq->engine->uabi_class;
713
- __entry->instance = rq->engine->instance;
813
+ __entry->instance = rq->engine->uabi_instance;
714814 __entry->ctx = rq->fence.context;
715815 __entry->seqno = rq->fence.seqno;
716
- __entry->global_seqno = rq->global_seqno;
717816 __entry->prio = rq->sched.attr.priority;
718817 __entry->port = port;
719818 ),
720819
721
- TP_printk("dev=%u, engine=%u:%u, hw_id=%u, ctx=%llu, seqno=%u, prio=%u, global=%u, port=%u",
820
+ TP_printk("dev=%u, engine=%u:%u, ctx=%llu, seqno=%u, prio=%d, port=%u",
722821 __entry->dev, __entry->class, __entry->instance,
723
- __entry->hw_id, __entry->ctx, __entry->seqno,
724
- __entry->prio, __entry->global_seqno, __entry->port)
822
+ __entry->ctx, __entry->seqno,
823
+ __entry->prio, __entry->port)
725824 );
726825
727826 TRACE_EVENT(i915_request_out,
....@@ -730,30 +829,25 @@
730829
731830 TP_STRUCT__entry(
732831 __field(u32, dev)
733
- __field(u32, hw_id)
734832 __field(u64, ctx)
735833 __field(u16, class)
736834 __field(u16, instance)
737835 __field(u32, seqno)
738
- __field(u32, global_seqno)
739836 __field(u32, completed)
740837 ),
741838
742839 TP_fast_assign(
743
- __entry->dev = rq->i915->drm.primary->index;
744
- __entry->hw_id = rq->gem_context->hw_id;
840
+ __entry->dev = rq->engine->i915->drm.primary->index;
745841 __entry->class = rq->engine->uabi_class;
746
- __entry->instance = rq->engine->instance;
842
+ __entry->instance = rq->engine->uabi_instance;
747843 __entry->ctx = rq->fence.context;
748844 __entry->seqno = rq->fence.seqno;
749
- __entry->global_seqno = rq->global_seqno;
750845 __entry->completed = i915_request_completed(rq);
751846 ),
752847
753
- TP_printk("dev=%u, engine=%u:%u, hw_id=%u, ctx=%llu, seqno=%u, global=%u, completed?=%u",
848
+ TP_printk("dev=%u, engine=%u:%u, ctx=%llu, seqno=%u, completed?=%u",
754849 __entry->dev, __entry->class, __entry->instance,
755
- __entry->hw_id, __entry->ctx, __entry->seqno,
756
- __entry->global_seqno, __entry->completed)
850
+ __entry->ctx, __entry->seqno, __entry->completed)
757851 );
758852
759853 #else
....@@ -780,31 +874,6 @@
780874 #endif
781875 #endif
782876
783
-TRACE_EVENT(intel_engine_notify,
784
- TP_PROTO(struct intel_engine_cs *engine, bool waiters),
785
- TP_ARGS(engine, waiters),
786
-
787
- TP_STRUCT__entry(
788
- __field(u32, dev)
789
- __field(u16, class)
790
- __field(u16, instance)
791
- __field(u32, seqno)
792
- __field(bool, waiters)
793
- ),
794
-
795
- TP_fast_assign(
796
- __entry->dev = engine->i915->drm.primary->index;
797
- __entry->class = engine->uabi_class;
798
- __entry->instance = engine->instance;
799
- __entry->seqno = intel_engine_get_seqno(engine);
800
- __entry->waiters = waiters;
801
- ),
802
-
803
- TP_printk("dev=%u, engine=%u:%u, seqno=%u, waiters=%u",
804
- __entry->dev, __entry->class, __entry->instance,
805
- __entry->seqno, __entry->waiters)
806
-);
807
-
808877 DEFINE_EVENT(i915_request, i915_request_retire,
809878 TP_PROTO(struct i915_request *rq),
810879 TP_ARGS(rq)
....@@ -816,12 +885,10 @@
816885
817886 TP_STRUCT__entry(
818887 __field(u32, dev)
819
- __field(u32, hw_id)
820888 __field(u64, ctx)
821889 __field(u16, class)
822890 __field(u16, instance)
823891 __field(u32, seqno)
824
- __field(u32, global)
825892 __field(unsigned int, flags)
826893 ),
827894
....@@ -832,20 +899,17 @@
832899 * less desirable.
833900 */
834901 TP_fast_assign(
835
- __entry->dev = rq->i915->drm.primary->index;
836
- __entry->hw_id = rq->gem_context->hw_id;
902
+ __entry->dev = rq->engine->i915->drm.primary->index;
837903 __entry->class = rq->engine->uabi_class;
838
- __entry->instance = rq->engine->instance;
904
+ __entry->instance = rq->engine->uabi_instance;
839905 __entry->ctx = rq->fence.context;
840906 __entry->seqno = rq->fence.seqno;
841
- __entry->global = rq->global_seqno;
842907 __entry->flags = flags;
843908 ),
844909
845
- TP_printk("dev=%u, engine=%u:%u, hw_id=%u, ctx=%llu, seqno=%u, global=%u, blocking=%u, flags=0x%x",
910
+ TP_printk("dev=%u, engine=%u:%u, ctx=%llu, seqno=%u, flags=0x%x",
846911 __entry->dev, __entry->class, __entry->instance,
847
- __entry->hw_id, __entry->ctx, __entry->seqno,
848
- __entry->global, !!(__entry->flags & I915_WAIT_LOCKED),
912
+ __entry->ctx, __entry->seqno,
849913 __entry->flags)
850914 );
851915
....@@ -948,19 +1012,17 @@
9481012 TP_STRUCT__entry(
9491013 __field(u32, dev)
9501014 __field(struct i915_gem_context *, ctx)
951
- __field(u32, hw_id)
9521015 __field(struct i915_address_space *, vm)
9531016 ),
9541017
9551018 TP_fast_assign(
9561019 __entry->dev = ctx->i915->drm.primary->index;
9571020 __entry->ctx = ctx;
958
- __entry->hw_id = ctx->hw_id;
959
- __entry->vm = ctx->ppgtt ? &ctx->ppgtt->vm : NULL;
1021
+ __entry->vm = rcu_access_pointer(ctx->vm);
9601022 ),
9611023
962
- TP_printk("dev=%u, ctx=%p, ctx_vm=%p, hw_id=%u",
963
- __entry->dev, __entry->ctx, __entry->vm, __entry->hw_id)
1024
+ TP_printk("dev=%u, ctx=%p, ctx_vm=%p",
1025
+ __entry->dev, __entry->ctx, __entry->vm)
9641026 )
9651027
9661028 DEFINE_EVENT(i915_context, i915_context_create,