Skip to content

Commit f04fb40

Browse files
committed
drm/i915: Relocate intel_plane_uses_fence()
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ä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jani Nikula <[email protected]>
1 parent 9fa560f commit f04fb40

File tree

4 files changed

+11
-12
lines changed

4 files changed

+11
-12
lines changed

drivers/gpu/drm/i915/display/intel_display.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -636,16 +636,6 @@ unsigned int intel_remapped_info_size(const struct intel_remapped_info *rem_info
636636
return size;
637637
}
638638

639-
bool intel_plane_uses_fence(const struct intel_plane_state *plane_state)
640-
{
641-
struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane);
642-
struct drm_i915_private *dev_priv = to_i915(plane->base.dev);
643-
644-
return DISPLAY_VER(dev_priv) < 4 ||
645-
(plane->fbc && !plane_state->no_fbc_reason &&
646-
plane_state->view.gtt.type == I915_GTT_VIEW_NORMAL);
647-
}
648-
649639
/*
650640
* Convert the x/y offsets into a linear offset.
651641
* Only valid with 0/180 degree rotation, which is fine since linear

drivers/gpu/drm/i915/display/intel_display.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,8 +524,6 @@ void ilk_pfit_disable(const struct intel_crtc_state *old_crtc_state);
524524
int bdw_get_pipe_misc_bpp(struct intel_crtc *crtc);
525525
unsigned int intel_plane_fence_y_offset(const struct intel_plane_state *plane_state);
526526

527-
bool intel_plane_uses_fence(const struct intel_plane_state *plane_state);
528-
529527
struct intel_encoder *
530528
intel_get_crtc_new_encoder(const struct intel_atomic_state *state,
531529
const struct intel_crtc_state *crtc_state);

drivers/gpu/drm/i915/display/intel_fb.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1283,6 +1283,16 @@ bool intel_fb_needs_pot_stride_remap(const struct intel_framebuffer *fb)
12831283
intel_fb_uses_dpt(&fb->base);
12841284
}
12851285

1286+
bool intel_plane_uses_fence(const struct intel_plane_state *plane_state)
1287+
{
1288+
struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane);
1289+
struct drm_i915_private *dev_priv = to_i915(plane->base.dev);
1290+
1291+
return DISPLAY_VER(dev_priv) < 4 ||
1292+
(plane->fbc && !plane_state->no_fbc_reason &&
1293+
plane_state->view.gtt.type == I915_GTT_VIEW_NORMAL);
1294+
}
1295+
12861296
static int intel_fb_pitch(const struct intel_framebuffer *fb, int color_plane, unsigned int rotation)
12871297
{
12881298
if (drm_rotation_90_or_270(rotation))

drivers/gpu/drm/i915/display/intel_fb.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ u32 intel_plane_compute_aligned_offset(int *x, int *y,
7777
int color_plane);
7878

7979
bool intel_fb_needs_pot_stride_remap(const struct intel_framebuffer *fb);
80+
bool intel_plane_uses_fence(const struct intel_plane_state *plane_state);
8081
bool intel_fb_supports_90_270_rotation(const struct intel_framebuffer *fb);
8182

8283
int intel_fill_fb_info(struct intel_display *display, struct intel_framebuffer *fb);

0 commit comments

Comments
 (0)