Commit 004f80f9 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915/fbc: Track FBC usage per-plane

In the future we may have multiple planes on the same pipe
capable of using FBC. Prepare for that by tracking FBC usage
per-plane rather than per-crtc.

v2: s/intel_get_crtc_for_pipe/intel_crtc_for_pipe/
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211124113652.22090-9-ville.syrjala@linux.intel.comReviewed-by: default avatarMika Kahola <mika.kahola@intel.com>
parent 6e4d2e45
This diff is collapsed.
...@@ -402,7 +402,7 @@ struct intel_fbc { ...@@ -402,7 +402,7 @@ struct intel_fbc {
struct mutex lock; struct mutex lock;
unsigned int possible_framebuffer_bits; unsigned int possible_framebuffer_bits;
unsigned int busy_bits; unsigned int busy_bits;
struct intel_crtc *crtc; struct intel_plane *plane;
struct drm_mm_node compressed_fb; struct drm_mm_node compressed_fb;
struct drm_mm_node compressed_llb; struct drm_mm_node compressed_llb;
......
...@@ -372,8 +372,8 @@ TRACE_EVENT(intel_plane_disable_arm, ...@@ -372,8 +372,8 @@ TRACE_EVENT(intel_plane_disable_arm,
/* fbc */ /* fbc */
TRACE_EVENT(intel_fbc_activate, TRACE_EVENT(intel_fbc_activate,
TP_PROTO(struct intel_crtc *crtc), TP_PROTO(struct intel_plane *plane),
TP_ARGS(crtc), TP_ARGS(plane),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(enum pipe, pipe) __field(enum pipe, pipe)
...@@ -382,6 +382,8 @@ TRACE_EVENT(intel_fbc_activate, ...@@ -382,6 +382,8 @@ TRACE_EVENT(intel_fbc_activate,
), ),
TP_fast_assign( TP_fast_assign(
struct intel_crtc *crtc = intel_crtc_for_pipe(to_i915(plane->base.dev),
plane->pipe);
__entry->pipe = crtc->pipe; __entry->pipe = crtc->pipe;
__entry->frame = intel_crtc_get_vblank_counter(crtc); __entry->frame = intel_crtc_get_vblank_counter(crtc);
__entry->scanline = intel_get_crtc_scanline(crtc); __entry->scanline = intel_get_crtc_scanline(crtc);
...@@ -392,8 +394,8 @@ TRACE_EVENT(intel_fbc_activate, ...@@ -392,8 +394,8 @@ TRACE_EVENT(intel_fbc_activate,
); );
TRACE_EVENT(intel_fbc_deactivate, TRACE_EVENT(intel_fbc_deactivate,
TP_PROTO(struct intel_crtc *crtc), TP_PROTO(struct intel_plane *plane),
TP_ARGS(crtc), TP_ARGS(plane),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(enum pipe, pipe) __field(enum pipe, pipe)
...@@ -402,6 +404,8 @@ TRACE_EVENT(intel_fbc_deactivate, ...@@ -402,6 +404,8 @@ TRACE_EVENT(intel_fbc_deactivate,
), ),
TP_fast_assign( TP_fast_assign(
struct intel_crtc *crtc = intel_crtc_for_pipe(to_i915(plane->base.dev),
plane->pipe);
__entry->pipe = crtc->pipe; __entry->pipe = crtc->pipe;
__entry->frame = intel_crtc_get_vblank_counter(crtc); __entry->frame = intel_crtc_get_vblank_counter(crtc);
__entry->scanline = intel_get_crtc_scanline(crtc); __entry->scanline = intel_get_crtc_scanline(crtc);
...@@ -412,8 +416,8 @@ TRACE_EVENT(intel_fbc_deactivate, ...@@ -412,8 +416,8 @@ TRACE_EVENT(intel_fbc_deactivate,
); );
TRACE_EVENT(intel_fbc_nuke, TRACE_EVENT(intel_fbc_nuke,
TP_PROTO(struct intel_crtc *crtc), TP_PROTO(struct intel_plane *plane),
TP_ARGS(crtc), TP_ARGS(plane),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(enum pipe, pipe) __field(enum pipe, pipe)
...@@ -422,6 +426,8 @@ TRACE_EVENT(intel_fbc_nuke, ...@@ -422,6 +426,8 @@ TRACE_EVENT(intel_fbc_nuke,
), ),
TP_fast_assign( TP_fast_assign(
struct intel_crtc *crtc = intel_crtc_for_pipe(to_i915(plane->base.dev),
plane->pipe);
__entry->pipe = crtc->pipe; __entry->pipe = crtc->pipe;
__entry->frame = intel_crtc_get_vblank_counter(crtc); __entry->frame = intel_crtc_get_vblank_counter(crtc);
__entry->scanline = intel_get_crtc_scanline(crtc); __entry->scanline = intel_get_crtc_scanline(crtc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment