]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/i915: Relocate intel_plane_uses_fence()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 13 Feb 2025 15:02:17 +0000 (17:02 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Sat, 15 Feb 2025 19:04:06 +0000 (21:04 +0200)
Relocate intel_plane_uses_fence() into intel_fb.c. Not sure
that's the best place, but since this is mostly about the
fb and vma I can't think of anything truly better right now.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250213150220.13580-10-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/intel_display.c
drivers/gpu/drm/i915/display/intel_display.h
drivers/gpu/drm/i915/display/intel_fb.c
drivers/gpu/drm/i915/display/intel_fb.h

index d83024c17c3cf00bfdbc2dc050e449b605b8ce7e..dc1ec1b94c4005b76196fd39981ec1953a24d8e4 100644 (file)
@@ -636,16 +636,6 @@ unsigned int intel_remapped_info_size(const struct intel_remapped_info *rem_info
        return size;
 }
 
-bool intel_plane_uses_fence(const struct intel_plane_state *plane_state)
-{
-       struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane);
-       struct drm_i915_private *dev_priv = to_i915(plane->base.dev);
-
-       return DISPLAY_VER(dev_priv) < 4 ||
-               (plane->fbc && !plane_state->no_fbc_reason &&
-                plane_state->view.gtt.type == I915_GTT_VIEW_NORMAL);
-}
-
 /*
  * Convert the x/y offsets into a linear offset.
  * Only valid with 0/180 degree rotation, which is fine since linear
index b6d1aa05309f3327e7451eac915e1c01fd9ed1c1..7b958e66a69c36520286fabbe9c9e313d393758c 100644 (file)
@@ -524,8 +524,6 @@ void ilk_pfit_disable(const struct intel_crtc_state *old_crtc_state);
 int bdw_get_pipe_misc_bpp(struct intel_crtc *crtc);
 unsigned int intel_plane_fence_y_offset(const struct intel_plane_state *plane_state);
 
-bool intel_plane_uses_fence(const struct intel_plane_state *plane_state);
-
 struct intel_encoder *
 intel_get_crtc_new_encoder(const struct intel_atomic_state *state,
                           const struct intel_crtc_state *crtc_state);
index 5af93235057c604a1c02b2169b39aefe56dec6cd..5875af2b61e666bf81fed6fd4ee3c3a917ed0aa2 100644 (file)
@@ -1283,6 +1283,16 @@ bool intel_fb_needs_pot_stride_remap(const struct intel_framebuffer *fb)
                intel_fb_uses_dpt(&fb->base);
 }
 
+bool intel_plane_uses_fence(const struct intel_plane_state *plane_state)
+{
+       struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane);
+       struct drm_i915_private *dev_priv = to_i915(plane->base.dev);
+
+       return DISPLAY_VER(dev_priv) < 4 ||
+               (plane->fbc && !plane_state->no_fbc_reason &&
+                plane_state->view.gtt.type == I915_GTT_VIEW_NORMAL);
+}
+
 static int intel_fb_pitch(const struct intel_framebuffer *fb, int color_plane, unsigned int rotation)
 {
        if (drm_rotation_90_or_270(rotation))
index e6ef1783e351d6dc11ec671fbcb1199af8e8021d..63728520eb062e415e7f1df972681df0cf00624b 100644 (file)
@@ -77,6 +77,7 @@ u32 intel_plane_compute_aligned_offset(int *x, int *y,
                                       int color_plane);
 
 bool intel_fb_needs_pot_stride_remap(const struct intel_framebuffer *fb);
+bool intel_plane_uses_fence(const struct intel_plane_state *plane_state);
 bool intel_fb_supports_90_270_rotation(const struct intel_framebuffer *fb);
 
 int intel_fill_fb_info(struct intel_display *display, struct intel_framebuffer *fb);