drm/i915: Pass intel_plane to plane tracepoints
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 11 Nov 2022 12:31:17 +0000 (14:31 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 17 Nov 2022 17:00:37 +0000 (19:00 +0200)
Pass intel_plane rather than drm_plane to the plane tracepoints.
Matches what we do eg. with the fbc tracepoints. Using the same
type for everything will help with digging out the device name
from the plane in the future.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221111123120.7759-2-ville.syrjala@linux.intel.com
Acked-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/intel_atomic_plane.c
drivers/gpu/drm/i915/display/intel_display_trace.h

index bcf0239b9533eb9be0e0709b520fa496e3592e16..10e1fc9d069827c7a34fad44bea0e4c3deaf2972 100644 (file)
@@ -757,7 +757,7 @@ void intel_plane_update_noarm(struct intel_plane *plane,
 {
        struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
 
-       trace_intel_plane_update_noarm(&plane->base, crtc);
+       trace_intel_plane_update_noarm(plane, crtc);
 
        if (plane->update_noarm)
                plane->update_noarm(plane, crtc_state, plane_state);
@@ -769,7 +769,7 @@ void intel_plane_update_arm(struct intel_plane *plane,
 {
        struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
 
-       trace_intel_plane_update_arm(&plane->base, crtc);
+       trace_intel_plane_update_arm(plane, crtc);
 
        if (crtc_state->do_async_flip && plane->async_flip)
                plane->async_flip(plane, crtc_state, plane_state, true);
@@ -782,7 +782,7 @@ void intel_plane_disable_arm(struct intel_plane *plane,
 {
        struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
 
-       trace_intel_plane_disable_arm(&plane->base, crtc);
+       trace_intel_plane_disable_arm(plane, crtc);
        plane->disable_arm(plane, crtc_state);
 }
 
index 2dd5a4b7f5d8a178aec9517f50b02dd59957b4f1..1a3955bcb77f95c13b4d3e3232a0bdcd61cef5f6 100644 (file)
@@ -284,7 +284,7 @@ TRACE_EVENT(vlv_fifo_size,
 );
 
 TRACE_EVENT(intel_plane_update_noarm,
-           TP_PROTO(struct drm_plane *plane, struct intel_crtc *crtc),
+           TP_PROTO(struct intel_plane *plane, struct intel_crtc *crtc),
            TP_ARGS(plane, crtc),
 
            TP_STRUCT__entry(
@@ -293,16 +293,16 @@ TRACE_EVENT(intel_plane_update_noarm,
                             __field(u32, scanline)
                             __array(int, src, 4)
                             __array(int, dst, 4)
-                            __string(name, plane->name)
+                            __string(name, plane->base.name)
                             ),
 
            TP_fast_assign(
-                          __assign_str(name, plane->name);
+                          __assign_str(name, plane->base.name);
                           __entry->pipe = crtc->pipe;
                           __entry->frame = intel_crtc_get_vblank_counter(crtc);
                           __entry->scanline = intel_get_crtc_scanline(crtc);
-                          memcpy(__entry->src, &plane->state->src, sizeof(__entry->src));
-                          memcpy(__entry->dst, &plane->state->dst, sizeof(__entry->dst));
+                          memcpy(__entry->src, &plane->base.state->src, sizeof(__entry->src));
+                          memcpy(__entry->dst, &plane->base.state->dst, sizeof(__entry->dst));
                           ),
 
            TP_printk("pipe %c, plane %s, frame=%u, scanline=%u, " DRM_RECT_FP_FMT " -> " DRM_RECT_FMT,
@@ -313,7 +313,7 @@ TRACE_EVENT(intel_plane_update_noarm,
 );
 
 TRACE_EVENT(intel_plane_update_arm,
-           TP_PROTO(struct drm_plane *plane, struct intel_crtc *crtc),
+           TP_PROTO(struct intel_plane *plane, struct intel_crtc *crtc),
            TP_ARGS(plane, crtc),
 
            TP_STRUCT__entry(
@@ -322,16 +322,16 @@ TRACE_EVENT(intel_plane_update_arm,
                             __field(u32, scanline)
                             __array(int, src, 4)
                             __array(int, dst, 4)
-                            __string(name, plane->name)
+                            __string(name, plane->base.name)
                             ),
 
            TP_fast_assign(
-                          __assign_str(name, plane->name);
+                          __assign_str(name, plane->base.name);
                           __entry->pipe = crtc->pipe;
                           __entry->frame = intel_crtc_get_vblank_counter(crtc);
                           __entry->scanline = intel_get_crtc_scanline(crtc);
-                          memcpy(__entry->src, &plane->state->src, sizeof(__entry->src));
-                          memcpy(__entry->dst, &plane->state->dst, sizeof(__entry->dst));
+                          memcpy(__entry->src, &plane->base.state->src, sizeof(__entry->src));
+                          memcpy(__entry->dst, &plane->base.state->dst, sizeof(__entry->dst));
                           ),
 
            TP_printk("pipe %c, plane %s, frame=%u, scanline=%u, " DRM_RECT_FP_FMT " -> " DRM_RECT_FMT,
@@ -342,18 +342,18 @@ TRACE_EVENT(intel_plane_update_arm,
 );
 
 TRACE_EVENT(intel_plane_disable_arm,
-           TP_PROTO(struct drm_plane *plane, struct intel_crtc *crtc),
+           TP_PROTO(struct intel_plane *plane, struct intel_crtc *crtc),
            TP_ARGS(plane, crtc),
 
            TP_STRUCT__entry(
                             __field(enum pipe, pipe)
                             __field(u32, frame)
                             __field(u32, scanline)
-                            __string(name, plane->name)
+                            __string(name, plane->base.name)
                             ),
 
            TP_fast_assign(
-                          __assign_str(name, plane->name);
+                          __assign_str(name, plane->base.name);
                           __entry->pipe = crtc->pipe;
                           __entry->frame = intel_crtc_get_vblank_counter(crtc);
                           __entry->scanline = intel_get_crtc_scanline(crtc);