2121/* watermark/fifo updates */
2222
2323TRACE_EVENT (intel_pipe_enable ,
24- TP_PROTO (struct drm_i915_private * dev_priv , enum pipe pipe ),
25- TP_ARGS (dev_priv , pipe ),
24+ TP_PROTO (struct intel_crtc * crtc ),
25+ TP_ARGS (crtc ),
2626
2727 TP_STRUCT__entry (
2828 __array (u32 , frame , 3 )
2929 __array (u32 , scanline , 3 )
3030 __field (enum pipe , pipe )
3131 ),
32-
3332 TP_fast_assign (
34- enum pipe _pipe ;
35- for_each_pipe (dev_priv , _pipe ) {
36- __entry -> frame [_pipe ] =
37- dev_priv -> drm .driver -> get_vblank_counter (& dev_priv -> drm , _pipe );
38- __entry -> scanline [_pipe ] =
39- intel_get_crtc_scanline (intel_get_crtc_for_pipe (dev_priv , _pipe ));
33+ struct drm_i915_private * dev_priv = to_i915 (crtc -> base .dev );
34+ struct intel_crtc * it__ ;
35+ for_each_intel_crtc (& dev_priv -> drm , it__ ) {
36+ __entry -> frame [it__ -> pipe ] = intel_crtc_get_vblank_counter (it__ );
37+ __entry -> scanline [it__ -> pipe ] = intel_get_crtc_scanline (it__ );
4038 }
41- __entry -> pipe = pipe ;
39+ __entry -> pipe = crtc -> pipe ;
4240 ),
4341
4442 TP_printk ("pipe %c enable, pipe A: frame=%u, scanline=%u, pipe B: frame=%u, scanline=%u, pipe C: frame=%u, scanline=%u" ,
@@ -49,8 +47,8 @@ TRACE_EVENT(intel_pipe_enable,
4947);
5048
5149TRACE_EVENT (intel_pipe_disable ,
52- TP_PROTO (struct drm_i915_private * dev_priv , enum pipe pipe ),
53- TP_ARGS (dev_priv , pipe ),
50+ TP_PROTO (struct intel_crtc * crtc ),
51+ TP_ARGS (crtc ),
5452
5553 TP_STRUCT__entry (
5654 __array (u32 , frame , 3 )
@@ -59,14 +57,13 @@ TRACE_EVENT(intel_pipe_disable,
5957 ),
6058
6159 TP_fast_assign (
62- enum pipe _pipe ;
63- for_each_pipe (dev_priv , _pipe ) {
64- __entry -> frame [_pipe ] =
65- dev_priv -> drm .driver -> get_vblank_counter (& dev_priv -> drm , _pipe );
66- __entry -> scanline [_pipe ] =
67- intel_get_crtc_scanline (intel_get_crtc_for_pipe (dev_priv , _pipe ));
60+ struct drm_i915_private * dev_priv = to_i915 (crtc -> base .dev );
61+ struct intel_crtc * it__ ;
62+ for_each_intel_crtc (& dev_priv -> drm , it__ ) {
63+ __entry -> frame [it__ -> pipe ] = intel_crtc_get_vblank_counter (it__ );
64+ __entry -> scanline [it__ -> pipe ] = intel_get_crtc_scanline (it__ );
6865 }
69- __entry -> pipe = pipe ;
66+ __entry -> pipe = crtc -> pipe ;
7067 ),
7168
7269 TP_printk ("pipe %c disable, pipe A: frame=%u, scanline=%u, pipe B: frame=%u, scanline=%u, pipe C: frame=%u, scanline=%u" ,
@@ -89,8 +86,7 @@ TRACE_EVENT(intel_pipe_crc,
8986
9087 TP_fast_assign (
9188 __entry -> pipe = crtc -> pipe ;
92- __entry -> frame = crtc -> base .dev -> driver -> get_vblank_counter (crtc -> base .dev ,
93- crtc -> pipe );
89+ __entry -> frame = intel_crtc_get_vblank_counter (crtc );
9490 __entry -> scanline = intel_get_crtc_scanline (crtc );
9591 memcpy (__entry -> crcs , crcs , sizeof (__entry -> crcs ));
9692 ),
@@ -112,9 +108,10 @@ TRACE_EVENT(intel_cpu_fifo_underrun,
112108 ),
113109
114110 TP_fast_assign (
111+ struct intel_crtc * crtc = intel_get_crtc_for_pipe (dev_priv , pipe );
115112 __entry -> pipe = pipe ;
116- __entry -> frame = dev_priv -> drm . driver -> get_vblank_counter ( & dev_priv -> drm , pipe );
117- __entry -> scanline = intel_get_crtc_scanline (intel_get_crtc_for_pipe ( dev_priv , pipe ) );
113+ __entry -> frame = intel_crtc_get_vblank_counter ( crtc );
114+ __entry -> scanline = intel_get_crtc_scanline (crtc );
118115 ),
119116
120117 TP_printk ("pipe %c, frame=%u, scanline=%u" ,
@@ -134,9 +131,10 @@ TRACE_EVENT(intel_pch_fifo_underrun,
134131
135132 TP_fast_assign (
136133 enum pipe pipe = pch_transcoder ;
134+ struct intel_crtc * crtc = intel_get_crtc_for_pipe (dev_priv , pipe );
137135 __entry -> pipe = pipe ;
138- __entry -> frame = dev_priv -> drm . driver -> get_vblank_counter ( & dev_priv -> drm , pipe );
139- __entry -> scanline = intel_get_crtc_scanline (intel_get_crtc_for_pipe ( dev_priv , pipe ) );
136+ __entry -> frame = intel_crtc_get_vblank_counter ( crtc );
137+ __entry -> scanline = intel_get_crtc_scanline (crtc );
140138 ),
141139
142140 TP_printk ("pch transcoder %c, frame=%u, scanline=%u" ,
@@ -156,12 +154,10 @@ TRACE_EVENT(intel_memory_cxsr,
156154 ),
157155
158156 TP_fast_assign (
159- enum pipe pipe ;
160- for_each_pipe (dev_priv , pipe ) {
161- __entry -> frame [pipe ] =
162- dev_priv -> drm .driver -> get_vblank_counter (& dev_priv -> drm , pipe );
163- __entry -> scanline [pipe ] =
164- intel_get_crtc_scanline (intel_get_crtc_for_pipe (dev_priv , pipe ));
157+ struct intel_crtc * crtc ;
158+ for_each_intel_crtc (& dev_priv -> drm , crtc ) {
159+ __entry -> frame [crtc -> pipe ] = intel_crtc_get_vblank_counter (crtc );
160+ __entry -> scanline [crtc -> pipe ] = intel_get_crtc_scanline (crtc );
165161 }
166162 __entry -> old = old ;
167163 __entry -> new = new ;
@@ -198,8 +194,7 @@ TRACE_EVENT(g4x_wm,
198194
199195 TP_fast_assign (
200196 __entry -> pipe = crtc -> pipe ;
201- __entry -> frame = crtc -> base .dev -> driver -> get_vblank_counter (crtc -> base .dev ,
202- crtc -> pipe );
197+ __entry -> frame = intel_crtc_get_vblank_counter (crtc );
203198 __entry -> scanline = intel_get_crtc_scanline (crtc );
204199 __entry -> primary = wm -> pipe [crtc -> pipe ].plane [PLANE_PRIMARY ];
205200 __entry -> sprite = wm -> pipe [crtc -> pipe ].plane [PLANE_SPRITE0 ];
@@ -243,8 +238,7 @@ TRACE_EVENT(vlv_wm,
243238
244239 TP_fast_assign (
245240 __entry -> pipe = crtc -> pipe ;
246- __entry -> frame = crtc -> base .dev -> driver -> get_vblank_counter (crtc -> base .dev ,
247- crtc -> pipe );
241+ __entry -> frame = intel_crtc_get_vblank_counter (crtc );
248242 __entry -> scanline = intel_get_crtc_scanline (crtc );
249243 __entry -> level = wm -> level ;
250244 __entry -> cxsr = wm -> cxsr ;
@@ -278,8 +272,7 @@ TRACE_EVENT(vlv_fifo_size,
278272
279273 TP_fast_assign (
280274 __entry -> pipe = crtc -> pipe ;
281- __entry -> frame = crtc -> base .dev -> driver -> get_vblank_counter (crtc -> base .dev ,
282- crtc -> pipe );
275+ __entry -> frame = intel_crtc_get_vblank_counter (crtc );
283276 __entry -> scanline = intel_get_crtc_scanline (crtc );
284277 __entry -> sprite0_start = sprite0_start ;
285278 __entry -> sprite1_start = sprite1_start ;
@@ -310,8 +303,7 @@ TRACE_EVENT(intel_update_plane,
310303 TP_fast_assign (
311304 __entry -> pipe = crtc -> pipe ;
312305 __entry -> name = plane -> name ;
313- __entry -> frame = crtc -> base .dev -> driver -> get_vblank_counter (crtc -> base .dev ,
314- crtc -> pipe );
306+ __entry -> frame = intel_crtc_get_vblank_counter (crtc );
315307 __entry -> scanline = intel_get_crtc_scanline (crtc );
316308 memcpy (__entry -> src , & plane -> state -> src , sizeof (__entry -> src ));
317309 memcpy (__entry -> dst , & plane -> state -> dst , sizeof (__entry -> dst ));
@@ -338,8 +330,7 @@ TRACE_EVENT(intel_disable_plane,
338330 TP_fast_assign (
339331 __entry -> pipe = crtc -> pipe ;
340332 __entry -> name = plane -> name ;
341- __entry -> frame = crtc -> base .dev -> driver -> get_vblank_counter (crtc -> base .dev ,
342- crtc -> pipe );
333+ __entry -> frame = intel_crtc_get_vblank_counter (crtc );
343334 __entry -> scanline = intel_get_crtc_scanline (crtc );
344335 ),
345336
@@ -364,8 +355,7 @@ TRACE_EVENT(i915_pipe_update_start,
364355
365356 TP_fast_assign (
366357 __entry -> pipe = crtc -> pipe ;
367- __entry -> frame = crtc -> base .dev -> driver -> get_vblank_counter (crtc -> base .dev ,
368- crtc -> pipe );
358+ __entry -> frame = intel_crtc_get_vblank_counter (crtc );
369359 __entry -> scanline = intel_get_crtc_scanline (crtc );
370360 __entry -> min = crtc -> debug .min_vbl ;
371361 __entry -> max = crtc -> debug .max_vbl ;
0 commit comments